Reconcile payments against the (un)defined with Guided Matching

Aard-Jan van Kesteren
January 12, 2021

In my previous blog, I outlined how Guided Matching is a unified approach to matching all five types of inbound data. This time, I will bring matching a bit more to life by explaining how a specific reconciliation problem can be solved using Guided Matching. This example highlights the rule types Regular Expression, Query and Keyword Search.

“From DON555123 for COR20. Keep up the great work!” This is what our example charity receives for a certain campaign donation. This is one of the hardest types of donations for reconciliation: the spontaneous gift. Fortunately enough, our donor has included her donor number and the code of the campaign she is supporting.

Challenge #1: identify the donor

Here we want to automatically extract the donor number. This charity has a clear convention for donor numbers; they all start with “DON” followed by 6 digits. This is the type of challenge where the Regular Expression rule type really shines. Regular expressions may feel daunting and look very complex, but when you want to extract well-defined patterns, they are ideal and easy to use. The following regular expression will extract the donor number: “DON \d\d\d\d\d\d” (or for a slightly more advanced version, “DON\d{6}”, where “d” stands for a digit and “{6}” stands for 6 times.)

Challenge #2: find the contact

The next step is to find the Contact record belonging to the extracted donor number. For this you would use the Query rule. Just define a query on Contact for which the donor number matches the extracted donor number.

Challenge #3: find the campaign

In this step we need to extract the campaign code and find the related Campaign record. You might think, “That’s easy, we just apply the same regular expression and query approach that was used for the donor number.”

However, one crucial aspect is different here. For this charity, campaign codes do not have a well-defined pattern, which makes the regular expression type not usable. Instead, the Keyword Search rule type is a great fit here. It enables you to reference a custom object where the relationship between keywords and related objects or values is stored and maintained. For our example, the campaign code is the keyword, and a lookup to Campaign is the related object. During matching, the Keyword Search rule will try all keywords until it finds the one that is included and then return the related object. See below for a screenshot of what the keyword object looks like for this charity:

For a slightly more advanced use case, note that the keyword for the “Save the tiger” campaign is “Roa+r”. Keywords can also be regular expressions. This one keyword now matches against Roar, Roaaar, Roaaaaaaaaaar, etc. The “+” stands for once or more.

When we now run Guided Matching on our original example description, this is the matching output you will see. Only three rules are needed to automatically match the spontaneous gift to the right donor and campaign.

Happy matching!

Laurens Wapenaar

Laurens Wapenaar

Product Manager