Skip to content
Log in

Avalara AvaTax

On this page

StoreConnect supports calculating taxes using your Avalara AvaTax account. 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.

Create an Avalara account

This feature requires an Avalara account. Sign up with Avalara if you don’t already have an account.

Connect StoreConnect to AvaTax

:::note A Tax Provider applies only to the stores that point at it. The link lives on the Store record, in its Tax Provider field, not on the Tax Provider itself. Create one Tax Provider per Avalara account, then set that field on each store that should use it. A store with no Tax Provider selected calculates no AvaTax on any channel, even when an active Tax Provider exists in the org. :::

To connect StoreConnect to your Avalara account, create a Tax Provider record:

  1. Search for the record type Tax Providers and select New.
  2. Choose Avalara from the Provider list.
  3. Configure the Tax Provider details as follows:
    • Active: when checked, Avalara will be used to calculate taxes. Uncheck to disable Avalara and use the built-in StoreConnect tax calculation.
    • Company Code: this is an Avalara code to identify the Company you are configuring. If not supplied, uses the default code set in Avalara.
    • Default Freight Tax Code: the AvaTax System Tax Code applied to the shipping line on every order. Refer to the AvaTax tax code catalog for the correct code.
    • Block Transactions When Offline: If AvaTax is unavailable, should transactions be blocked? If unchecked, transactions will be allowed and taxes will fall back to your store’s local tax configuration (or zero if no local taxes are set up). If checked, transactions will be blocked and an error message will be displayed to the user.
    • Block Transactions Markdown: This is the error message displayed to the user when transactions are blocked due to AvaTax being unavailable.
    • Channels: select which sales channels this tax provider applies to — Web, POS, or both. Channels is required. A provider set to Web only will not calculate taxes on POS transactions (and vice versa). Select both if you want AvaTax to apply to all channels.
  4. Enter the API Info:
    • API Mode: controls which AvaTax endpoint is used. Enter production (exact value, case-sensitive) to connect to the live AvaTax service. Enter sandbox or leave blank to use the AvaTax sandbox endpoint for testing.
    • API Key: this is your Avalara Account Number
    • API Secret: this is the License Key for your Avalara account
  5. Enter a fallback address. This is used if a product has no stock location, a product has no stock locations matching the tax provider’s country, a product stock location address is incomplete.
  6. Add any advanced configuration options in the Configuration Options field. (See details below)
  7. Save the record.

Then point each store at it:

  1. Open the Store record.
  2. Set Tax Provider to the record you just created.
  3. Save the store.

Repeat for every store that should use this provider. This step is what activates AvaTax; creating the Tax Provider on its own has no effect on any store.

:::warning A store with no Tax Provider selected calculates no AvaTax at all, on web and POS alike, and gives no error. Unless the products are set up to use StoreConnect’s built-in tax calculation, orders simply complete with a tax amount of zero. If tax is missing everywhere, check this field on the store before investigating credentials or tax codes. :::

:::note If you ship from multiple locations, you do not need a separate Tax Provider record per location. AvaTax determines the ship-from address for each line item from that product’s own Stock Location record — which has its own address — so a single Tax Provider already handles multiple shipping locations correctly. The fallback address entered in step 5 above is only used when a product’s Stock Location can’t supply a usable address; it is not a way to configure per-location tax behavior. :::

Shipping tax

Shipping tax is controlled by the Tax Provider’s Default Freight Tax Code, not by the Tax Code field on the StoreConnect Shipping product record. Any value set on the Shipping product’s Tax Code is ignored.

Advanced configuration options

These options only need to be set if you intend to override the default value. They should be on their own line and should follow a YAML format: “{option_name}: {option value}”. Here are the available options:

Option Name Expected Value Default Value Setting Effect
commit_transactions true or false false If true commits all transactions in Avalara. Not applicable when disable_invoices is true
disable_invoices true or false false If true, does not create transactions in Avalara for invoices
log_requests true or false false If true, turns logging on. All API requests and responses will be logged in the Tax Provider Log object
log_limit integer 1000 Sets the number of rows to keep in the log. When the log reaches the limit, the oldest rows will be deleted

Test and sandbox credentials

Use sandbox (or leave the field blank) while testing, then change the value to production when you are ready to go live. The value production must be entered exactly as shown — it is case-sensitive.

Assign a tax exempt category on the Account record

Use Tax Entity Code on the Account record to assign an Avalara tax exempt category to an existing customer. Select one of the options from the picklist.

Assign a tax code on the Product record

