Custom rules allow you to apply business rules to your feeds to change field attributes, add third-party tracking, replace text in your data, calculate number values and generally improve feed quality.
To add a new custom rule to your feed:
- Go to Step 4: Customization and click Add
- Name your new rule
- Select the feed field you want to change
- Enter the desired value for your selected field by either typing it in or clicking the tag button to choose from either your imported Product [P] data or Feed [F] data.
- Enter the conditions for this rule
To save this new custom rule as a Global Rule, click the Save Global Rule icon.
Text Replacement Rules
Text Replacement rules allow you to replace or remove text in your feed data with a custom rule.
Note: Text Replacement rules can only be applied to text fields. Learn more about Data Types.
To use a Text Replacement rule:
- Create a custom rule to Set a feed's text field to your desired value or Product [P] field
- Save the rule; the Replace Text icon will become enabled
- Click the Text Replacement icon
- To create a new text replacement definition, enter the text you want to replace in the Replace field
- Enter the value you want to replace it with in the With field
Note: To remove a value completely, you can leave the With field empty and the system will remove any references to your Replace value from that custom rule's feed field data.
- Save the text replacement rule; a new definition for that rule will appear in the dropdown menu
- To edit an existing Text Replacement definition, use the dropdown menu to select it from your existing definitions and update the rule as needed
Note: Global rules with Text Replacements can be applied to a custom rule, and the text replacement values will automatically be applied to that rule. To use Global Rules, see the Global Rules article.
Number Function Rules
Number Function rules allow you to modify numeric fields in your feed data with a custom rule.
Note: Number Function rules can only be applied to numeric fields. Learn more about Data Types.
To create numerical function:
- Create a custom rule to Set the feed field you would like to adjust to two opening brackets '[[' followed by the source field in your data
- Adjust your pricing using any common operator, such as, -,+,*,/
- Add two closing brackets ']]'
Note: Global rules with Number Adjustment functions can be applied to a custom rule, and the number calculations will automatically be applied to that rule. To use Global Rules, see the Global Rules article.
In addition to Product [P] fields, Feed [F] fields can now also be referenced in your custom rules to make calculations off of the existing feed data at a given point in time. What does this mean? Let's say you have created a custom rule to modify the data on a specific [F] feed field.
You can then create another custom rule that references this changed feed data and further modify it.
Rule operations are handled in chronological order, so your logic will be applied according to how the feed data looks at the point in time after the last rule was compiled. Changing the order of your custom rules with the Move cursor will cause the compilation of those rules to change depending on the order in which the data is being updated.