> Documentation index: [Saleor](/llms.txt) · [This section](/developer/llms.txt)
> Source: https://docs.saleor.io/developer/app-store/apps/avatax/tax-codes

# Tax Code Mapping

AvaTax App offers a solution for mapping the provider tax codes to Saleor tax classes. This assures the products are taxed based on their individual tax rates, not a general one.

To illustrate the feature, imagine you are running a book store that sells comic books.

You first create the "_Comic books_" Saleor tax class (_Configuration_ → _Taxes_ → _Tax classes_ in the Dashboard) and assign it to comic book products or their variants.

In the _Tax code matcher_ section of the AvaTax App, you will find your "Comicbook" tax class. You browse the tax codes of your tax provider and assign the correct one to the Saleor tax class. In AvaTax, that tax code may be "PB100817 - Comicbooks". The selected tax code will appear on the product line in AvaTax when the transaction is created.

If AvaTax App didn't find mapping between Saleor tax class and AvaTax tax code it will send `P0000000` as tax code to AvaTax. You can find more information about AvaTax default tax code in AvaTax [documentation](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Avalara_tax_codes.html).

This feature can be used to also cover additional fees for an order. In the example below, we explain how to cope with one of them: [Colorado Retail Delivery Fee](https://tax.colorado.gov/retail-delivery-fee).

<a id="example-colorado-retail-delivery-fee-in-avatax"></a>

## Example: Colorado Retail Delivery Fee in AvaTax

[Colorado Retail Delivery Fee](https://tax.colorado.gov/retail-delivery-fee) is a fee charged by the state of Colorado for the delivery of retail goods. Let's explore how we can make sure the fee is included in the tax calculation done by AvaTax.

1.  Create a new tax class in Saleor and name it "_Colorado Retail Delivery Fee_".
    
    Go to _Configuration_ → _Taxes_ → _Tax classes_ in the Dashboard and click _Create class_. Name the tax class "_Colorado Retail Delivery Fee_", don't set any tax rates and click _Save_.
    
2.  Create a product in Saleor and assign the "_Colorado Retail Delivery Fee_" tax class to it.
    
    Before you create the product, you will be asked to choose a product type for it. You can assign tax classes to either products or their types.
    
    This means you can go two ways from here:
    
    -   Create a new product type, assign it the "_Colorado Retail Delivery Fee_" tax class and then assign the product type to the product.
    -   Use an existing product type and assign the "_Colorado Retail Delivery Fee_" tax class directly to the product.
    
    The product should have the price of "0" and "Track Inventory" set to "false".
    
    While creating the product, we also suggest checking the "_Hide in product listings_" box in the "_Availability_" section. This way, the product won't be visible in the search and category pages.
    
3.  Go to the _Tax code matcher_ section of the AvaTax App and find the "_Colorado Retail Delivery Fee_" tax class.
    
    You can also look for it in the [Avalara Tax Codes Search](https://taxcode.avatax.avalara.com). The tax code for the Colorado Retail Delivery Fee is "OF400000 - Colorado retail delivery fee".
    
4.  Assign the "_Colorado Retail Delivery Fee_" tax code to the "_Colorado Retail Delivery Fee_" tax class.
    
5.  Create a new order in Saleor and add the "_Colorado Retail Delivery Fee_" product to it.
    
    If the order matches the conditions for the Colorado Retail Delivery Fee, you can add the product manually or do it automatically with the API.
    

<a id="tax-exemption"></a>

## Tax exemption

To set up a tax-exempt product, assign it to the correct tax class and specify the appropriate tax code in the AvaTax application.

1.  Create a new tax class named "_Tax exempt_" in Saleor.
    
    Go to _Configuration_ → _Taxes_ → _Tax classes_ on the Dashboard. Click _Create class_. Name the tax class "_Tax exempt_", leave the tax rates empty, and click _Save_.
    
2.  Assign the tax class to a product or product type.
    
    To update a product's tax class, navigate to _Products_ → _Product details page_ and select the tax class from the dropdown list.
    
    To update a product type's tax class, go to _Configuration_ → _Product Types_ → _Product type details page_ and select the tax class from the dropdown list.
    
3.  In the AvaTax App, go to the _Tax code matcher_ section, locate the "_Tax exempt_" tax class, and paste the Avalara Tax Code for tax-exempt products.
    

<a id="item-code-mapping"></a>

## Item Code Mapping

Avalara requires both `itemCode` and `taxCode` to properly calculate taxes that is why AvaTax App uses [Saleor product information](/developer/products/overview.md#product-and-variants) to compute `itemCode`. App will try to get item code based on:

1.  Saleor product variant sku
2.  Saleor product variant id
3.  Fallback to empty item code
