Skip to main content

Extract group ID from your product ID in mapping table

Does your product feed contain variants, but no group ID? If your product ID structure contains parent ID, you can extract group ID from it!

Updated over 5 years ago

Let's say your product IDs look like this:

D23-3780-026

D23-3780-260

D23-3780-050

Each of these IDs represent a variant of a product (size, color) and contains "parent part" D23-3780.

For any technical reason, you might have a problem to get this parent (group) ID to you feed. But you might need it for tracking or to prevent Facebook from displaying multiple variants of the same product in carousel.

In "Feed Mapping" section of Catalog Manager, you can easily extract this parent ID and map it as item_group_id in ROI Hunter feed. Just follow these steps:

  1. Map your product ID into item_group_id. You can ignore the warning, that the tag is already used.

  2. Click "Apply functions" for the field and select "Find and Replace".

  3. Tick "Use regular expression".

  4. In Find field, define a regular expression to find the part of the ID that should be removed. For example, .{4}$ finds the last 4 characters of the ID. You can learn more about regular expressions here and test them here.

  5. Keep Replace field empty (in our example, last 4 characters of the ID will be replaced by nothing)

  6. Hit save and check the result. Save changes in your mapping.

If you need help to find the right expression to get your parent ID, feel free to reach out to our Support team by the chat button 😉

Did this answer your question?