Skip to main content
Avalara Help Center

Install and Configure Avalara AvaTax for Salesforce Billing

This article applies to:AvaTax for Salesforce Billing

After you activate AvaTax and set up your company profile, install and configure AvaTax for your business application. During configuration, customize your setup to fit your unique business needs for things like:

  • Tax calculation settings for various tax types
  • Exemption settings if you have exempt customers
  • Product taxability settings

Alter these settings when your business needs change.

Before you install

  • You must have all the following installed before installing AvaTax for Salesforce Billing:
    • Salesforce CPQ (must be installed before Salesforce Billing)
    • Salesforce Billing
  • If your organization has Salesforce CPQ installed, make sure it's Salesforce CPQ 1.5 or later.

Install the AvaTax integration for Salesforce Billing

Install the Avalara AvaTax Salesforce Mapper and the Avalara AvaTax for Salesforce Billing packages to enable tax calculation and address validation in Salesforce Billing.

To connect Salesforce Billing to AvaTax:

  1. In Avalara, go to Settings > Integrations > Manage.
  2. Select See connector versions for the appropriate Avalara AvaTax Salesforce Mapper version (sandbox or production), and then select the most recent version.
  3. On the Package Install page, select Install for All Users, and then click Install.
  4. To complete the installation, click Done.
  5. Ensure the user has full access permissions for Avalara custom objects (UDLs and UserMessages).
  6. Repeat steps 1-4 to install the appropriate version (sandbox or production) of AvaTax for Salesforce Billing.

Configure

In addition to adding controls to pages in Salesforce Billing for quicker access to AvaTax actions, you must configure certain objects specifically to allow AvaTax to properly calculate taxes and validate addresses. If you use a custom field to record information included in any of the configurations in this section, use the XML on the tax integration page of AvaTax Salesforce Mapper to complete the configuration.

Find system integrator documents for each version on the release notes for the version.

Customize Salesforce Billing pages

  • On each indicated page, click Edit Layout, click FieldsButtons, or Related Lists and then drag the appropriate field, button, or related list onto the page:
    Page Field Button Related list
    Accounts
    • Exemption
    • Entity/Use Code
    • Business Identification Number
    • Is Seller Importer of Record
    Validate Addresses  
    Legal Entities   Validate Addresses  
    Contact   Validate Addresses  
    Order Get TaxBreakup    
    Order Line Item     Order Line Tax Breakups
    Invoice Get TaxBreakup    
    Invoice Line Item     Invoice Line Tax Breakups
    Debit Note Get TaxBreakup    
    Debit Note Line Item     Debit Note Line Tax Breakups
    Credit Note Get TaxBreakup    
    Credit Note Line Item     Credit Note Line Tax Breakups

Configure the Billing Config object

  1. In Salesforce Billing, go to Setup > Build > Develop > Custom Settings, and then, next to Billing Config, click Manage.
  2. If a configuration named AVALARA AVATAX doesn't exist, create it:
    1. Click New.
    2. Fill in the following values, and then click Save:
      Field Value
      Name AVALARA_AVATAX
      Category Tax
      String Value Avalara AvaTax

Configure the Tax Config object

  1. In Salesforce Billing, go to Setup > Build > Develop > Custom Settings, and then, next to Tax Config, click Manage.
  2. Click New, fill in the following values, and then click Save:
    Field Value
    Name Avalara AvaTax
    Class Name AVA_BLNG.TaxCalculationAPI 

Configure Connector for Salesforce Billing

