action.skip

Tax Rules and VAT Number Validation

This JustOn Configurator package adds standard tax rules that depend on the VAT number and the region of the invoice recipient to your Salesforce org as well as integrates the VAT number validation.

For more details, see Tax Rules and Enabling VAT Number Validation.

Info

System preconditions:

Deploying package

To deploy a configurator package:

  1. Log in your target Salesforce org.
  2. In the same browser session, open the JustOn Configurator.

    If the link does not work, copy the URL https://juston-configurator.herokuapp.com/.

  3. Click Salesforce OAuth2.

    This connects the JustOn Configurator with your current Salesforce session using your current credentials. Make sure that you are connected with the intended user and org.

    jo_configurator_session

  4. Open the relevant tab.

  5. Scroll down the list to find the relevant package.
  6. Click Deploy.

    This deploys the configuration as described to your org.

    Back in your Salesforce org, make sure to add the deployed components to permission sets as necessary.

Deployed Artifacts

Remote site setting
CheckVatService set active
Custom settings

Four Tax Rules records

Name Region Tax Rate VAT Category Code
DE_19 DE 19% S
EU_VAT EU 19% S
Non_EU NON-EU 0% G
RC RC 0% AE
Fields
Object Field API Name Data Type Description
Account ON_Region Formula (Text) Determines the invoice region. The produced value will be copied to the field Region on the invoice.
Account VATValidCheck Formula (Checkbox) Shows if the validation result is up to date
Account ON_VATNumber Formula (Text) Takes the VAT number from the VATIN field.
Formula value: ONB2__TaxNumber__c
Invoice ShowReverseChargeText Formula (Text) Specifies the condition for selecting the reverse charge notice. According to the values RC, EU or Non-EU, the corresponding text is displayed.
Region formula on Account
IF(ISPICKVAL(BillingCountryCode,"DE"), "DE",
    IF(CASE(TEXT(BillingCountryCode),
        "AT","EU",
        "BE","EU",
        "BG","EU",
        "CY","EU",
        "CZ","EU",
        "DK","EU",
        "EE","EU",
        "ES","EU",
        "FI","EU",
        "FR","EU",
        "GR","EU",
        "HU","EU",
        "IE","EU",
        "IT","EU",
        "HR","EU",
        "LT","EU",
        "LU","EU",
        "LV","EU",
        "MT","EU",
        "NL","EU",
        "PL","EU",
        "PT","EU",
        "RO","EU",
        "SE","EU",
        "SI","EU",
        "SK","EU",
        "SM","EU",
        "NON-EU")
        = "NON-EU", "NON-EU",
        IF(ISBLANK(ONB2__TaxNumber__c), "EU", "RC")
    )
)
VAT validation check formula on Account
IF(
    AND(
        NOT(ISBLANK(ONB2__VATLastValidation__c)),
        NOT(ISBLANK(ONB2__VATLastValidationSuccess__c)),
        ONB2__VATLastValidation__c == ONB2__VATLastValidationSuccess__c
    ),
    true,
    false
)
RC text formula on Invoice
CASE (ONB2__Region__c,
    'RC','RC',
    'EU','EU',
    'NON-EU','Non-EU',
    null
)

Post-Deployment Tasks

  1. Enable Read access to the new fields (Region on Account, Show Reverse Charge Text on Invoice) via the permission set JustOn Additional Fields.
  2. Make sure that the field VATIN (API name ONB2__TaxNumber__c) on the account records are set.

    If the org uses another field to keep the VAT number, change the formula in the ON_VATNumber field accordingly.

  3. Optionally, add the Mobile & Lightning Action VAT Validation to the Account page layout.