Skip to main content

Configuring Data Source Product Tags

Learn How to Set Up Product Tags for Data Source

Written by Christian Sokolowski

Data Source Product Tags allow you to reduce the number of rules you create from numerous to one. You can now recommend products that have the same product tag as your input product tags with fewer rules. By leveraging product tags, you can also fine-tune widget display to ensure accurate and precise product recommendations, enhancing the overall customer experience.

By understanding key aspects of rule matching, such as conditional logic and sequential evaluation, users can ensure proper configurations to achieve accurate product recommendations.

Getting Started with Product Tag Rules

Rebuy Tag Patterns are available in all Data Sources. You can access this by selecting the Data Source you would like to edit under Data Sources > Edit. Widgets tied to these data sources must also have matching configurations to function correctly, ensuring they align with the appropriate tags or rules specified.

In the Data Source, create or modify a rule and select Product Tags as the IF condition. Select any qualifier (with the exception of the ‘Regular Expression’ option).

As you enter your product tags in a comma-separated manner, they will populate below the Product Tags section. This allows you to see your tags in real time and remove them as necessary .

In the RETURN section of your Data Source, you will now see an option that says Contains Matched Input Tags.

Selecting this option will return products that match the tags that you input into the IF section of the rule. For example, entering the product tag Sunglasses and selecting Contains Matched Input Tags will now recommend products with a tag of Sunglasses.

You can also choose to return products with specific tags of your choosing using the Contains field. Product tags have to be comma separated in order to include multiple tags. Note that if you list multiple tags in this field, Rebuy will search for products that Contain All of the tags listed.

Limitations with Product Tag Rules

Only 1 product tag return can be used per data source rule. If multiple product tag returns are used in the same rule, only the last tag will return.

Product limit conditions can be used to limit how many tagged products return.

You're able to use multiple comma separated tags, but this is for specificity not for returning multiple different products.

In this example products with all 3 tags will be returned. Not shirts, then red products, then sale products:


Regular Expression Product Tag Rules

For advanced users, we have also now built out compatibility with Regular Expression. The Regular Expression qualifier lets you match products based on tag patterns, making it possible to build a single rule that covers an entire category of tags without listing each one individually.

Any valid regular expression wrapped in forward slashes works in Rebuy. The category:value format shown in the examples below is a recommended Shopify tagging convention, not a Rebuy system requirement. If your products use a different tagging structure, such as underscore-based tags like pair_123, a pattern like /pair_.*/ is valid and will match those tags.

Formatting Examples

The most common format in e-commerce is:

/category:.*/

Where category is the tag prefix you want to match on, and .* matches any value after the colon. For example:

  • /color:.*/ matches color:red, color:blue, color:green

  • /size:.*/ matches size:small, size:large

  • /pair:.*/ matches pair:123, pair:456

If your tags use underscores instead of colons, adjust the pattern to match your convention:

  • /pair_.*/ matches pair_123, pair_456

(Screenshot above: Shopify Admin product page highlighting the "Tags" section showing a color:green tag)

Data Source setup

For the rule to return results, your data source needs two things:

  1. IF condition: Product Tags > Regular Expression with your pattern entered

  2. RETURN: Set to Contains Matched Input Tags

Rebuy matches the value portion of the pattern against other products' tags and returns products that share that value. So if the input product is tagged color:red, a /color:.*/ rule returns all other products tagged color:red.

(Screenshot above: Rebuy Admin datasource rule builder showing "Rule #1" IF condition set to "Product Tags" + "Regular Expression" + /color:.*/, and the RETURN set to "Products with Tags" + "Contains Matched Input Tags")

Output Example:

(Screenshot above: Rebuy "Product Add-Ons Widget" on the storefront titled "Complete the Look" demonstrating the output of a datasource rule using "Regular Expression" + /color:.*/ matching the color:green product tag)


Frequently Asked Questions

My product has multiple tags: which tag will take precedent?

This will be determined by the order in which the tags are entered into the Product Tags section. For example, if you were to enter the tags black, dress, short in that order, then the products returned would first be products with the tag black and then products with dress and so forth.

What are common use cases for this feature?

There are cases where you want to simply RETURN a product with the same product tags that you put in. This reduces the amount of time that it takes to build out matching data sets.

Can we match input with other product characteristics such as Product Type?

At this time, matching input only works with product tags.

How are products sorted?

Products are sorted by a combination of attributes including volume of sales, stock of product, etc.

Did this answer your question?