Avalara - Configuration guide
1. Pre-requisites
Before you dig in your tax journey, be sure that you have the bellow ready with your OneStock Business Analyst.
An Order in Store saleschannel configured
Stores with US addresses
A payment provider configured and payment devices for the stores
Returns and refunds are configured for the Order in Store saleschannel
You will also need an access to an Avalara account. Our qualif environment is linked to Avalara in Sandbox so make sure to request this access to your Avalara contact.
2. Global tax configuration
Removed Line Item States : states of removed line items. When items are removed before the order is fulfiled, the tax provider needs to know that it has to commit a document without the items that have been cancelled by the client.
Commitable Parcel States : states of the parcels that needs to be commited
On you order, parcel and line item group workflows, you will have a new action : refresh_order_taxes.
This action will check that all your parcels are in the commitable parcel states that you’ve configured and that remaining items are in the removed line Item States to refresh the taxes in Avalara.
This is done to avoid unnecessary updates in Avalara.
Estimation Stock location : Stock location to be used for tax calculation as the source of stock. It can be overrided by sales channel.
Taxes Included In Price : Taxes are calculated and we display full prince including taxes. It can be overrided by sales channel.
3. Sales Channels tax configuration
Estimation Stock location : Stock location to be used for tax calculation as the source of stock
Taxes Included In Price : Taxes are calculated and we display full prince including taxes.
4. Configuring Avalara as the tax provider
Add Avalara as your tax provider in your sales channel configuration
You’ll have to do it for your Order In Store sales channel but also for the e-commerce sales channel if you are about to commit the taxes for all the client’s orders.
Our OneStock qualification environment is connected to Avalara sandbox.
Username : your Avalara identifier
Password : your Avalara password
After inputting your credentials, hit test connection
AvaTax Account Number
AvaTax Company Id
Find those two informations in your Avalara account
Disable tax recording at Avalara : if activated, OneStock will never commit the taxes
Avatax Company code : if your test connection has been done, a dropdown will display available value from your Avalara account
Location code : the location code (defined at Avalara) used by default if not defined at stock location level. To defined at stock location level you can go to the stock location detail page on the Taxes tab
Use endpoint identifier as location code : If activated, it will force the stock location id as the location code over the sales channel configuration and the stock location configuration.
Features language : The features language where we will search for the item data for HS Code, Item description, and Tax code
Default description : default description for items if not defined in the item feature
Description feature : name of the feature of the item which contains the description
Default HS Code : Default Harmonized System code for products if the item does not contain the HS Code feature configured bellow.
HS Code feature : name of the product feature sent to OneStock that describe the HS code to use for this product
Default Tax Code : Default tax code for items if not defined in the item feature.
Tax code feature : Name of the feature of the item which contains the tax code.
Click here to find valid tax codes
Shipping fees : configure which tax code and item code needs to be used for all your delivery options on the Order In Store
5. Configure your workflow to trigger taxes calls
To correctly update your taxes at the correct timing, you will have to add some action on your project workflows.
We’ve introduced 3 actions to be added in different parts of your workflows. Bellow we describe our recommendation for basic implementation of the taxes on where you should add those actions.
5.1 refresh_order_taxes
Workflows : order parcel line item groups
Allow to create or refresh a tax document for the order linked to the entity of your workflow.
Should be used to update taxes for direct capture payments. In case of deferred capture, the payment service will automatically request for the tax refresh.
The refresh will only be done for orders that are in final states, see 2.2 configuration above.
5.2. refund_order_taxes
Workflows : line item groups
Allow to refund taxes that have already been committed.
Use case to implement is for returns.
The action will not work on an order in store.
5.3 void_order_taxes
Workflows : order
Allows to delete a tax document for an uncommited tax.
Use case is for an order that is removed without being orchestrated.
6. Sending Avalara tax information with new orders
In order for OneStock to commit / void taxes that an ecommerce has declared but not committed to Avalara, the order data needs some additional informations.
Field | Description |
|---|---|
order.taxes_information.provider_transaction_id string - mandatory | The transaction id in Avalara. |
order.taxes_information.exemption_code string - optional | If there is a tax exemption for this order |
order.shipping_fees[].taxes[].id Array object - optional | The id for the shipping fee line in Avalara In Avalara, the shipping fee is declared as an order line item. We use this to correctly commit and update the shipping fee taxes. |
order.order_items[].pricing_details.taxes[].id string | The line id for each item in Avalara |
7. Limitations
7.1 Migration between environements
12.6 At the moment, global configurations can be migrated between environments but Sales Channel configurations and providers configured for them are not migrated