Skip to main content
Avalara Help Center

Install and Configure Avalara AvaTax for Salesforce

This article applies to:Avalara AvaTax for Salesforce

After you activate AvaTax Update and set up your company profile, install and configure AvaTax Update for your accounting software. 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.

Install

There are two software packages that enable you to calculate tax on Opportunities. There are also two optional packages: one for Quotes and the other for Orders.

Download AvaTax Update for your accounting software

To connect your accounting software to AvaTax Update, download your integration software. 

  1. In AvaTax Update, go to Settings > Manage Account. Avalara Account opens in a new tab.
  2. In Avalara Account, go to Connectors.
  3. Click the arrow next to the name of your software to download the connector you need.
  4. In your Downloads folder, right-click the .zip file and extract the installation folder or file (.exe or .pdf or .msi). 

Install AvaTax Update for your accounting software

Use the same steps to install any of the Salesforce packages. If you plan to install or upgrade Quotes and/or Orders, make sure:

  • The SDK and Core (Opportunities) packages are installed
  • Quotes and Orders are enabled in your Salesforce environment

To install a Salesforce package:

  1. Open the installation folder you downloaded from AvaTax Update, open the PDF, and then click the Package Location download link.
  2. On the Package Install page, select Install for All Users, and then click Install.
  3. On the Approve Third-Party Access page, click Yes, grant access to these third-party web sites to access the AppExchange, and then click Continue.
  4. When the installation completes, click Done.
  5. Ensure that the user has full access permissions for Avalara custom objects (UDLs and UserMessages).

Configure

AvaTax Update for Salesforce is highly customizable and lets you set your own layout either automatically or manually.

Customize your account

To add account tabs and account details:

  1. On the Salesforce homepage, add a new tab to the menu by clicking + on the menu bar.
  2. If they aren't listed under Selected Tabs, select whichever of the following are missing, and then click the Add button:
    • Avalara
    • ShippingCodes
    • Entity/Use Code
    • Accounts
    • Contracts
    • Order
    • Products
    • Contact
  3. On the Avalara tab, click Go!.  
  4. To edit your account credentials, click Edit, add or modify the following, and then click Save:
    Section Field and Action
    Avalara Account Detail
    • Avalara Account Name: Select AvaTax.
    • Active Avalara Setting: Select to activate this account.
    Avalara Credentials
    • Account ID and 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 AvaTax Update.
    • User Name and Password: Use the information provided in an email from Avalara (sent to the email account you used to activate your account). It's the same credentials you use to log in to AvaTax Update.
    • URL: Enter https://development.avalara.net if you have an AvaTax Update development account or https://avatax.avalara.net if you have an AvaTax Update production account.
    • Company Code: Enter the company code you entered when you activated your AvaTax Update account. Every accounting software that works with AvaTax Update uses a company code to identify itself to AvaTax Update.
    Origin Address Enter the address used as your origination address when calculating sales tax
    Address Validation Settings
    • Enable AvaTax address validation: If you disable address validation, AvaTax Update uses the customer's ship-to address to calculate the correct sales tax. Sales tax might be calculated incorrectly if this option is disabled.
    • Optional: Verify Validated Addresses: Select to manually replace unvalidated addresses with validated addresses in Salesforce. Clear to make validated addresses replace unvalidated addresses automatically.
    • Optional: Use Billing Address for Tax Calc: Select to have AvaTax Update ignore the shipping address and use the billing address to calculate sales tax.
    • Optional: Return address in upper case: Select to save all address validation results in uppercase format.
    Tax Calculation Settings
    • Enable AvaTax tax calculation: If you choose to disable tax calculation, your accounting software no longer uses AvaTax Update to calculate tax on transactions.
    • Optional: Submit Sales Tax as SalesOrder: Select if you don't want transactions to be visible in AvaTax Update. Clear to make Salesforce save transactions as uncommitted invoices in AvaTax Update.
    • Enable Tax Code Mapping: Enable to map items to Avalara tax codes to account for varying taxability of products and services.
    • Optional: Use Account Name for Cust Identification: Select to have AvaTax Update use the account name instead of the account ID for the customer number in calculations. AvaTax Update calculations normally use the account ID (the last 15 digits in the URL on a page) for the customer code.
    • Optional: Enable Entity/Use Code: Enable to map entity/use codes for your customer addresses to flag them as exempt from sales tax.
    • Optional: Allow Tax Override: Select to allow AvaTax Update to override the tax amount.
    • Shipping Code: Select to add shipping codes and send them to AvaTax Update.
    • Optional: Enable UPC Code as ItemCode: Select to send a UPC instead of an item code to AvaTax Update. Using this feature may trigger additional fees. Talk to your Customer Account Manager (CAM) for more information.
  5. Click Test Connection, and then:
    • If you see a success message, click OK.
    • If you see any other message, correct the information in the fields, and then try again.
  6. To set up your tax profile, click Create Tax Profile, select the locations where you're registered to collect and remit tax, and then click Enable Tax Jurisdiction(s).
  7. Optional: To create an additional company, click Create Company, add the company details, and then click Setup Company Profile.
  8. Optional: To validate the origin address, click Validate Origin Address.

Customize page layout automatically

