Help Center

| Submit or View Help Requests | Developer Docs |

View desktop instructions
View mobile app instructions
Regex Outside the Parentheses

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.

Outside the parentheses

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.

Example Scenario

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.

Step 1: Create a SKU list

  1. From the left navigation bar, select ellipsis-v-solid.svg [Menu] → Settings.

  2. Under the Exception Lists section, select SKU.

  3. Select Add New SKU List.

  4. Enter a List Name.

  5. Select the event type you want to associate with this SKU list.

Step 2: Set up the regex

  1. 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}.

        63d3bb74e9d79.png
  2. Select Save and Add items.

Step 3: Add exception list items

  1. 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.

      Screenshot_2024-07-29_at_6_15_53_PM.png
    • Upload a CSV or Excel file listing all current tire brand SKUs under the SKU column.

      Screenshot_2024-07-29_at_4_33_14_PM.png
  2. 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.

  3. Select Save.

    • You'll see your new SKU list on the SKU Lists screen.

What next?

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.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.