Setting Up Tax Integration
Prerequisite
You must have already installed CPQ packages.
To set up tax integration, you must complete the following tasks:
To set up tax integration with Avalara tax engine
- Download and install Avalara Tax Integration with Ecommerce unmanaged package from the repository.
- Go to Custom Settings and click Manage for Config Custom Classes.
- Click New.
- Enter the Name as System Properties.
- In Tax Callback Class, enter APTS_APTSTaxCallBack. This class is part of the Avalara Tax Integration with the Ecommerce unmanaged package.
- Click Save.
To enable tax calculations
- Go to the Storefronts tab. Choose and click your storefront name to open your storefront record.
- Click Edit and set the Enable Tax Calculations flag to True.
- Click Save.
In Partner Commerce at the time of Quote creation or Order generation tax needs to be calculated for taxable line items or order line items. You must create a Tax Code and a Tax Certificate record.
To create tax code and tax certificate record
- Go to the Tax Code tab and click New.
- Enter aName for the tax code.
- In Code, enter the tax code provided by Avalara.
- Enter a meaningful Description for the tax code.
- Click Save. You can define this code in your price list item.
- Go to the Tax Certificate tab and click New.
- Enter aNumber for the tax certificate.
- Enter a meaningful Description for the tax certificate.
- Select the Effective Date and Expiration Date for the tax certificate.
- Click Save. You can define the newly created tax certificate in your Account object.
By default, not all products are taxable. To make a product taxable, you must set the Taxable flag to True and enter the tax code on the Price List Item.
To set up tax calculation
- Go to the Price List Item for the line item you want to calculate the tax for.
- Set the Taxable flag to True and enter theTax Code.
- Click Save.
Partner Commerce
In Partner Commerce, when you select a product that is taxable and you request a quote, the system calculates the tax and displays it into the cart. The breakup of the tax is defined in Salesforce from the line item level. The percentage of the tax breakup is passed on from Avalara. The mechanism here is that the API picks the account address and passes it to Avalara. Based on the region/address, Avalara passes tax percentage information which is then computed in Salesforce and displayed in the Tax Breakup object. Refer to the image below for the type of tax breakups populated on the Partner Commerce site.
Now when the order is generated, you get order tax breakup for orders and proposal tax break up for proposals. These tax breakups are attached to respective line items.
You must ensure that the Account object has a valid Billing and Shipping Address and the Tax certificate is defined.