To automatically customize the page layout of the Quotes, Orders, Contracts, Opportunities, Accounts, and Products pages:

  1. On each page, click Page Layouts, and then:
    • To create a new layout, click New.
    • To edit an existing layout, click Edit
  2. After creating page layouts, to set and control the page layout displayed by default, click Page Layout Assignment. The table displays the page layout assignments for different profiles.
  3.  Click Edit Assignment button, select the row for System Administrator, and then, from the Page Layout To Use list, select Order (TaxNow) Layout.
  4. Click Save.

Customize page layout manually

To manually customize the page layout of the Quotes, Orders, Contracts, Opportunities, Accounts, and Products pages:

  1. On each page, click Edit Layout, and then click Fields.
  2. In the Detail section of each page, add the following fields and buttons:
    Page Fields Buttons
    Quotes
    • S&H Tax
    • Avalara Status
    • Tax Now Status
    • Calculate Sales Tax
    • Validate BillTo
    • Validate ShipTo
    Quote Line Item
    • Sales Tax Amount
    • Sales Tax Details
    • Sales Tax Rate
    • Avalara Tax Code
     
    Orders
    • Sales Tax
    • Shipping Tax
    • Non-Taxable
    • Shipping and Handling
    • Avalara Status
    • Tax Now Status
    • Calculate Sales Tax
    • Validate Billing Address
    • Validate Shipping Address
    Order Product
    • Sales Tax Amount
    • Sales Tax Details
    • Sales Tax Rate
     
    Opportunities
    • Sales Tax
    • Shipping Tax
    • Non-Taxable
    • Shipping and Handling
    • Avalara Status
    • Tax Now Status
    • Billing Contact
    • Shipping Contact
    • Calculate Sales Tax
    Opportunity Product
    • Sales Tax Amount
    • Sales Tax Details
    • Sales Tax Rate
     
    Accounts
    • Entity/use code
    • Exemption Number
    • Validate Billing Address
    • Validate Shipping Address
    Products
    • Tax Code 
    • UPC
     
  3. To take advantage of the Salesforce Lightning update, in the Salesforce Mobile and Lightning Experience Actions section of each page, add the Mobile & Lightning Actions buttons.  

Configure automatic tax calculation

Use workflow rules or apex triggers to automate tax calculation on opportunities, quotes, and orders. Refer to Salesforce documentation for specific steps for creating workflow rules and apex triggers.

Automate tax calculation with a workflow rule

If you want to trigger automatic tax calculation on opportunities, quotes, and orders, you must create a rule for each.

To trigger tax calculation automatically with a workflow rule:

  • Create a workflow rule to select the Calculate Tax checkbox.

Automate tax calculation with a trigger

If you want to trigger automatic tax calculation on opportunities, quotes, and orders, you must create a trigger for each.

To trigger tax calculation automatically with an apex trigger:

  1. Write a trigger to call the necessary AvaTax Update method. The following lines must be included in the indicated trigger:
    • Opportunity trigger:

        AVA_SFCore.OppUtils.AsyncGetTax(Opportunity ID, Commit Status);

       Trigger.new[lc].Avalara_Statusc = 'Temporary';

       Trigger.new[lc].Tax_Now_Statusc = 'Auto Sales Tax Calc Triggered - Refresh Your Browser For Result';

    • Quote trigger:

        AVA_SFQUOTES.QuoteUtils.AsyncGetTax(Quote ID, Commit Status);

       Trigger.new[lc].Avalara_Statusc = 'Temporary';

       Trigger.new[lc].Tax_Now_Statusc = 'Auto Sales Tax Calc Triggered - Refresh Your Browser For Result';

    • Order trigger:

        AVA_SFORDERS.OrderUtils.AsyncGetTax(Order ID, Commit Status);

       Trigger.new[lc].Avalara_Statusc = 'Temporary';

       Trigger.new[lc].Tax_Now_Statusc = 'Auto Sales Tax Calc Triggered - Refresh Your Browser For Result';

  2. For the Commit Status parameter:

    • Pass the value True to set the AvaTax Update document status to Committed.

    • Pass the value False to set the AvaTax Update document status to Uncommitted.

Example Script

One way you might write the trigger for automatic tax calculation on opportunities:

trigger Change_AmountTrigger on Opportunity(before update) 
{             
    for (Integer lc = 0; lc < Trigger.new.size(); lc++) 
     {
       //User's Logic  which will Trigger Tax Calculation comes Here //    
       if (Trigger.new[lc].Amount != Trigger.old[lc].Amount) 
            { 

              //Set values in Tax Now Status and Avalara Status fields should be same as below
              Trigger.new[lc].AVA_SFCORE__Tax_Now_Status__c='Auto Sales Tax Calc Triggered - Refresh Your Browser For Result';  
              Trigger.new[lc].AVA_SFCORE__Avalara_Status__c = 'Temporary';

              //Call Tax Calculation method exposed by Avalara
                      
              //To pass status as Committed
              //AVA_SFCore.OppUtils.AsyncGetTax(Trigger.new[lc].id, true);
                      
              //To pass status as Uncommitted         
              AVA_SFCore.OppUtils.AsyncGetTax(Trigger.new[lc].id, false);     
             }
     }
}

  • Was this article helpful?