About Document Matching Sequence in Background Matching
Background Matching reduces the manual effort required to match various documents.
In manual cash matching, the Cash Matching page allows you to manually select all the documents to match together. For example, selecting cash entries as source documents and relevant sales invoices and credit notes as target documents, as shown below:
Document Number | Document Value | Paid |
---|---|---|
CSH000001 | 400 | 400 |
CSH000002 | -40 | -40 |
Document Number | Document Value | Paid |
---|---|---|
SIN000001 | -100 | -100 |
SIN000002 | -200 | -200 |
SIN000003 | -150 | -150 |
SCR000001 | 60 | 60 |
SCR000002 | 30 | 30 |
In background matching, the document matching sequence is used to match the documents in the background.
For information on the steps of background matching, see Running Background Matching.
The Document Matching Sequence field on the Background Matching window displays different flows, such as Cash Refund to Cash Receipt, Cash Refund to Journal, Cash Receipt to Invoice, and more. When you select these flows and start the background matching process, the documents are matched according to the order of the flows selected.
For example, if your selected order is as follows:
- Cash Receipt to Invoice
- Cash Refund to Credit Note
- Credit Note to Invoice
- Cash Refund to Cash Receipt
The process first matches the relevant cash receipts to the invoices. Once it is completed, it matches the cash refunds to the credit notes, then any remaining credit notes to any remaining invoices, and lastly any remaining cash refunds to any remaining cash receipts.
The other condition that decides successful matching in background is matching documents based on customer reference or document number.
Background Matching Based on Customer Reference
You can use unique reference values to match documents. Either assign a unique reference value to the source document and assign that same value to all the relevant target documents or assign different reference values to all the target documents and assign those reference values to the source document.
To assign the references, use the following fields:
- Customer Reference field in invoices, negative invoices, and credit notes
- Account Reference field in cash entry lines and journal lines
Matching based on customer reference works with all sequences, including scenarios where more than two types of document are involved. Assigning the same reference to all documents involved, ensures the correct matches are completed.
The Account Reference field value is Ref01 on:
- Cash receipt CSH000001 of $400
- Cash refund CSH000002 of $40
The Customer Reference field value is Ref01 on:
- Sales invoices SIN000001 of $100, SIN000002 of $200, and SIN000003 of $150
- Sales credit notes SCR000001 of $60 and SCR000002 of $30
The selected order of the document matching sequence is as follows:
- Cash Receipt to Invoice
- Cash Refund to Credit Note
- Credit Note to Invoice
In the First Match By field, “Customer Reference” is selected. The Allow Partial Payment? checkbox is selected.
When the background matching starts for the selected flows, documents are matched as follows:
- CSH000001 of $400 is matched to SIN000002 of $200, SIN000003 of $150, and SIN000001 of $100. This match leaves $50 available in SIN000003.
- CSH000002 of $40 is matched to SCR000001 of $60. This match leaves $20 available in SCR000001.
- SCR000001 of $20 and SCR000002 of $30 are matched to SIN000003 of $50.
All documents are matched completely without leaving any outstanding value.
Document Type | Document Number | Document Value | Paid | Outstanding Value | Matching Status |
---|---|---|---|---|---|
Cash Receipt | CSH000001 | 400 | 400 | 0 | Matched |
Sales Invoice | SIN000001 | -100 | -100 | 0 | Matched |
Sales Invoice | SIN000002 | -200 | -200 | 0 | Matched |
Sales Invoice | SCR000003 | -150 | -150 | 0 | Matched |
Cash Refund | CSH000002 | -40 | -40 | 0 | Matched |
Sales Credit Note | SCR000001 | 60 | 60 | 0 | Matched |
Sales Credit Note | SCR000002 | 30 | 30 | 0 | Matched |
Background Matching Based on Document Number
Background matching based on document number is recommended when only two types of document are involved, for example, when matching a cash entry to sales invoices only, or a journal to credit notes only. To match by document number, assign relevant document numbers to the cash entry line or a journal line.
The following are the ways to assign documents to a cash entry line:
- When using the Cash Entry Lightning record page, perform either of the following:
- In the Account Reference field, enter the relevant document numbers. You can enter up to 25 document numbers.
- On the Select Documents window, select the relevant documents. We recommend that you select a maximum of 1000 document numbers to avoid any discrepancies in matching.
- When using APIs or Datastream, perform either of the following:
- In the Account Reference field, enter the relevant document numbers. You can enter up to 25 document numbers.
- In the Documents to Match field, enter the relevant document numbers. We recommend that you enter a maximum of 1000 document numbers to avoid any discrepancies in matching.
To assign document numbers to a journal line, use the Account Reference field of the journal line.
When more than two types of document are involved, background matching based on document number is not recommended.
The cash receipt CSH000001 of $400 is to be matched to SIN000002 of $200, SIN000003 of $150, SIN000001 of $100, SCR000001 of $60, SCR000002 of $30, and CSH000002 of $40. All these document numbers are assigned to the Account Reference field or selected by clicking in the Documents to Match field of the cash entry line. The documents appear as below:
SIN000001|SIN000002|SIN000003|SCR000001|SCR000002|CSH000002
The selected order of the flows is:
- Cash Receipt to Invoice
- Cash Refund to Credit Note
- Credit Note to Invoice
“Document Number” is selected in the First Match by field.
Allow Partial Payment? checkbox is selected.
When the Background Matching starts, the documents are matched in the following manner:
- CSH000001 of $400 is matched to SIN000002 of $200, SIN000003 of $150, and SIN000001 of $100. This match leaves $50 available to match in SIN000003.
Once the initial flow completes, the other flows do not find relevant matches because the document numbers are mentioned only in the Account Reference field of the cash receipt. The other documents, such as the cash refund, credit notes and invoices do not have the relevant document numbers.
Document Type | Document Number | Document Value | Paid | Outstanding Value | Matching Status |
---|---|---|---|---|---|
Cash Receipt | CSH000001 | 400 | 400 | 0 | Matched |
Sales Invoice | SIN000001 | -100 | -100 | 0 | Matched |
Sales Invoice | SIN000002 | -200 | -200 | 0 | Matched |
Sales Invoice | SCR000003 | -150 | -100 | -50 | Available |
Cash Refund | CSH000002 | -40 | -40 | -40 | Available |
Sales Credit Note | SCR000001 | 60 | 60 | 60 | Available |
Sales Credit Note | SCR000002 | 30 | 30 | 30 | Available |
Best Practices
The following are the best practices for background matching.
When to use Customer Reference
It is recommended that when you select more than one document matching sequence to match documents, assign a unique reference to all the relevant documents that you want to match. Select “Customer Reference” in the First Match By field and start matching as explained above.
To match journals to any type of cash entries (receipts or refunds), enter a unique reference value in the Account Reference field of the journal line item and the cash entry line item that you want to match. Select “Customer Reference” in the First Match By field and start matching.
When to use Document Number
When you select only one document matching sequence, such as Cash Receipt to Invoice, then select those invoices to match with that cash entry line or assign those invoice numbers in the Account Reference field of that cash entry line. Select “Document Number” in the First Match By field and start matching.
For more information on selecting documents to match, see Matching Cash Entries.
This method is most suitable in scenarios when only one of the following document matching sequences is selected:
- Cash Receipt to Invoice
- Cash Refund to Credit Note
- Credit Note to Invoice
- Journal to Invoice
- Journal to Credit Note
- Negative Invoice to Invoice
To match negative invoices to invoices, you can select either “Customer Reference” or “Document Number” in the First Match By field. When matching by Customer Reference, assign a unique reference value in the Customer Reference field of both invoices. When matching by Document Number, enter the document number of the invoice in the Customer Reference field of the negative invoice and then match. For more information on background matching, see About Background Matching.