---
title: Avalara Tax calculation API call
slug: configured-commerce/api/8uw5-avalara-tax-calculation-api-call
docTags: 
createdAt: 2026-06-24T15:18:00.097Z
---

This topic provides an overview of the Avalara API used to display a tax quote to the user before finalizing their checkout process.

**Method: Real-time call Avalara API**

Optimizely will make a real-time call to the Avalara API during the transition between the Addresses Page to the Review and Pay Page, but only if the Order Simulation call is bypassed or not made.  This will allow Configured Commerce to display a tax quote to the user before finalizing their checkout process.  The call to Avalara will only be a quote call; nothing will be written into the Avalara system.

| **Field Mapping: Avalara SOAP TaxSvc.GetTax API - Request**   |                                                                                                |                    |                                                                                                                                               |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Field Name                                                    | ISC Table.Field                                                                                | Avalara Element    | Notes                                                                                                                                         |
| ---                                                           | ---                                                                                            | ---                | ---                                                                                                                                           |
| **Order Header**                                              |                                                                                                |                    |                                                                                                                                               |
| Company Code                                                  | Application Setting ='TaxCalculator\_Avalara\_CompanyCode'<br />Setting = Company Code         | `<CompanyCode>`    |                                                                                                                                               |
| Document Type                                                 | Static Value = 'SalesOrder'                                                                    | `<DocType>`        |                                                                                                                                               |
| Document Code                                                 | CustomerOrder.OrderNumber                                                                      | `<DocCode>`        |                                                                                                                                               |
| Document Date                                                 | CustomerOrder.OrderDate                                                                        | `<DocDate>`        |                                                                                                                                               |
| Customer #                                                    | CustomerOrder. CustomerNumber                                                                  | `<CustomerNumber>` |                                                                                                                                               |
| Discount                                                      | CustomerOrder.PromotionOrderDiscountTotal +<br />CustomerOrder.Promotion.ShippingDiscountTotal | `<Discount>`       |                                                                                                                                               |
| **Order Lines**                                               |                                                                                                |                    |                                                                                                                                               |
| Line Discounted                                               |                                                                                                | `<Discounted>`     |                                                                                                                                               |
| Line #                                                        | OrderLine.Line                                                                                 | `<No>`             |                                                                                                                                               |
| ERP Item #                                                    | OrderLine.ProductName                                                                          | `<ItemCode>`       |                                                                                                                                               |
| QTY Ordered                                                   | OrderLine.QtyOrdered                                                                           | `<Qty>`            |                                                                                                                                               |
| Extended Price                                                | OrderLine.ExtendedActualPrice                                                                  | `<Amount>`         |                                                                                                                                               |
| Tax Code                                                      | OrderLine.TaxCode1                                                                             | `<TaxCode>`        |                                                                                                                                               |
| Description                                                   | Product.ShortDescription                                                                       | `<Description>`    |                                                                                                                                               |
| Order Line - Freight (Created if Freight is Applied to Order) |                                                                                                |                    |                                                                                                                                               |
| Line Discounted                                               | CustomerOrder. PromotionShippingDiscountTotal                                                  | `<Discounted>`     |                                                                                                                                               |
| Line #                                                        | StaticValue ='Freight'                                                                         | `<No>`             |                                                                                                                                               |
| ERP Item #                                                    | StaticValue ='Freight'                                                                         | `<ItemCode>`       |                                                                                                                                               |
| QTY Ordered                                                   | StaticValue ='1'                                                                               | `<Qty>`            |                                                                                                                                               |
| Extended Price                                                | CustomerOrder.FullShippingCharge - CustomerOrder. PromotionShippingDiscountTotal               | `<Amount>`         |                                                                                                                                               |
| Tax Code                                                      | Application Setting ='TaxCalculator\_Avalara\_FreightTaxCode'                                  | `<TaxCode>`        |                                                                                                                                               |
| Description                                                   | Product.ShortDescription                                                                       | `<Description>`    |                                                                                                                                               |
| **Origin Address**                                            |                                                                                                |                    |                                                                                                                                               |
| Address Line 1                                                | Warehouse.Address1                                                                             | `<Line1>`          | FOR Warehouse.\*<br />JOIN CustomerOrder.Warehouse = Warehouse.Name<br />**NOTE:** Dependent on 'User Order Warehouse for Tax Origin Address' |
| Address Line 2                                                | Warehouse.Address2                                                                             | `<Line2>`          |                                                                                                                                               |
| City                                                          | Warehouse.City                                                                                 | `<City>`           |                                                                                                                                               |
| State                                                         | Warehouse.State                                                                                | `<Region>`         |                                                                                                                                               |
| Zip                                                           | Warehouse.Zip                                                                                  | `<PostalCode>`     |                                                                                                                                               |
| Country                                                       | Warehouse.ShipSite                                                                             | `<Country>`        |                                                                                                                                               |
| **Destination Address**                                       |                                                                                                |                    |                                                                                                                                               |
| Address Line 1                                                | CustomerOrder.STAddress1                                                                       | `<Line1>`          | IF Ship Via = Store Pick-Up<br />THEN Replicate Origin Address in Destination Address<br />ELSE use CustomerOrder.ST\*                        |
| Address Line 2                                                | CustomerOrder.STAddress2                                                                       | `<Line2>`          |                                                                                                                                               |
| Address Line 3                                                | CustomerOrder.STAddress3                                                                       | `<Line3>`          |                                                                                                                                               |
| City                                                          | CustomerOrder.STCity                                                                           | `<City>`           |                                                                                                                                               |
| State                                                         | CustomerOrder.STState                                                                          | `<Region>`         |                                                                                                                                               |
| Zip                                                           | CustomerOrder.STZip                                                                            | `<PostalCode>`     |                                                                                                                                               |
| Country                                                       | CustomerOrder.STCountry                                                                        | `<Country>`        |                                                                                                                                               |
