# Transaction workflow with posting process

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/design-transaction-workflow/erp-workflow-with-posting/

# Transaction workflow with posting process

![](https://www.avalara.com/content/dam/assets/illustrations/diagrams/erp-with-posting.png)

1.  After a quote is entered onto your site, call the [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) with `type` set to `SalesOrder`. This will get you a tax calculation based on your shipping address and the customer’s destination address, but it will not record a permanent transaction, so you won’t have to do any cleanup for abandoned carts.
2.  Review the invoice entry, then call `CreateTransaction` again with `type` set to `SalesInvoice` and `commit` set to `false`. This will get you a tax calculation based on your shipping address and the customer’s destination address, but it will not record a permanent transaction.
3.  Review your policy for posting to the General Ledger, then post the transaction.
4.  Once posted, call `CreateTransaction` again with `type` set to `SalesInvoice` and `commit` set to `true`. This will record the transaction permanently and allow you to fetch it back later with the [GetTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/GetTransactionByCodeAndType/).

[Previous](/avatax-dm-combined-erp/sales-tax-badge/design-transaction-workflow)

[Next](/avatax-dm-combined-erp/sales-tax-badge/design-transaction-workflow/erp-workflow-without-posting)