Skip to main content
Version: 3.x

Mapping tax codes

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.

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.

Example: Colorado Retail Delivery Fee in AvaTax​

Colorado 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.

  1. 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.

  1. 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. The tax code for the Colorado Retail Delivery Fee is "OF400000 - Colorado retail delivery fee".

  1. Assign the "Colorado Retail Delivery Fee" tax code to the "Colorado Retail Delivery Fee" tax class.

  2. 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.


Was this page helpful?