Establish a connection between Salesforce B2B Commerce and AvaTax
This article applies to:Connector for Salesforce B2B Commerce
After you install the integration software, connect Salesforce B2B Commerce to AvaTax.
Before you begin
- Have your AvaTax account ID and license key with you.
- If you haven't created a company profile in AvaTax, create one now.
Steps
- In Salesforce B2B Commerce, create the AvaTax permission set.
- Select Setup, search for Permission Sets, and select the link under Users.
- On the Permission Sets page, select Clone next to B2B Commerce Admin and give the clone a memorable name.
- Select the name of the permission set clone you created.
- On the permission set page, in the Apps section, select Object Settings.
- On the Object Settings page, select each of the following objects, select Edit, confirm the indicated permissions are selected, and then select Save.
Object Permissions CC Cart Read and edit for:
- Object Permissions
- Under Field Permissions:
- AvaTax is Overridden
- AvaTax Override Amount
- AvaTax Recorded Date
- Avatax Tax
- AvaTax Tax Amount
- AvaTax Tax Rate Id
- Tax Details
CC Cart Items CC Orders CC Order Items AvaTax Exception Logs - Object Permissions - Read and edit
- Under Field Permissions:
- AvaTax Exception Name – Read
- Created By – Read
- Last Modified By – Read
- Owner – Read and edit
- On the Salesforce B2B Commerce Company Information page, confirm that the the company address there is the address that should be used as the origination address on transactions.
- To show your customers estimated tax calculated by AvaTax during checkout, create the necessary tax hook.
- In App Launcher, search for and select CC Admin.
- In CC Admin, next to Global Settings, select the down arrow and then select DefaultStore.
- Under DefaultStore Settings, under Integrations, select Tax.
- Change Tax Calculation API Class to b2bava.AvaTaxCalculation and then select Save.
- To enable tax calculation by AvaTax if you have enabled line level independence, create the necessary price adjustment hook.
- In App Launcher, search for and select CC Admin.
- In CC Admin, next to Global Settings, select the down arrow and then select DefaultStore.
- Under DefaultStore Settings, under Integrations, select Pricing.
- Under Price Adjustment Settings for DefaultStore, change Price Adjustment API Class to b2bava.AvaTaxPriceAdjustment and then select Save.
- Select Global Settings.
- On the B2B Commerce Administration page, under Global Settings, select Configure Cache Management.
- Select Build New to create a new cache, and then select Activate to activate it.
- Create the AvaTax named credential.
- Select Setup, search for and select Named Credentials.
- On the Named Credentials page, select New Named Credential, create a new named credential with the following values, and then select Save.
Field Value Label AvaTax Name AvaTax URL - For a production account: https://rest.avatax.com
- For a sandbox account: https://sandbox-rest.avatax.com
Certificate Leave blank Identity Type Named Principal Authentication Protocol Password Authentication Username AvaTax account ID Password AvaTax license key Callout Options Enable Generate Authorization Header
- Test the connection between Salesforce B2B Commerce and AvaTax.
- In App Launcher, search for and select AvaTax Admin.
- On the AvaTax configuration page, on the Avalara Tax Setup tab, from StoreFront, select the company in Salesforce B2B Commerce that you’re connecting to AvaTax.
- In Company Code, enter the company name you used in Avalara for the selected company.
- From Avalara Named Credentials, select AvaTax and then select Save.
- Select Test Connection.
- Configure your tax settings if necessary. Most people can use those that automatically populate when installing Connector for Salesforce B2B Commerce.
- On the AvaTax configuration page, on the Avalara Tax Setup tab, select Tax Configurations to expand the section.
- Update any settings that are incorrect for your situation.
- Select Update to save your changes.
Salesforce B2B Commerce is now connected to AvaTax and ready to send transactions for tax calculation.