# Typical ecommerce workflow

Source: https://developer.avalara.com/products/excise/integration-guides/excise/dsv8404295883496/

Guide: AvaTax Excise

# Typical ecommerce workflow

Learn the steps for managing tax calculations and transactions in an ecommerce workflow.

![Typical ecommerce workflow](https://knowledge-be.avalara.com/bundle/spc1256874390210_spc1256874390210/page/ntq7032373962985.image?_LANG=enus)

1.  When your customer opens a shopping cart and puts an item in it, call the ATE [CreateTransaction](https://developer.avalara.com/api-reference/excise/v1/methods/AvaTaxExciseController/AvaTaxExciseController_CreateTransaction/) API with and set `AvataxTransactionType` to `SalesOrder`. This will return a tax calculation based on your shipping address and the customer’s destination address, but it won't record a permanent transaction. You won’t have to do any cleanup for abandoned carts.
2.  When the customer finalizes the order, call [CreateTransaction](https://developer.avalara.com/api-reference/excise/v1/methods/AvaTaxExciseController/AvaTaxExciseController_CreateTransaction/) again with `AvataxTransactionType` set to `SalesInvoice`.
3.  When your order ships, call the [CommitTransaction](https://developer.avalara.com/api-reference/excise/v1/methods/AvaTaxExciseController/AvaTaxExciseController_CommitTransaction/) API to mark the transaction as committed. This will prevent accidental changes to the transaction and allow you to include it in a Managed Returns Services tax session.