Articles on: FeedHub

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

In this article:


A. What are Rules?
Set To Rule
Extract Rule
B. Why do I need to use Rules?
C. 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
D. The Default Rules of our app
E. Some notes on how Rules work

What are Rules?



Rules give you greater flexibility and control over your product data. Specifically, you can modify the data of all products or only a specific product group by conditions. This means you are able to transform your data to optimize your feed to the greatest extent!

We offer two types of Rules, which are Set To Rule and Extract Rule:

Set To Rule



This type of Rule allows you to set a value for your target attribute. You can define this value based on existing attributes of your product or on simple static values that you input.

Extract Rule



This type of Rule allows you to search for certain terms in your feed and assign them to your desired attribute.

Why do I need to use Rules?



We will dive deeper in the benefits of using both types of Rules with examples. With Rules, you can make changes to your product data to:

Add missing required data: For Apparel products, certain attribute such as color is required. By using Extract Rule, you can search for a color within your title or description, then assign the value to your color attribute.



Resolve errors: To be eligible for enhanced listings, your product should have the field gtin. By using Set To Rule, you can set a value for this field to get your products approved.



Optimize your feed: To optimize your feed, you can add more relevant information to certain fields such as title so your products can get matched with a wider target audience. By using Set To Rule, you can combine existing attributes to produce a more detailed title.


How can I set up Rules?



We will instruct you how to set up Rules as the three cases mentioned above. First, you need to go to Feed Center > Click the feed that you want to set rule for > Choose Field Mapping > Click Add Rule to modify the field of your choice.



Set up Rules to add missing required data



Presumably, some of your product titles (dresses) already have the color, however, Google still returns the error "Missing value [color]". In this case, to save time and effort, you should extract the color from the title and apply them to the color field.

First, simply click on Add Rule next to the field brand
Then, choose the Rule Type as Extract
Next, input a title for the rule
Since you want to extract the color from your product title, choose the Source as Product Title
Input the color (keyword) you want to extract. You can input multiple words or phrases, and our app will find a matching value within the product title.

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).
Since you want to assign the value to the color field, choose the Destination field as Color



You are able to set the Rules to all products or to a specific product group. Since you only need to add color to the dresses, you need to choose Some Products.
After choosing Some Products, you can filter the products to be only dresses. In this case, you can choose the Product Type to be 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.



Remember to 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.



Set up Rules to resolve errors



Presumably, some of your products are custom and they do not have the field gtin. As a result, these products are disapproved by Google. You want to indicate Google that gtins are not available for your product using the attribute identifier exists.

First, simply click on Add Rule next to the field gtin
Then, choose the Rule Type as Set To
Afterwards, input a title for the rule
Since you want to set a value to the attribute identifier exists, choose this field in the Set section. Then, type the value of false in the To section. This way, the identifier exists attribute has a value of false.



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.



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.

First, simply click on Add Rule next to the field title
Then, choose the Rule Type as Set To
Next, input a title for the rule
Since 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).





Since 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".



The Default Rules of our app



With this product feed optimization feature, we provide you with 5 available Default Rules (3 rules for Availability, 1 rule for Price and 1 rule for Shipping Weight). Since these rules are the same for all shopping channels, they are automatically applied to all of your products.

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 a product satisfies many Rules, the Rule that has the highest ranking will be applied. You can also drag and drop to change the Rules ranking. In this example, the Rule 1 will be applied for this product.



When you set Rules for your feed, it will be more powerful than Mapping. An attribute set by Rules will always override its value set by Mapping, regardless of whether you enter the value of Rules first or Mapping first.

If both the Rules and Mapping are not applicable to an attribute (no product meets the conditions or the Rules are set incorrectly, there is no value assigned by Mapping), the value of that attribute will be null.

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: 17/04/2024

Updated on: 25/04/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!