> ## Documentation Index
> Fetch the complete documentation index at: https://zenskar.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Single-concept walkthrough: How third-party tax engines work

> This example-based document shows how your billing team moves the United States from the Zenskar tax engine to Avalara AvaTax.

## Story: moving the United States to Avalara AvaTax

Your company now has customers across the United States. Each state, city, and district can have its own sales tax, and these taxes change often. Maintaining a [tax rate](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#tax-rate) for each state, city, and ZIP-code range is too much work for your billing team. Your company connects [Avalara AvaTax](https://zenskar.com/docs/20260301/third-party-integrations/tax-automation/avalara-avatax/concepts.md) to the default [business entity](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#business-entity), because Avalara AvaTax keeps its own rates and rules for every address.

The story continues [End-to-end walkthrough: How tax configuration works](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/walkthroughs/tax-configuration.md). Your billing team moves the United States from the Zenskar [tax engine](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#tax-engine) to Avalara AvaTax. On the way, it puts these concepts into practice:

* [Third-party tax codes](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#third-party-tax-codes-how-a-third-party-tax-engine-identifies-a-tax-category)
* [Tax engines](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#tax-engines-who-calculates-tax-for-a-served-country)
* [Changed tax engines](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#changed-tax-engines)
* [Comparison of tax engines](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#comparison-of-tax-engines)

The story uses these values:

| Value | In the story |
| - | - |
| [Tax category](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#tax-category) | `SaaS subscription`, from the end-to-end walkthrough |
| [Avalara tax code](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#avalara-tax-code) of `SaaS subscription` | `SW054000` |
| [Served country](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#served-country) | United States, in USD |
| Tax engine of the served country | Before: the Zenskar tax engine. After: Avalara AvaTax. |
| Tax rate for San Francisco | From the end-to-end walkthrough. It stays, and has no effect while the United States uses Avalara AvaTax. |

The company and its customers are fictional. `SW054000` is an example of an Avalara tax code.

### Prerequisites

* You need a role with the **Can Read Organisation** and **Can Update Organisation Config** permissions. To open the business entity, you also need **Can Read Business Entity**.
* Avalara AvaTax must be connected to the default business entity. See [Connect Avalara AvaTax](https://zenskar.com/docs/20260301/third-party-integrations/tax-automation/avalara-avatax/how-to-guides.md#connect-avalara-avatax).
* The tax category, the served country, and the tax rate of the end-to-end walkthrough must exist. See [End-to-end walkthrough: How tax configuration works](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/walkthroughs/tax-configuration.md).

### Map the tax category to an Avalara tax code

Avalara AvaTax receives the Avalara tax code of a tax category, not the tax category itself. The billing team maps the code first, because Zenskar does not check the codes when the billing team changes the tax engine. Without the code, generating invoices for Acme Corp would fail.

1. Go to **Settings** > **Tax Configuration**. The **Tax Categories** tab opens. The list has an **Avalara Tax Code** column, because Avalara AvaTax is connected.
2. In the row of `SaaS subscription`, click **Map Avalara code**. A field for the code opens.
3. Enter `SW054000`, and click **Save**. The dashboard confirms the change, and the **Avalara Tax Code** column shows `SW054000`.

   A [third-party tax code](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#third-party-tax-codes-how-a-third-party-tax-engine-identifies-a-tax-category) is the identifier of the equivalent of a tax category in a third-party tax engine. Avalara AvaTax receives `SW054000`, and applies its own rules for that code. The billing team looks up the right code in the [catalog of Avalara tax codes](https://zenskar.com/docs/20260301/third-party-integrations/tax-automation/avalara-avatax/concepts.md#avalara-tax-codes-how-avalara-taxes-what-you-sell).

   A tax category has at most one Avalara tax code. That code applies in every business entity that uses Avalara AvaTax. The story has one tax category. If the company had more, the tax category of each of its [products](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product) would need an Avalara tax code before the change.

### Move the United States to Avalara AvaTax

1. Click the **Entities** tab. On the card of the default business entity, click **Configure**. The **Countries Serving** tab opens.
2. Open the menu of the row of **United States of America**, and click **Edit**. The **Edit Country** screen opens.
3. In **Tax Engine**, select **Avalara**. The screen notes that the change affects future invoices, and that the Zenskar tax rates stay configured.

   The [tax engine](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#tax-engines-who-calculates-tax-for-a-served-country) of a served country can be the Zenskar tax engine, or the third-party tax engine of the business entity. The screen offers **Avalara**, because the business entity has an [Avalara connection](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#avalara-connection).

   | Tax engine | Who keeps the rates for every address in the United States |
   | - | - |
   | Zenskar tax engine | The billing team, with a tax rate for each state, city, or ZIP-code range that has its own tax |
   | Avalara AvaTax | Avalara AvaTax |

   The billing team chooses Avalara AvaTax, so that it no longer maintains tax rates for the United States.
4. Click **Save Changes**. The dashboard confirms the change. The **Tool** column shows **Avalara** for **United States of America**.

   A [new tax engine](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#changed-tax-engines) applies to the invoices that Zenskar generates after the change. For each invoice, Zenskar [sends Avalara AvaTax](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/concepts/tax-configuration.md#how-a-third-party-tax-engine-calculates-tax) the Avalara tax code of the tax category, the default billing address of the customer, and the address of the business entity. For Acme Corp, Avalara AvaTax decides the percentage for `CA`, `San Francisco`, `94105`.

   The tax rate for San Francisco stays, and has no effect while the United States uses Avalara AvaTax. It applies again if the billing team changes the United States back to the Zenskar tax engine.

### Summary: what your billing team did

Your billing team mapped the tax category `SaaS subscription` to the Avalara tax code `SW054000`. It then moved the United States from the Zenskar tax engine to Avalara AvaTax. Avalara AvaTax now decides the tax for every customer in the United States, with its own rates and rules. The tax rate for San Francisco stays, and applies again if the billing team changes the United States back to the Zenskar tax engine.

See [Change the tax engine of a served country](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/how-to-guides.md#change-the-tax-engine-of-a-served-country).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.