Avalara tax calculation API call
Describes the Avalara tax calculation API call elements in Optimizely Configured Commerce.
Optimizely Configured Commerce 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 | Table.Field | Avalara Element | Notes |
Order Header | |||
Company Code | Application Setting ='TaxCalculator_Avalara_CompanyCode' | <CompanyCode> | |
Document Type | Static Value = 'SalesOrder' | <DocType> | |
Document Code | CustomerOrder.OrderNumber | <DocCode> | |
Document Date | CustomerOrder.OrderDate | <DocDate> | |
Customer # | CustomerOrder. CustomerNumber | <CustomerNumber> | |
Discount | CustomerOrder.PromotionOrderDiscountTotal + 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.* JOIN CustomerOrder.Warehouse = Warehouse.Name
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 THEN Replicate Origin Address in Destination Address 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> |
Updated over 1 year ago