Avalara accounts
The Avalara account object and the allowed CRUD operations on the related resource endpoint
Configure your Avalara account to automatically compute tax calculations for the orders of the associated market. Set the username, password, and company_code attributes with your Avalara credentials.
You can also set the following optional attributes:
commit_invoice— set it totrueto have transactions recorded and visible on the Avalara website (more details here).ddp— set it totrueif the seller is responsible for paying customs duty and import tax to customs authorities, a.k.a. Delivered Duty Paid (more details here).pass_tax_exemption_code— set it totrueto let Avalara determine taxes for tax-exempt customers (more details here).
Configuration guide
Avalara AvaTax is a cloud-based solution automating transaction tax calculations and the tax filing process. Avalara provides real-time tax calculation using tax content from more than 12,000 US taxing jurisdictions and over 200 countries, ensuring your transaction tax is calculated based on the most current tax rules.
AvaTax is integrated with Commerce Layer as a tax calculator that connects to one or more markets. Once connected, every order placed in that market is taxed by Avalara in real time.
Connect to AvaTax
In Commerce Layer, AvaTax is added as a tax calculator from the organization's Settings:
Go to Settings › Tax calculators.
Click + New, then select the Avalara tile from the list of integrated tax calculators.
Enter your Avalara AvaTax credentials and click Create.

Account ID
The Avalara account number provided during your AvaTax account activation.
License Key
The Avalara software license key provided during activation.
Company code
The company profile identifier configured in the AvaTax Admin Console.
Record sales invoice on Avalara
When enabled, transactions are posted and committed to the AvaTax Admin Console for record keeping (equivalent to Enable Document Committing / Submission).
Delivered Duty Paid
Enable when the merchant, rather than the customer, is responsible for import duties and taxes on cross-border shipments.
Assign the tax calculator to a market
AvaTax only calculates tax for orders placed in a market that has this tax calculator assigned. Go to Settings › Markets, open a market, click Edit, and select the Avalara tax calculator under Automation.

Assign an AvaTax System Tax Code to a product
Commerce Layer maps individual SKUs to Avalara tax codes through tax categories, managed from the same tax calculator's Tax categories tab. This is the equivalent of assigning a product-level tax code in AvaTax.

To create a new tax category from the Dashboard:
Click + Category.
Enter the SKU code to categorize.
Enter the corresponding AvaTax System Tax Code.
Click Create.

Tax exemptions and address validation
By default, when an order's customer has a tax_exemption_code, tax calculation is skipped altogether: Avalara isn't called and the order isn't taxed. Any taxes previously calculated on the order are cleared at the next order refresh.
Address validation happens as part of the real-time AvaTax calculation call made at checkout for every order in a connected market.
Pass the exemption code to Avalara
To let Avalara handle exemptions instead, set the pass_tax_exemption_code attribute of the Avalara account to true. It's a setting of the account, so you set it once when creating or updating the account, with no action required on orders or customers.
From then on, Avalara is called as usual for exempt customers too, and the customer's tax_exemption_code is sent as the transaction's entity use code (e.g. G for resale). Avalara determines the taxes, including partial exemptions by jurisdiction or product, and the order taxes reflect its response. If commit_invoice is true, the exempt transaction is also recorded on Avalara.
Validate the exemption code
To check a customer's code before taxes are calculated, update the order with the _validate_tax_exemption_code trigger attribute set to true. The check runs only when you request it, so it never prevents an order from being placed.
If pass_tax_exemption_code is enabled, the code is checked against Avalara's standard entity use codes (including the countries each one applies to) and the custom ones found in your Avalara company's tax rules, when your credentials can read them. The request returns 422 if the code isn't valid for the order's country, or if Avalara can't be reached to verify it. Otherwise, as with any other tax calculator or with the option disabled, the order is updated as usual.
Last updated

