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:

Selected as Source Documents Manually
Document Number Document Value Paid
CSH000001 400 400
CSH000002 -40 -40
Selected as Target Documents Manually
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:

  1. Cash Receipt to Invoice
  2. Cash Refund to Credit Note
  3. Credit Note to Invoice
  4. 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.

Note:

You must ensure that the selected order of the flows or sequence works successfully for the documents you want to match.

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.

Note:

When the Allow Partial Payment? checkbox is selected, documents with the same reference can be matched even if their amounts do not match exactly. This is another condition that affects the results of the background matching process.

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.

Tip:

In the example above, to keep the background matching process running, set up additional matching conditions by clicking Add Matching Condition and select any one of the options from the Then Match Remaining By field menu. This allows background matching to match documents without the need for a reference.

Warning:

In the example above, if there are available invoices, credit notes, and refunds other than the mentioned ones, selecting the additional condition will not necessarily complete the expected matches.

Note:

Matching by Document Number is not supported for the following sequences:

  • Cash Refund to Cash Receipt or vice versa
  • Cash Receipt to Journal or vice versa
  • Cash Refund to Journal or vice versa

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
Note:

If you want to match by Document Number and have selected more than one document matching sequence, we recommend you ensure the order of the matching sequences selected is accurate to complete the matching of all documents involved.

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.