Configuring Guided Matching
Configuring Guided Matching has two parts. First, you need to modify page layouts so users can access Guided Matching. Then, depending on your matching requirements, you may need to create custom Guided Matching rules.
Page layouts for Guided Matching
FinDock has three Lightning components that can be added to page layouts for users to see and access Guided Matching tools.
Guided Matching Progress component
This is the main component for users who work with Transaction and Inbound Report records. The progress component shows the matching rules executed for the record as well as the outcomes, with direct links to the results.
This component is included by default on the Inbound Report layout. You should also added in to the Transaction layout with the Lightning App Builder if you process payment data parsed in transactions, such as camt.053 files.
In Lightning App Builder, you change Guided Matching rule visibility in the component:
- Hide Skipped Rules
- Hide Done No Result
- Hide Not Yet Processed
Guided Review component
The Guided Review component can be added to Transaction and Inbound Report layouts using the Lightning App Builder. This component provides guidance when the matching progress of a record reaches a Guided Review rule.
Transaction Set progress
The Transaction Set progress component can be added to the Transaction and Transaction Set layouts to help users track matching progress of the related transaction set.
Guided Matching fields
For custom rule implementation and testing purposes, you can add the following fields to the Transaction layout in your sandbox org:
- Guided Matching Error
- Guided Matching Job Id
- Guided Matching Log
- Guided Matching Nr of Rules Processed
- Has Been In Guided Review
- Start Guided Matching
- Guided Matching Nr Of Retries
- Matched by ProcessingHub
- Guided Matching Installment Processed
- Last Worked On Date
You may also want to add the Guided Matching Setup field to the Transaction Set page layout. This field shows you which rule set is attached to the Transaction Set record (and used to process related transactions).
Create and customize matching rules
Guided Matching rules rules are defined in a Guided Matching Setup record. Each setup is defined for a target, file type, or inbound report type and subtype.
For some file and record types, FinDock provides predefined rules. For more information, see Guided Matching managed and suggested rules. For others, you need to create a setup from scratch.
To configure custom Guided Matching rules:
- Launch the FinDock app and click the FinDock Setup tab
- Click Guided Matching in the menu to open the Guided Matching Setup tab.
- Select an object, Transaction or Inbound Report and:
- For Transaction, select a Target or a File Type (only types with pre-shipped rules are listed).
- For Inbound Report, select a Report Type and Subtype.
- Create a new rule for a field by clicking the ‘+’ icon or edit an existing rule by clicking on the rule name.
- CUSTOM FIELDS: Most of the enrichment happens with these fields. This is where you typically start creating rules.
- ENRICHABLE STANDARD FIELDS: These fields are where most of the execution and matching happens.
- OTHER STANDARD FIELDS: Normally these fields should not be enriched, so this section usually remains empty of rules.
- Rule Execution Plan: Here you can see the order in which the rules are processed.
- Settings: Mark the Active checkbox to apply the setup. Job Size indicates the number of records processed by a Guided Matching Apex job. For production and UAT environments, set this as high as possible. For development and early testing, lower is better.
- Define or modify a rule. The exact settings depend on the rule type.
- Rule Type (required): Type of the rule chosen from the dynamic selector (which shows possible types based on the field).
- Rule Name (required): Name of the rule seen by the user in Guided Review and Guided Matching Progress components.
- ENTRY CRITERIA: Defines the criteria for applying the rule. The rule is only used when all criteria are true.
- If empty: the rule is used only if the field is empty.
- and not matched by ProcessingHub: the rule is skipped by default if ProcessingHub has already found a match. This is typically what you want: skip transactions that are already matched with an installment. However, if you also want to, for example, match the transaction to a campaign, mark the ‘Disabled’ checkbox to skip this criterion. You can also add custom criteria by clicking the ‘+’ symbol with ‘Equals’ or 'Not equals' as operators. If one of the criteria is an empty value (no value), leave the value field blank. Don't enter any text or variables.
- RULE SETUP: see Guided Matching rule types.
- ADVANCED: Sometimes a rule execution order cannot be calculated because of dependency cycles. In these cases, use the Forced Execute After Rule option to guide the rule execution order. The rule is executed immediately after the rule selected from the drop-down list. Select the Update And Refresh Before Processing option to update the current state of all transaction or inbound report records within the scope of the Guided Matching job (or the record in Guided Review) to the database and then re-query before processing the rule.
- Rule Type (required): Type of the rule chosen from the dynamic selector (which shows possible types based on the field).
- Order rules for a field by clicking on the up and down arrows next to the rule name.
- Click Save to save the Guided Matching Setup changes.
Automated rule order calculation
The order of the rules is calculated automatically based on the following criteria:
- Rules for which a ‘Forced Execute After Rule’ has been defined are processed after the selected rule without considering any other criteria.
- In all other cases:
- The order of rules within a field is never violated.
- All rule field dependencies are respected.
- Rule types without possible guided review (e.g. constant and regular expression) are processed as early as possible.
Recalculate formula fields after every rule execution
When a rule is executed, formula fields are recalculated so the most up to date values will be used in the next rule that is being executed. Formula fields can be used in Guided Matching rules and can be trusted to be up to date with previous rule results.
Here's a great best practice shared by one of our partners: use formula fields to implement complex business logic. Create a single Boolean formula fields with all business logic and use that for the entry criteria. They find this easier to maintain. It's a nice example of how Guided Matching and formula fields can be combined.
Guided Matching standard fields
The standard fields that FinDock uses for Guided Matching are described in the table below. This information is not necessarily needed to use Guided Matching, however, it is good to know, and can be useful troubleshooting possible errors in a matching run.
Label | Name | Description | Allowed user actions |
---|---|---|---|
Guided Matching Error | cpm__Guided_Matching_Error__c | Contains the error in case Guided Matching failed for this transaction or inbound report. | Check for troubleshooting. |
Guided Matching Installment Processed | cpm__Guided_Matching_Installment_Processed__c | If checked, the Process Installment rule has already been performed for this transaction and will not be processed again, even if retried. | Can be unchecked if you want to force reprocessing of the Process Installment rule. The rule then also needs to be retried. |
Guided Matching Job Id | cpm__Guided_Matching_Job_Id__c | Id of the Async Apex Job that handled this matching run. This field is not updated with the Ids of the jobs that handle retries. | None |
Guided Matching Log | Guided_Matching_Log__c | Detailed logs for each rule, stored in JSON format. | Check log for troubleshooting |
Guided Matching Nr of Retries | Guided_Matching_Nr_Of_Retries__c | Number of times this transaction record has been retried. A transaction is retried in case of a Row Locking exception. For further information, see Salesforce help | None |
Guided Matching Nr of Rules Processed | cbm__Guided_Matching_Nr_Of_Rules_Processed__c | The number of rules that have been processed. The initial value is 0, and the final value is total number of rules processed | Set to a lower value if you want to reprocess from a previous rule for testing or debugging purposes. |
Has Been In Guided Review | cpm__Has_Been_In_Guided_Review__c | Checked if this transaction has been in guided review at least once. | Key field for calculating automated matching percentages. |
Last Worked On Date | cpm__Last_Worked_On_Date__c | This field is set to NOW when the Next button is clicked on the Transaction Set Progress Lightning component. | None |
Matched By ProcessingHub | cpm__Matched_By_ProcessingHub__c | Checked if the Status of the transaction record was ‘Matched’ before guided matching started. | None |
Open Amount | cpm__Open_Amount__c | Unallocated amount if overpaid handling set to allow remainder on record. | None |
Processed Installments | cpm__Processed_Installment_Ids__c | List of installments that have been changed by the record. | None |
Start Guided Matching | cpm__Start_Guided_Matching__c | If checked by the user, a guided matching job is placed in the queue. The transaction record will be reprocessed asynchronously in the background. This can also be handled through automation (trigger, process builder, etc.) that can mark this field to initiate a restart. | Check if the record needs to be reprocessed asynchronously in the background. Note that you can also change ‘Guided Matching Nr of Rules Processed.’ Change it to the rule number you want to start the guided matching with again. Leave the number as is to start matching from the current rule. |
Status | cpm__Status__c | (See list below) | Usually none. However, there may be cases in which you want to change the status to force a certain behavior. |
Use Open Amount | cpm__Use_Open_Amount__c | If checked, Guided Matching Process Installment rule allocates Open Amount to next matched installment in overpayment handling. | None |
Guided Matching states
There are several status options for incoming records. An end state means the Guided Matching processing is complete, with no further processing once that state is reached.
Status options:
- Matched (end state): the record has been matched to an existing record (typically an installment) or custom rule processing is done
- Partially Matched (end state): same as Matched, but the record has a remaining Open Amount
- No Match (end state): the record cannot be matched to an installment
- Ignored (end state): the record has been marked to be ignored
- Failed (end state): an error (functional or technical) has occurred that needs to be resolved
- New: a new record has been created, but ProcessingHub still needs to set it to Matched or No Match
- Processing: the record is currently being processed by Guided Matching
- Manual: default Guided Matching processing is complete; optional, additional custom matching logic proceeds according to your business processes
- Guided Review: user action needed to complete matching the record to an installment