How to use Add rule and Extract rule function
As a merchant, managing product data efficiently is crucial for optimizing your online store. In this guide, we will cover common scenarios merchants encounter and demonstrate how to use the Add Rule and Extract Rule features to handle them effectively.
Add Rule to Choose the Image That You Want
Add Rule to Set Up the Custom Field
Add Rule to Set Up the Gender Field
Add Rule to Set Up the GTIN Field
Extract Rule for the Size/Color Field
Add Rule to Set Up the Brand Field
If you want to select a specific image for a product, follow these steps:
Navigate to Field Mapping > Image link field.
Click 1 rule > Add Rule.

Configure as follows:
- Set Value to: the image URL of your choice.
- Where: Some Products.
- If Product Title Equal to: Enter the exact product name.

For example: If you would like to categorize "T-Shirt" or "Dress" for your items in Facebook Catalog using a custom field, you can follow the steps below:
Step 1: Create a Tag for Each Product
In the product detail page, enter a tag such as "T-Shirt" or "Dress."


Step 2: Add Conditional Custom Label in Field Mapping
Navigate to Field Mapping.
Create rules:
- If Keywords Contains "T-Shirt" → Set Value to "T-Shirt".

- If Keywords Contains "Dress" → Set Value to "Dress".

Step 3: At Set in Facebook Catalog, filtering Custom Label contains T-Shirt or Dress


For gender-specific products, configure rules in Field Mapping > Gender field > Add Rule

For Male:
- Set Value to male.
- Where: Some Products
- Condition: If Keywords Contains "male" AND does not contain "female".

For Female:
- Set Value to female.
- Where: Some Products
- Condition: If Keywords Contains "female".

For Unisex:
- Set Value to unisex.
- Where: Some Products
- Condition: If Keywords Contains "unisex".

For feed that contains products with and without GTIN (Global Trade Item Number) at the same time:
Go to Feed Center > Field Mapping > Identifier Exists field.
Set Identifier Exists to "no".

Then click on Add rule and setup the rule as follow:
- Set Value to: yes
- Where: Some Products
- If Barcode Is not empty (if you enter the GTIN into Barcode on your website)

Then, configure the GTIN field by going to Field Mapping > GTIN > DO NOT assign any value here

Then click on Add Rule and setup the rule as follow:
- Set Value to: Barcode.
- Where: Some Products
- Condition: If Barcode Is Not Empty.

If product variants use non-standard labels (e.g., "Màu sắc" instead of "Color"), use the Extract Rule

Go to Field Mapping > Color field > Add Rule.

Select Extract.
Set up:
- Source: Variant title.
- Keyword: List all color names.
- Choose Whole words only
- Destination field: Color.

The app will check the variant title and it will automatically declare that color for the variant. You can also repeat the same process for Size.
For products missing a brand name, you can follow the steps below to add them in bulk:
Navigate to Field Mapping > Brand field > Add Rule.

Configure:
- Set Value to: Enter the desired brand name.
- Where: Some Products.
- If Vendor Is Empty.

By using the Add Rule and Extract Rule features, you can efficiently manage your product data, ensuring accurate and well-structured feeds. Whether it's selecting images, categorizing products, or extracting specific details, these rules streamline data organization and improve catalog performance.
If you have any further assistance, don't hesitate to contact us via in-app live chat or email at support@socialhead.io
Table of Contents
Add Rule to Choose the Image That You Want
Add Rule to Set Up the Custom Field
Add Rule to Set Up the Gender Field
Add Rule to Set Up the GTIN Field
Extract Rule for the Size/Color Field
Add Rule to Set Up the Brand Field
Add Rule to Choose the Image That You Want
If you want to select a specific image for a product, follow these steps:
Navigate to Field Mapping > Image link field.
Click 1 rule > Add Rule.

Configure as follows:
- Set Value to: the image URL of your choice.
- Where: Some Products.
- If Product Title Equal to: Enter the exact product name.

Add Rule to Set Up the Custom Field
For example: If you would like to categorize "T-Shirt" or "Dress" for your items in Facebook Catalog using a custom field, you can follow the steps below:
Step 1: Create a Tag for Each Product
In the product detail page, enter a tag such as "T-Shirt" or "Dress."


Step 2: Add Conditional Custom Label in Field Mapping
Navigate to Field Mapping.
Create rules:
- If Keywords Contains "T-Shirt" → Set Value to "T-Shirt".

- If Keywords Contains "Dress" → Set Value to "Dress".

Step 3: At Set in Facebook Catalog, filtering Custom Label contains T-Shirt or Dress


Add Rule to Set Up the Gender Field
For gender-specific products, configure rules in Field Mapping > Gender field > Add Rule

For Male:
- Set Value to male.
- Where: Some Products
- Condition: If Keywords Contains "male" AND does not contain "female".

For Female:
- Set Value to female.
- Where: Some Products
- Condition: If Keywords Contains "female".

For Unisex:
- Set Value to unisex.
- Where: Some Products
- Condition: If Keywords Contains "unisex".

Add Rule to Set Up the GTIN Field
For feed that contains products with and without GTIN (Global Trade Item Number) at the same time:
Go to Feed Center > Field Mapping > Identifier Exists field.
Set Identifier Exists to "no".

Then click on Add rule and setup the rule as follow:
- Set Value to: yes
- Where: Some Products
- If Barcode Is not empty (if you enter the GTIN into Barcode on your website)

Then, configure the GTIN field by going to Field Mapping > GTIN > DO NOT assign any value here

Then click on Add Rule and setup the rule as follow:
- Set Value to: Barcode.
- Where: Some Products
- Condition: If Barcode Is Not Empty.

Extract Rule for the Size/Color Field
If product variants use non-standard labels (e.g., "Màu sắc" instead of "Color"), use the Extract Rule

Go to Field Mapping > Color field > Add Rule.

Select Extract.
Set up:
- Source: Variant title.
- Keyword: List all color names.
- Choose Whole words only
- Destination field: Color.

The app will check the variant title and it will automatically declare that color for the variant. You can also repeat the same process for Size.
Add Rule to Set Up the Brand Field
For products missing a brand name, you can follow the steps below to add them in bulk:
Navigate to Field Mapping > Brand field > Add Rule.

Configure:
- Set Value to: Enter the desired brand name.
- Where: Some Products.
- If Vendor Is Empty.

By using the Add Rule and Extract Rule features, you can efficiently manage your product data, ensuring accurate and well-structured feeds. Whether it's selecting images, categorizing products, or extracting specific details, these rules streamline data organization and improve catalog performance.
If you have any further assistance, don't hesitate to contact us via in-app live chat or email at support@socialhead.io
Updated on: 06/03/2025
Thank you!