# Transaction matching

Source: https://developer.avalara.com/transaction-reconciliation/hwr7665138978007/

# Transaction matching

Understand how AvaTax matches transactions to your ERP using document codes and key transaction fields.

Transactions are matched between systems using the document code. In AvaTax, the primary matching field is the `code` field. The corresponding transaction identifier in the ERP varies by system and must be mapped to the AvaTax document code.

The following AvaTax fields are used during matching and discrepancy detection:

Field

Description

Purpose

`code`

Document code

Primary matching key

`date`

Transaction date

Period alignment

`totalAmount`

Pre-tax transaction total

Amount matching

`totalTax`

Calculated tax amount

Tax variance detection

`status`

Transaction status

Saved, Posted, Committed, Canceled

`type`

Document type

SalesInvoice, ReturnInvoice, and so on.

Accurate document code mapping is required to ensure that transactions are properly aligned between the ERP system and AvaTax.

Note

Reconciliation requires that transactions be saved in AvaTax as invoice-type documents, such as sales invoice or return invoice. Order transactions that are not saved as invoices in AvaTax aren’t included in reconciliation results.