Rule type Keyword Search
Use this rule type to match transactions or inbound reports to specific keywords. You can search for up to 500 keywords in a rule, but keep in mind the searching process is quite heavy. The searching stops on the first keyword found.
Before you can use Keyword Search rules, you need to have your keywords defined in Salesforce. You can do this with standard objects and fields or create a custom object for this purpose. The Keyword Search rule returns the selected field when matched, this could be a lookup to an object, a text field or any field.
Below is an example rule that searches through keywords defined in a Keyword custom object and returns a Campaign field.
Keyword matching is case insensitive.
Keyword Search setup
Setting | Description |
---|---|
Keyword Object | Select the object (custom or standard) where your keywords are defined. |
Filter | Use a filter to narrow the Keyword Object drop-down list, which can be very long. The filter value is not saved in any way. |
Return Field | Defines which field on the Keyword Object contains the return value for a successful search. The Return Field value is added to the transaction field where the rule is used. |
Where | Specifies the conditions for applying the Keyword Search rule. Those records that fulfill a specified condition. Define where the keywords are found in the Keyword Object, where they are located in the transaction record, and what the matching relationship should be. Use the plus button to add additional conditions. |
Order by | Use Field and Sort Order to order the search results if needed. |
Keywords as regular expressions
The Keyword Search rule is based on regular expressions. That means your keywords are interpreted with regex logic. You can leverage this capability by, for example, adding regex constructs in your keyword values to cover a wider range of possibilities than exact one-to-one matches. For example, if you have run a campaign for supporting Syrian refugees and want to capture all possible transactions that have different spellings for “Syria,” you could have these in your keyword list:
- Syr.a
- Syr[iy]a
- Syria|Syrya
- Syr.*a
- Syr.?a