Regex (or Regular Expression) is a type of code you can use when you want to match a portion of the characters in your uploaded product SKUs, categories, or promo codes with the values that are passed to impact.com with conversions. You can use regex with impact.com's Match Expression tool to identify product SKUs, categories, or promo codes for which you want to pay out differently.
The regex you place inside the Match Expression tool parentheses represents the value(s) you're trying to match for in your accompanying exception list. If you want to do more than exactly exactly with items in a list of SKUs, categories, or promo codes, you'll need to add regex outside the parentheses. The operators outside of the parentheses will match the bracketed value(s) with incoming conversions that have corresponding SKUs, categories, or promo codes.
Your brand, ACME Auto, would like to decrease payout to partners on all tires. ACME Auto doesn't have an exhaustive list of tire brands because it plans to add new tire brands to its catalog in future. However, you know that all tire SKUs start with 3 letters, representing the tire brand, followed by 5 numbers (e.g. ABC12345
, DLY76565
, and XTX85037
).
Because all tire SKUs start with 3 letters followed by 5 numbers, you can set up a regex for that SKU pattern and use the Match Expression tool to find matches in the current SKU exception list. In future, ACME Auto can then add additional 3-letter brand codes as needed.
From the left navigation bar, select [Menu] → Settings.
Under the Exception Lists section, select SKU.
Select Add New SKU List.
Enter a List Name.
Select the event type you want to associate with this SKU list.
Select Show advanced settings and enter your regex in the Match Expression field.
Inside parentheses, add what you want to match for:
Add the regex characters
\w{3}
to match for the 3-letter "text" portion of the items in your SKU list.
Outside the parenthesis:
Add
^
before the opening parentheses to assert the position at the start of a line, ensuring that there are no preceding characters.Add
\d{5}
after the closing parentheses to match for the bracketed expression only when there are 5 digits after the 3-letter text combination.The final expression should be
^(\w{3})\d{5}
.
Select Save and Add items.
List the values you want to match in 1 of 2 ways:
Add Items manually by entering all current tire brand SKUs in the Sku fields.
Upload a CSV or Excel file listing all current tire brand SKUs under the SKU column.
See Create a SKU exception list for more information.
To add new tire brands, simply add new SKU list items manually or via upload.
E.g., add BHG123 for a new tire with the 3-letter brand code of BHG.
Select Save.
You'll see your new SKU list on the SKU Lists screen.
Now that you've set up a regex Match Expression and added corresponding SKU list items, all ACME Auto's tires will be matched as part of the exception list. Any future tire brands (assuming they also have SKUs starting with 3 letters followed by 5 numbers) can be added to the SKU list when necessary. Any incoming conversions that match the regex will be flagged as part of the exception list and contract rules will be applied accordingly.
Now you can add rules to ACME Auto's template terms, such as decreasing payout whenever these SKUs are present. See Set payouts for a SKU exception list for more details.