How to create a data rule

Data rules are useful tool for solving many different kinds of problem. This article explains what data rules are and how to use them.


What is a data rule?

Data rules allow you to automate changes to your product data. Each rule is made up of conditions and actions. Whenever the conditions are met, the actions will be performed. Think of it like "If [conditions] then do [actions].

You must have at least one action, though if you don't add any conditions your rule will apply to all products. You can add as many conditions and actions as you need.

Here are some other examples of rules you might find useful.

Example: Apply a Custom Label

For example, suppose you want to apply a custom label to all products priced under $50 in the "Shoes" category. Your rule would look like this:

Condition(s) Action(s)
Price is less than 50 Custom Label 2 set attribute to "cheap shoes"
Product Type (2nd Level) contains "Men's Shoes"  

Learn more about custom labels.

Example: Enhance your Product Titles

You can augment your product titles with other product attributes. For example, if you want to add the product brand at the start of your titles, you could do:

Condition(s) Actions(s)
  Title set attribute to "Brand Title"
  Title sentence case

This will then apply the value of the Brand attribute to the start of every product title, then apply title casing in case some of your brands don't start with a capital letter.

Example: Increase Product Type Depth

Google recommends that you have between 3 and 5 levels of product type categorisation. FeedOps will automatically pull any categorisation from your web store, but you can use data rules to add more detail.

Condition (s) Action(s)
Product Type (2nd Level) contains "shoes" Product Type (3rd Level) set attribute "Running Shoes"
Product Type (3rd Level) is empty  
Title contains "running"  

How to create a data rule

  1. Navigate in the left menu to Website settings > Data rules.
  2. Click Add Rule.
  3. Enter a short description, e.g. "Low-price products".
  4. Choose which channels you want the rule to apply to (e.g. Google + Facebook)
  5. Click Add Condition(s) and select the field e.g. Price
  6. Enter your condition, e.g. "Price is less than $50" and click Apply.
  7. Click Add Action(s) and select the custom label you want to set, e.g. Custom Label 2
  8. Select "set attribute" from the dropdown and set it to the value you want, e.g. "low-price"
  9. Click Save.

See also FeedOps Onboarding > Manage data rules