Use Tax Code on a Product record to assign an AvaTax System Tax Code to a Product. Any tax code you assign will be passed through to AvaTax for tax calculation. If you do not assign a tax code, AvaTax’s default tax code will be used. To see a listing of all available AvaTax System tax codes, visit taxcode.avatax.avalara.com.

Set the tax method on a Price Book

When Avalara calculates tax, it needs to know whether your prices already include tax or whether tax should be added on top. This is controlled by the Tax Method field on a Price Book or Price Book Entry.

  • Inclusive — your prices already include tax; Avalara will back-calculate the tax portion.
  • Exclusive — your prices do not include tax; Avalara will add tax on top.

If neither the Price Book Entry nor the Price Book has a Tax Method set, Avalara treats prices as exclusive by default (tax added on top). For stores that display or charge tax-inclusive prices, leaving this field blank will cause incorrect order totals.

The resolution order is:

  1. Tax Method on the Price Book Entry (most specific — overrides the Price Book).
  2. Tax Method on the Price Book (applies to all entries that don’t have their own override).
  3. If neither is set, prices are treated as tax-exclusive.

Note: The Tax Zone field on a Price Book is not used by Avalara. Avalara determines tax jurisdiction from the ship-from and ship-to addresses on the order, not from zones. Leave Tax Zone blank when using Avalara as your tax provider.

Set a product code on the Shipping Product record

StoreConnect has a dedicated ‘shipping’ product that is assigned to Shipping line items - SHIP001. This is the product code sent to AvaTax to identify the line; it is separate from the tax code applied to the shipping line.

Tax Provider information is not available in Liquid

There is no Liquid object for Tax Provider, and the Tax object (available via cart.taxes and order.taxes) does not reference which Tax Provider produced it — it only exposes name, rate, and zone. A theme cannot detect which Tax Provider calculated a cart or order’s tax, or distinguish between multiple Tax Providers if more than one exists in the org.

Decide what happens when AvaTax is unreachable

AvaTax is a live call to an external service, so a register or storefront that cannot reach it has to do something. Block Transactions When Offline decides which, and the two settings suit different businesses.

Setting What happens when AvaTax cannot be reached
Unchecked The sale completes. Tax falls back to the store’s local tax configuration, or to zero if no local taxes are set up.
Checked The sale is blocked and Block Transactions Markdown is shown to the operator or customer.

Neither is safer in general, so choose against your own risk:

  • Unchecked keeps you trading through an outage, but you may collect no tax on those sales and have to correct them afterwards. Set up local taxes as a fallback if you take this route, otherwise the fallback really is zero.
  • Checked guarantees you never undercharge tax, at the cost of stopping sales during an outage. On a POS register this means staff cannot complete a transaction in front of a waiting customer.

:::note This matters more on POS than on the web. A register is expected to keep working when the connection drops, and most other POS payment methods do. AvaTax is one of the few things that genuinely cannot work offline, because the calculation happens at Avalara. :::

Test both behaviors before you go live

Testing this is worth doing deliberately, because the failure only appears when the connection fails.

  1. Open the Tax Provider record and note the current Block Transactions When Offline setting.
  2. On the device you want to test, disconnect it from the network. In a browser, the network throttling option in the developer tools has an Offline mode, which affects only that tab.
  3. Build a cart and go to payment.
  4. With the setting unchecked, confirm the sale completes and check what tax was applied. Zero tax here means you have no local tax fallback configured.
  5. With the setting checked, confirm the sale is blocked and that your Block Transactions Markdown message is the one staff actually see. Write that message for the person reading it: say what to do next, not just that something failed.
  6. Reconnect and confirm normal calculation resumes.

Test the connection

Once you have configured your store to use Avalara, you can test the connection to ensure everything is working properly. Use the Test button in the Connectivity panel on the Tax Provider record page. If the connection is successful, you will see a message indicating the connection was successful. If the connection is not successful, you will see an error message indicating the problem.

Troubleshooting the tax provider

AvaTax won’t work without these set in the provider record:

  • API Key and API Secret — authentication, no fallback
  • API Mode — determines the endpoint called sandbox or production. These have to be entered exactly to work as intended.
  • Active checkbox — AvaTax is bypassed entirely if unchecked

Shipping line is still being taxed after setting a Tax Code on the StoreConnect Shipping product

Shipping tax is sourced from the Default Freight Tax Code field on the Tax Provider record, not the Tax Code field on the StoreConnect Shipping product. The Tax Code on the Shipping product is not consulted for the shipping line. To change shipping tax behavior; for example, to make shipping non-taxable, or to apply a specific freight tax code, set the appropriate AvaTax code on the Tax Provider’s Default Freight Tax Code field, then re-test checkout.

Was this article helpful?

Was this article helpful?