# Reconciliation logic

The reconciliation is run to match 2 data sources. One is the e-invoice that is present with ClearTax, other is the SR or the PR data which is present in the customer's ERP. After matching, each invoice is categorised into different buckets based on logics mentioned below-

| Category                                                           | Logic                                                                                                                                                                                                         |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:green;background-color:green;">**Match**</mark> |                                                                                                                                                                                                               |
| <mark style="background-color:green;">Exact</mark>                 | If all the 13 fields match exactly on LHS and RHS                                                                                                                                                             |
| <mark style="background-color:yellow;">Suggested</mark>            | <p>- If all the document identifier fields match and one of the amount field does not match<br>- If all the amount fields match but one of the document identifier fields does not match</p>                  |
| Low                                                                | Threshold of amount mismatch is +1 MYR to -1 MYR                                                                                                                                                              |
| Medium                                                             | Threshold of amount mismatch is +5 MYR to -5 MYR                                                                                                                                                              |
| High                                                               | Threshold of amount mismatch is +15 MYR to -15 MYR                                                                                                                                                            |
| <mark style="color:red;background-color:red;">Mismatch</mark>      | <p>- If more than one of the document identifier fields does not match<br>- If the document identifier fields match but one or more of the amounts fields mismatch by a difference of more than +- 15 MYR</p> |
| <mark style="color:orange;">Missing</mark>                         |                                                                                                                                                                                                               |
| Missing in EInv                                                    | Present in sales data but not found in EInv data                                                                                                                                                              |
| Missing in Sales                                                   | Present in EInv data but not found in sales data                                                                                                                                                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleartax.in/product-help-and-support/for-large-businesses/cleartax-e-invoicing-malaysia/reconciliations/reconciliation-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
