Articles on: FeedHub

How Set To Rule and Extract Rule help to add missing data, fix errors and optimize your feed

Rules give you greater flexibility and control over your product data. You can modify data for all products or specific product groups by setting conditions. This allows you to transform and optimize your data for the best performance.

Table of Contents



What are Rules?
Set To Rule
Extract Rule

Why do I need to use Rules?

How can I set up Rules?
Set up Rules to add missing required data
Set up Rules to resolve errors
Set up Rules to optimize feed

The Default Rules of our App
Some Notes on How Rules Work


What are Rules?



Rules allow you to adjust product attributes based on conditions. There are two types:

Set To Rule

This Rule sets a value for an attribute based on existing product attributes or static values you provide.

Extract Rule

This Rule searches for specific terms in your feed and assigns them to a designated attribute.

Why do I need to use Rules?



Using Rules enables you to:

Add missing required data (e.g., extracting color from a title to populate the "color" field)



Resolve errors (e.g., setting a default value for "gtin" to meet listing requirements)



Optimize your feed (e.g., enhancing product titles with additional details for better visibility)



How can I set up Rules?



To set up Rules, navigate to Feed Center > Select your feed > Field Mapping > Click Add Rule.



1. Set up Rules to add missing required data



To extract missing color data from product titles:
Click Add Rule next to the color field.



Select Extract as the Rule Type.
Choose Product Title as the source.
Input keywords to extract colors.

By choosing Whole words only, our app only extracts the color if it matches with the entire keyword as entered (for example, it does not take the word "white" inside the word "off-white"). By choosing Case sensitive, our app only extracts the color if it matches exactly to the keyword entered (for example, it does not take the word "Purple" with a capital P).

Assign extracted values to the color field.



Apply to relevant products or specific items by setting the rule.

For example: if you only need to add color to dresses, you will have to choose Some Products > filter the products to be only dresses by setting the condition as Product Type - Equal to - "dress"



You can create more than one sub-condition to filter a product group. Simply click on Sub-condition to create an AND condition.



You can also create more than one condition. Simply click on Condition(s) to create an entire IF condition.



Click Save for the Rules to be applied. Afterwards, you will be able to see the Rules next to the field brand. Moreover, all the Rules you created are also displayed on the top right of the Field Mapping tab.



2. Set up Rules to resolve errors



To indicate missing GTIN values:
Click Add Rule next to gtin.
Select Set To as the Rule Type.
Assign identifier exists to "false".



Apply to products with empty GTIN fields.

Since you only want to assign the attribute identifier exists to products that do not have GTIN, you need to choose Some Products. Then, you need to select the products that do not have GTIN by choosing Barcode to be Is empty.



Save the Rule.

3. Set up Rules to optimize feed



Having a qualified product feed is not enough to maximize your reach and sales. To achieve it, you need to optimize your feed, and one of the fields that needs to be prioritized is your product title.

To enhance product titles:
Click Add Rule next to title.
Select Set To as the Rule Type.
Include additional attributes (e.g., color, SKU).

If you are selling electronics and you want to include more information such as color and SKU in your title, you can choose these fields from the drop down list and type the punctuation to organize the title neatly (e.g. you can add a dash, or parentheses).





Apply to relevant products (e.g., electronics).

If you only want to optimize the title for electronic products, you need to choose Some Products. Then, you need to select the products that belong to this category by choosing brand to be "Apple".



Save the Rule.

The Default Rules of our App



Our app includes five Default Rules:
Availability (e.g., "in stock" or "out of stock" based on inventory)
Price adjustments
Shipping Weight assignments

For example, Availability will include 2 Default Rules:

Out of Stock: If [P] Inventory < 0, [F] Availability = “out of stock”

In Stock: If [P] Inventory > 0, [F] Availability = “in stock”

Nonetheless, you can choose to turn off the Default Rules and create rules of your own. Once you click on the All Rules section on the top right, you can see the list of all Default Rules.





Some Notes on How Rules Work



If multiple Rules apply to a product, the highest-ranked Rule (eg. Rule 1) takes precedence.



Rules override Mapping settings
If no Rule or Mapping applies, the attribute remains empty.


Rules provide a powerful way to manage and optimize product data, ensuring compliance and improving feed performance. By setting up Rules correctly, you can enhance product visibility, reduce errors, and maximize efficiency.

If you have any further question about the Category, don't hesitate to contact us via in-app live chat or email at support@socialhead.io

Updated on: 06/03/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!