While you can go to each object's tab to configure the objects as needed to use AvaTax with Salesforce Billing, use the AvaTax for Salesforce Billing app to configure many objects in one place. The objects you create in the app are added to Salesforce Billing, and objects in Salesforce Billing display in the app.

  1. Make sure you're in Lightning experience in Salesforce Billing.
  2. In App Launcher, search for and select AvaTax for Salesforce Billing.
    The AvaTax for Salesforce Billing app opens, offering you consolidated configuration for Connector for Salesforce Billing.
  3. On the Tax Integrations tab, select New, fill out the following, and then select Save:
    Field Action
    Tax Integration Name Enter a unique, easy to identify name for the tax integration.
    Active

    Select this option to make the tax treatment visible and available to use.

    If you clear this option in the future, any existing objects with a lookup relationship to this treatment won't be changed.

    Default Select to set this tax integration as the default.
    Tax Engine

    Select Avalara AvaTax.

    If you don't see this option, add it to the list:

    1. On the Quick Access menu, select View Fields.
    2. Select Tax Engine, select View Tax Engine Value Set, and then select New in the Values related list.
    3. Enter Avalara AvaTax and select Save.
    Customer Code
    • To use the account name as the customer code, select Name.
    • To use the account ID as the customer code, select Id.
    Doc Code
    • To use the invoice name as the doc code, select Name.
    • To use the invoice ID as the doc code, select Id.
    Account Number Enter your AvaTax account number. Use the information provided in an email from Avalara (sent to the email account you used to activate your account). It must match what's saved in Avalara at Settings > Account ID.
    License Key Enter your AvaTax license key. Use the information provided in an email from Avalara (sent to the email account you used to activate your account). It must match what's saved in Avalara.
    Environment
    • Select Sandbox to test AvaTax using a sandbox account.
    • Select Production to send transaction to an AvaTax production account.
    Address Validation Select this option to allow address validation for addresses in the US and Canada.
    Save transactions to AvaTax
    • To save transactions to AvaTax, select this option. (Recommended)
    • To show estimated tax but not save transactions to AvaTax, clear this option. We recommend you only clear this option when testing your integration.
  4. On the Tax Integrations tab, click the down arrow under Action for the tax integration you just created, and then select Test Connection to confirm you can connect to AvaTax.

  5. On the Legal Entities tab, select New, fill out the following, and then select Save:

    Field Action
    Legal Entity Name Enter the company name you created in Avalara for the company. 
    Active Select this option to make the legal entity visible and available to use.
    Address fields (Line 1, City, Region, Postal Code, Country) Enter the ship-from (origin) address.
  6. On the Tax Rules tab, select New, fill out the following, and then select Save:

    Field Action
    Tax Rule Name Enter a unique, easy to identify name for the rule.
    Active

    Select this option to make the tax rule visible and available to use.

    If you clear this option in the future, any existing objects with a lookup relationship to this rule won't be changed.

    Taxable (Yes/No)
    • To send the record to AvaTax to calculate tax, select Yes. Sending all records, including those for non-taxable lines, helps avoid tax compliance issues, especially for SST customers. (Recommended)
    • To not send the record to AvaTax and to set tax to zero, select No. We don't recommend using this to make invoice lines non-taxable. Instead, for the relevant Tax Treatment, in select NT for Tax Code.
  7. On the Tax Treatments tab, select New, fill out the following, and then select Save:

    Field Action
    Name Enter a unique, easy to identify name for the tax treatment.
    Active

    Select this option to make the tax treatment visible and available to use.

    If you clear this option in the future, any existing objects with a lookup relationship to this treatment won't be changed.

    Tax Code Enter the desired tax code previously created in AvaTax. This code determines taxability of invoice lines to which this tax treatment is mapped.
    Tax Integration Select the tax integration you configured previously with AvaTax login details.
    Tax Legal Entity Select the tax legal entity you configured previously.
    Tax Rule Select the tax rule you configured previously for AvaTax.
  8. On the Revenue Recognition Rules tab, select New, fill out the following, and then select Save:

    Field Action
    Name Enter a unique, easy to identify name for the revenue recognition rule.
    Active Select this option to make the revenue recognition rule visible and available to use.
    Create Revenue Schedule Select whether or not to create a revenue schedule for this revenue recognition rule.
  9. On the Billing Rules tab, select New, fill out the following, and then select Save:

    Field Action
    Name Enter a unique, easy to identify name for the billing rule.
    Active Select this option to make the billing rule visible and available to use.
    Initial Billing Trigger Select which event triggers billing.
    Partial Period Treatment Select how Salesforce Billing creates invoice lines for products that bill in advance of the order start date.
    • To create a separate line for the partial period, select Separate.
    • To create one line that combines the partial period with the next full period, select Combine.
    Generate Invoice Select whether or not Salesforce Billing creates an invoice line for the product.

Restrict editing tax integrations

To restrict who can edit tax integration settings for the AvaTax tax integration, make sure only the System Administrator profile is set to use the AvaTax tax integration page layout.

Configure an AvaTax GL rule

  1. In Salesforce Billing, go to GL Rules, and then click New.
  2. Fill out the following, and then click Save:
    Field Action
    GL Rule Name Enter a unique, easy to identify, name for the rule
    Active

    Select this option to make the tax rule visible and available to use.

    If you clear this option in the future, any existing objects with a lookup relationship to this rule won't be changed.

Configure an AvaTax GL treatment

  1. In Salesforce Billing, go to GL Treatments, and then click New.
    1. Fill out the following, and then click Save:
      Field Action
      Name Enter a unique, easy to identify, name for the GL treatment.
      Active

      Select this option to make the tax treatment visible and available to use.

      If you clear this option in the future, any existing objects with a lookup relationship to this treatment won't be changed.

      GL Legal Entity Select the GL legal entity to use for saving transactions to AvaTax.
      Tax Rule Select the GL rule that's configured for AvaTax.
      Credit GL Account Select the tax payable account to record credit tax transactions to.
      Debit GL Account Select the accounts receivable account to record debit transactions to.

Set the tax calculation address for invoices

  1. In Salesforce Billing, go to Setup > Installed Packages, and then, next to Salesforce Billing, click Configure.
  2. On the General tab, from the Tax calculation is based on list, select the address AvaTax uses as the ship-to (destination) address when calculating tax on invoices.

Set product tax rules

  1. In Salesforce Billing, go to Product, select a product, and then click Edit.
  2. In the Salesforce Billing Configuration section, select the AvaTax rule you created, and then click Save.
  3. Repeat this for each active product.

AvaTax custom fields and integration points

The AvaTax for Salesforce Billing integration package includes the following custom fields:

Label API name Data type Description
AvaTax Account Number AvaTaxAccountNumber__c Text(255) Account number to connect to AvaTax account
AvaTax License Key AvaTaxLicenseKey__c Text(255) License key to connect to AvaTax account
Customer Code CustomerCode__c Picklist Select whether to send the invoice number or the invoice ID as the doc code
Doc Code DocCode__c Picklist Select whether to send the account name or the account ID as the customer code
Sandbox TestMode__c Checkbox The default account type is production. If selected, account type is changed from production to sandbox.
Save transactions to AvaTax Save_transactions_to_AvaTax__c Checkbox If selected, transactions are posted to AvaTax
Validate Address Validate_Address__c Checkbox If selected, address validation feature is enabled

AvaTax integrates with Salesforce Billing at the following points:

Object/Page Address validation Test connection Exemption Calculate tax Void tax Commit tax Tax date override Tax code mapping Legal entity
Account Yes   Yes            
Contact Yes                
Legal Entity Yes                
Tax Integration   Yes              
CPQ Order       Automatic       Yes  
Invoice       Automatic Yes Yes Yes    
Invoice Line               Yes Yes
Credit Note       Manual Yes Yes Yes    
Credit Note Line               Yes Yes
Debit Note       Manual Yes Yes Yes    
Debit Note Line               Yes Yes
Refund       No No No No No No
  • Was this article helpful?