Configuring Guided Matching involves modifying page components and layouts, and then customizing Guided Matching rules.
Add Lightning components and fields
You need to make modifications to Transaction and Transaction Set record pages to be able to use Guided Matching.
To configure Transaction and Transaction Set record page for guided Matching:
- Add the following Lighting components to the Transaction page:
- Transaction Set Progress
- Guided Matching
- Guided Matching Progress
- In Lightning App Builder, you can define what rules to show:
- Hide Skipped Rules
- Hide Done No Result
- Hide Not Yet Processed
- For implementation and testing purposes, you can add the following fields to the Transaction page 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
- Add the Transaction Set Progress Lighting component from step 1 to the Transaction Set page.
- Add the field ‘Guided Matching Setup’ to the Transaction Set page layout.
Customize matching rules
You can customize matching rules to improve Guided Matching performance for your specific business logic. Custom rules are defined in a Guided matching ‘setup,’ and each setup is only used for a given Target. The rules are linked to a specific field on the transaction record, and the result of the rule is stored in that particular field. For some payment extensions, FinDock provides predefined rules. For more information, see Guided Matching managed and suggested rules.
To configure custom Guided Matching rules:
- Launch the FinDock app and click Setup.
- If you cannot see a Guided Matching Setup tab, make sure the tab is visible for your profile. For further information on tab visilibity, see Salesforce Help.
- Click the Guided Matching Setup tab.
- Select a Target for the custom rule set from the drop-down list.
- Create a new rule for a field by clicking the ‘+’ icon or edit an existing rule by clicking on the rule name.
- TRANSACTION CUSTOM FIELDS: Most of the enrichment happens with these fields. This is where you typically start creating rules.
- TRANSACTION ENRICHABLE STANDARD FIELDS: The standard fields (from FinDock) which are used for guided matching. Most of the execution and matching happens based on these fields.
- TRANSACTION AND OTHER STANDARD FIELDS: Normally these fields should not be enriched, so this section usually remains unchanged.
- Rule Execution Plan: the order in which the defined rules are processed. The order is calculated automatically and cannot be changed.
- Settings: click the Active checkbox to apply the custom rule set for the selected Target. Job Size indicates the number of transaction records processed by a Guided Matching Apex job. For production and UAT environments, set this as high as possible, 200 ideally. For development and early testing, set the size as low as possible. This results in more specific error messages. If a Guided Matching job fails, all records for that are marked ‘Failed.’
- Create or modify a rule.
- Rule Type (required): Type of the rule. See Guided Matching rule types.
- Rule Name (required): Name of the rule. This seen by the user in Guided Review and Guided Matching Progress Lightning 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.
- 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 for the selected Target.
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||Contains the error in case Guided Matching failed for this transaction or inbound report.||Check for troubleshooting.|
|Guided Matching Nr of Rules Processed||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.|
|Guided Matching Job Id||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||Detailed logs for each rule, stored in JSON format.||Check log for troubleshooting|
|Guided Matching Nr of Retries||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|
|Has Been In Guided Review||Checked if this transaction has been in guided review at least once.||Key field for calculating automated matching percentages.|
|Last Worked On Date||This field is set to NOW when the Next button is clicked on the Transaction Set Progress Lightning component.||None|
|Matched By ProcessingHub||Checked if the Status of the transaction record was ‘Matched’ before guided matching started.||None|
|Start Guided Matching||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||(See list below)||Usually none. However, there may be cases in which you want to change the status to force a certain behavior.|
|Guided Matching Installment Processed||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.|
- Matched (end status): the transaction record has been matched to an installment
- Ignored (end status): transaction record has been marked by user to be ignored
- No Match: transaction record has not been matched to an installment
- Processing: transaction record is being processed by guided matching
- Guided Review: user action needed
- New: transaction record created by ProcessingHub, but ProcessingHub still needs to set it to Matched or No Match
- Failed: an error (functional or technical) has occurred that needs to be resolved