How to create basic rules

This article will walk you through the steps needed to create basic data manipulation rules within the IR Platform

Firstly, you will need to navigate to Data > Product Viewer > Rules:

This will open the Rules tab showing you a list of any existing rules in your account and some key information about these, as well as giving you the ability to create a new rule by clicking 'Add Rule':

 

A rule is broken down into two elements. Firstly a Condition - defining the products that we want to make a change to. And then an Action - the change that we want to make.

Rules are formed in a simple boolean logic. If this; then do that. 

 

Before we set the Condition of our Rule, we must first give it a Name and a Group:

Name - What is the rule doing? 
Group - What type of rule is it? This will be used to help you filter and search through your rules

Once this has been assigned, we can then move on to setting our Condition:


First, we must select the column that contains our data. You can search through all of your Source Feed Fields and Master Feed Fields, by searching in the box below and then selecting the appropriate attribute:

Next, we must choose how we will match the Condition:


Some common examples of matching options are as follows:

Always - Apply the rule to every product
Equals - Search using an exact match logic
Contains - Search using a partial match logic 
Less Than/Greater Than - Identify any product that has a value less/greater than a nominated  value 
Between - Search for a range of values

Once we have chosen our preferred matching criteria, you will then need to specify to value of the Condition. This can either be a Free Text input, or a selection of another field.

For Example, if we wanted to identify any products where the Name does not contain a Brand value, we would write the rule like below:

We can add additions or exceptions to this logic, by extending the Condition with an 'AND' or 'OR' statement, like below:

In this instance we are identifying all Products where the Product Name does not contain and Brand value AND the Brand equals Nike. 

Once we have defined the condition of our rule, we need to set an action:

Replace - Overwrite any existing value in a nominated field
Find and Replace -
Find and replace a value, within a nominated field
Add to the left/right -
Add a value to the Start or End of an exisiting value
Add/Subtract/Multiply/Divide -
Mathematical actions applied to numerical values
Do not export -
Exclude these products from the nominated feed

Once we have chosen an Action type, we must nominate a field to apply the action to:

This can be done by opening the drop down and selecting the appropriate field.

Once this has been selected, we must complete the action and this step will vary based on the action chosen. Some examples have been included below:


Replace:


Find and Replace:

Add to left/right:


Add/Subtract/Multiply/Divide:


One we have set both the Condition and Action for a rule, we can then use the Preview function to check that the correct action has been applied, before saving:

If the rule preview is correct, Click Apply to save the Rule and then rebuild your feed to apply the change: