Rule box category Add static or dynamic values
Learn how to use the rule box category Add static or dynamic value to set the needed values in your attributes in Productsup.
Introduction
The category Add static or dynamic values contains all rule boxes that can help you prepend, append, or assign desired values to an attribute. If needed, you can choose the requirements your current attribute values should meet for the platform to add new values.
This category can be divided into several subgroups. In the following sections, you can find how to use the rule boxes of the Add static or dynamic values category:
Adding a static value in an attribute means adding the same value to your products.
For example, if you apply a rule box that appends the static value BUY NOW to the title attribute where the current values are Red Wine Magnum, White Wine Standard, and Rosé Piccolo, your products will have the following titles:
Adding a dynamic value in an attribute means adding the values of another attribute to your products.
For example, if you apply a rule box that appends the dynamic value of the volume attribute to the title attribute where the current values are Red Wine Magnum, White Wine Standard, and Rosé Piccolo, your products will have the following titles:
If the values of the volume attribute change during the next site runs, the platform updates the title attribute with the corresponding updated values. For example, if the platform imports the value 2 L instead of 1.5 L for the product during the next site run, the platform updates the product's title from Red Wine Magnum 1.5 L to Red Wine Magnum 2 L
.
Add a static value without conditions
The Add static or dynamic values rule box category contains the rule boxes Append/Prepend Value and Static Value to let you add a desired static value to all products. These rule boxes don't let you set any conditions. They modify all values of the attribute where you apply them.
Append/Prepend Value
The Append/Prepend Value rule box adds a static value at the beginning or end of the current value across all products.
The difference between the Append/Prepend Value and Static Value rule boxes is that the latter rule box has more value modification options. See Static Value.
Take the steps from Add a rule box to add the Append/Prepend Value rule box.
In Mode, select a suitable value modification option:
append adds the desired value at the end of the current value. This is the default option.
prepend adds the desired value at the beginning of the current value.
In Value, enter a desired string that the rule box should add to all current values.
Tip
If you want to add a piece of text to your values, add a space character before or after the text to separate it from the rest of the value.
Select Save.
For example, you have the following values in your title attribute and want all products to have the text 30% OFF at the end of their titles. You can achieve this with the Append/Prepend Value rule box by entering 30% OFF
in Value:
title (before) | title (after) |
---|---|
Flat leather sandals with a bow |
|
High-heel sandals with a buckle |
|
|
Static Value
The Static Value rule box adds a value across all products by overwriting the existing value or adding the desired string at the beginning or end of the current value.
The difference between the Append/Prepend Value and Static Value rule boxes is that the latter rule box has more value modification options. See Append/Prepend Value.
Take the steps from Add a rule box to add the Static Value rule box.
In the Value field, enter a desired static value that the rule box should add to all products.
Tip
If you choose the append or prepend mode in the next step, add a space character before or after your provided static value to separate it from the rest of the current value.
In the drop-down menu, select a suitable value modification option:
assign completely overwrites the current value with the provided static value. This is the default option.
append adds the provided static value at the end of the current value.
prepend adds the provided static value at the beginning of the current value.
Select Save.
For example, you have the following values in your currency attribute and want all products to have the value EUR instead. You can achieve this with the Static Value rule box by entering EUR
in the Value field:
currency (before) | currency (after) |
---|---|
euro |
|
USD |
|
|
|
Add a dynamic value without conditions
The Add static or dynamic values rule box category contains the rule box Append/Prepend Column to let you add the dynamic values of a desired attribute to all products in the current attribute. This rule box doesn't let you set any conditions. It modifies all values of the attribute where you apply it.
Append/Prepend Column
The Append/Prepend Column rule box adds the values of a selected attribute at the beginning or end of the value in the current attribute and separates the added value from the rest of the value with a space character.
Take the steps from Add a rule box to add the Append/Prepend Column rule box.
In Column, select the attribute whose values you want to add to the current attribute. The attributes listed here come from a previous stage. The values you add also come from a previous stage.
In Mode, select a suitable value modification option:
append adds the dynamic values at the end of the current value. This is the default option.
prepend adds the dynamic values at the beginning of the current value.
Optionally, you can add a static text before or after the added dynamic values:
In the text field at the bottom, enter the static text you want to add to your current values together with the chosen dynamic values.
In the drop-down menu on the left, select where you want to add the desired static text:
Text Before adds the static text before the dynamic value. You may need to add a space character after your static text to separate it from the dynamic value.
Text After adds the static text after the dynamic value. You may need to add a space character before your static text to separate it from the dynamic value.
Select Save.
For example, you have the following values in your title attribute and want all products to feature the name of their brands from brand, introduced with by at the end of their titles. You can achieve this with the following setup of the Append/Prepend Column rule box:
brand (no changes) | title (before) | title (after) |
---|---|---|
Massimo Dutti | Flat leather sandals with a bow |
|
High-heel sandals with a buckle |
| |
COS | Square-toed loafers |
|
Add a static value if the current attribute meets a condition
The Add static or dynamic values rule box category contains the rule boxes Add Value if Fits, Append/Prepend Value if not Empty, Contains String, Extend Text, Set Value by Datetime, Set Value if Empty, Set Value if Greater Than, and Set Value if Less Than. These rule boxes let you add static values to your products if the current value meets a condition.
Tip
If you don't find a rule box with the needed condition in this section, see Add a static value if other attributes meet a condition. Although these rule boxes are initially meant to check the contents of other attributes for a condition, they can also help you add a static value to your current attribute if your current attribute meets a condition. You just need to choose your current attribute in the setup.
Add Value if Fits
The Add Value if Fits rule box lets you add a word or phrase to your current values if the overall length of the resulting value doesn't exceed a desired character limit.
Take the steps from Add a rule box to add the Add Value if Fits rule box.
In Mode, select where you want to add a string within the current value:
append adds the string at the end of the current value. To separate it from the rest of the text, add a space character at the beginning of your input in Step 3.
prepend adds the string at the beginning of the current value. To separate it from the rest of the text, add a space character at the end of your input in Step 3.
Enter the string you wish to append or prepend to your current values in Text.
Enter the desired character limit in Max Length.
Note
If a current value exceeds the character limit you set in this field, the Add Value if Fits rule box doesn't add any text to the value and doesn't cut it to fit the limit.
Select Save.
For example, you have the following values in the title attribute and want to add ORDER NOW at the end of each title if the overall length of the resulting value doesn't exceed 150 characters. You can achieve this with the following setup of the Add Value if Fits rule box:
Note
A space character at the beginning of the input in Text separates the added text from the current value.
title (before) | title (after) |
---|---|
Kitchen Container for Organic Waste - Pine Wood & Stainless Steel for Organic Leftovers - Dishwasher-Safe - Removable Lid - Removable Insert |
|
Medium-Size Kitchen Bin for Compost with Lid Indoor 8L - Green Plastic Container for Organic Waste - Ventilation Holes Preventing Humidity Build-Up and Odor Spreading to Kitchen |
|
The value Medium-Size Kitchen Bin for Compost with Lid Indoor 8L - Green Plastic Container for Organic Waste - Ventilation Holes Preventing Humidity Build-Up and Odor Spreading to Kitchen exceeds the 150-character limit, so the rule box doesn't add the text ORDER NOW.
Append/Prepend Value if not Empty
The Append/Prepend Value if not Empty rule box adds a static value at the beginning or end of the current value only if it contains any data.
Take the steps from Add a rule box to add the Append/Prepend Value if not Empty rule box.
In Mode, select a suitable value modification option:
append adds the desired value at the end of the current value. This is the default option.
prepend adds the desired value at the beginning of the current value.
In Value, enter a desired string that the rule box should add to the non-empty values in the current attribute.
Tip
Add a space character before or after the text to separate it from the rest of the value.
Select Save.
For example, you have the following values in your title attribute and want all products to have the text 30% OFF at the end of their titles unless a product has an empty value in title. You can achieve this with the Append/Prepend Value if not Empty rule box by entering 30% OFF
in Value:
title (before) | title (after) |
---|---|
Flat leather sandals with a bow |
|
High-heel sandals with a buckle |
|
Contains String
The Contains String rule box searches your current values for a certain string and, in case of a match, overwrites the entire current value with a new desired value. If there is no match, the rule box empties the current value or overwrites it with a provided alternative string.
Take the steps from Add a rule box to add the Contains String rule box.
In If value contains, enter the search term that the rule box should search for in your current values.
In Set value to, enter a new desired string that should overwrite the current value if your current value contains the provided search term.
Optionally, use the Otherwise set value to field to enter an alternative string that should overwrite the current value if there is no match with the search term. If you don't provide an alternative string, the rule box empties the values that don't contain your search term.
Select Save.
For example, you have the following values in your currency attribute and want to overwrite all values containing the word euro with EUR. If a value doesn't contain euro, it should be empty. You can achieve this with the following setup of the Contains String rule box:
currency (before) | currency (after) |
---|---|
euro |
|
Currency: euro |
|
United States dollar | |
euro |
|
Extend Text
The Extend Text rule box lets you increase the length of a text value by setting a desired character limit and, if a value is shorter, filling the rest of it with a desired text until it reaches the limit. If a value doesn't reach the character limit with the added text string, the rule box repeats the string as many times as necessary to reach the character limit. This rule box can be useful if you need to meet a minimum length requirement for an attribute's values.
You can also use the Lengthen Text data service to achieve similar results. See Shorten, lengthen, or create text from attributes with AI services.
Take the steps from Add a rule box to add the Extend Text rule box.
In length of the output string, enter a desired character limit that the rule box should meet when adding and repeating a string.
Note
If a current value exceeds the character limit you set in this field, the Extend Text rule box doesn't add any text to the value and doesn't cut it to fit the limit.
In fill character(s), enter the string you want the rule box to add and repeat in your text value until it reaches the desired character limit.
In the drop-down menu, select where you want to add the string within the value:
left adds the string at the beginning of the current value.
right adds the string at the end of the current value.
both adds the string both at the beginning and end of the current value.
Select Save.
For example, you have the following values in the short_description attribute and want each value to be exactly 30 characters long. Some values are shorter than that, so you want to add a piece of text to extend the length of those values and reach the desired 30-character limit. You can achieve this with the following setup of the Extend Text rule box:
short_description (before) | short_description (after) |
---|---|
Red Socks |
NoteThere is a space character at the end of the value. |
Pillow Case with Fluffy Eco-Feathers | Pillow Case with Fluffy Eco-Feathers |
Pajama Pants for Kids |
|
Set Value by Datetime
The Set Value by Datetime rule box compares a date value in an attribute with today's or another date to assign a new value based on the comparison. It follows this algorithm to compare dates and assign new values:
If |
| < |
| then | assign a new value. |
You can choose other inequality symbols, not only the less-than sign (<).
Take the steps from Add a rule box to add the Set Value by Datetime rule box.
Enter the date format used in your attribute in Date Format. See PHP: date - Manual for the supported formats.
In Operator, choose an operator to compare the dates in your values to a desired date specified in Step 4:
<
means the date specified in Step 4 should be less than the date in the attribute.<=
means the date specified in Step 4 should be less than or equal to the date in the attribute.>=
means the date specified in Step 4 should be greater than or equal to the date in the attribute.>
means the date specified in Step 4 should be greater than the date in the attribute.
In Set Days, define the date you want to compare your current values to by entering
-
or+
and a number of days:Enter
+0
to compare your date values to today's date.Enter
+1
to compare your date values to tomorrow's date.Enter
-1
to compare your date values to yesterday's date.
In Set value, enter the value you want to assign in the current attribute if a date in the attribute matches the set condition.
Select Save.
For example, you have the following values in the manufactured_on attribute and want to overwrite them with the value incorrect if the date in the attribute is later than last Friday, July 19, 2024. You can achieve this with the following setup of the Set Value by Datetime rule box:
manufactured_on (before) | manufactured_on (after) |
---|---|
2024-07-21 |
|
2024-07-19 | 2024-07-19 |
06.08.2024 | 16.08.2024 |
2024-07-16 | 2024-07-16 |
2024-10-03 |
|
Note
You apply the Set Value by Datetime rule box on Monday, July 22, 2024.
Set Value if Empty
The Set Value if Empty rule box overwrites empty values in the current attribute with a desired static value.
Take the steps from Add a rule box to add the Set Value if Empty rule box.
In Static value to set, enter the desired static value that the rule box should add in all empty values.
Select Save.
For example, you have the following values in your availability attribute and want all products with empty values to display out of stock. You can achieve this with the Set Value if Empty rule box by entering out of stock
in Static value to set:
availability (before) | availability (after) |
---|---|
in stock | in stock |
| |
in stock | in stock |
Set Value if Greater Than
The Set Value if Greater Than rule box checks if the current value contains a number greater than the provided threshold and, if so, overwrites the entire current value with a new desired string.
Take the steps from Add a rule box to add the Set Value if Greater Than rule box.
In Value >, enter a threshold for the rule box to compare your current numeric values against.
In Output, enter a new desired string that should overwrite the current value if it exceeds the threshold.
In If column value is not a number, select the desired behavior of the rule box if a current value isn't numeric:
leave unchanged doesn't modify non-numeric values at all. This is the default option.
treat as 0 overwrites non-numeric values with
0
.return empty string makes non-numeric values empty.
Select Save.
For example, you have the following values in your items_in_stock attribute and want to display plenty for all products that have more than 50 items in stock. You can achieve this with the following setup of the Set Value if Greater Than rule box:
items_in_stock (before) | items_in_stock (after) |
---|---|
7 | 7 |
55 |
|
50 | 50 |
fifty-eight | fifty-eight |
Set Value if Less Than
The Set Value if Less Than rule box checks if the current value contains a number less than the provided threshold and, if so, overwrites the entire current value with a new desired string.
Take the steps from Add a rule box to add the Set Value if Less Than rule box.
In Value >, enter a threshold for the rule box to compare your current numeric values against.
In Output, enter a new desired string that should overwrite the current value if it is lower than the threshold.
In If column value is not a number, select the desired behavior of the rule box if a current value isn't numeric:
leave unchanged doesn't modify non-numeric values at all. This is the default option.
treat as 0 overwrites non-numeric values with
0
.return empty string makes non-numeric values empty.
Select Save.
For example, you have the following values in your items_in_stock attribute and want to display last item! for all products that have only 1 item left in stock. You can achieve this with the following setup of the Set Value if Less Than rule box:
items_in_stock (before) | items_in_stock (after) |
---|---|
7 | 7 |
1 |
|
2 | 2 |
fifty-eight | fifty-eight |
Add a dynamic value if the current attribute meets a condition
The Add static or dynamic values rule box category contains the rule boxes Add Column if Fits, Append/Prepend Column if Value Not Present, and Set Column if Empty. These rule boxes let you add dynamic values of a selected attribute to the current attribute if the current value meets a condition.
Tip
If you don't find a rule box with the needed condition in this section, see Add a dynamic value if other attributes meet a condition. Although these rule boxes are initially meant to check the contents of other attributes for a condition, they can also help you add dynamic values to your current attribute if your current attribute meets a condition. You just need to choose your current attribute in the setup.
Add Column if Fits
The Add Column if Fits rule box lets you add the values of another attribute to your current values if the overall length of the resulting value doesn't exceed a desired character limit.
Take the steps from Add a rule box to add the Add Column if Fits rule box.
Select the attribute you want to add to your current values in Column.
In Mode, select where you want to add the values of the chosen attribute within the current values:
append adds the string at the end of the current value.
prepend adds the string at the beginning of the current value.
In Max Length, specify a character limit for the resulting values.
Optionally, you can add some text before or after the added attribute value:
Enter the desired text in the input field your text.
Open the drop-down menu on the left to select Text Before or Text After and choose whether to add the text before or after the added attribute value.
Select Save.
For example, you have the following values in the title attribute and want to add the color of the product at the end of each title if the overall length of the resulting value doesn't exceed 150 characters. You can achieve this with the following setup of the Add Column if Fits rule box:
color (no changes) | title (before) | title (after) |
---|---|---|
Green | Kitchen Container for Organic Waste - Pine Wood & Stainless Steel for Organic Leftovers - Dishwasher-Safe - Removable Lid - Removable Insert |
|
Orange | Medium-Size Kitchen Bin for Compost with Lid Indoor 8L - Green Plastic Container for Organic Waste - Ventilation Holes Preventing Humidity Build-Up and Odor Spreading to Kitchen | Medium-Size Kitchen Bin for Compost with Lid Indoor 8L - Green Plastic Container for Organic Waste - Ventilation Holes Preventing Humidity Build-Up and Odor Spreading to Kitchen |
The value Medium-Size Kitchen Bin for Compost with Lid Indoor 8L - Green Plastic Container for Organic Waste - Ventilation Holes Preventing Humidity Build-Up and Odor Spreading to Kitchen is over 150 characters long, so the rule box doesn't append the value Orange from color.
Append/Prepend Column if Value Not Present
The Append/Prepend Column if Value Not Present rule box adds the dynamic values of a selected attribute at the beginning or end of the current value if this data doesn't already exist in the current value. It also adds a space character to separate the added dynamic value from the rest of the current value.
Take the steps from Add a rule box to add the Append/Prepend Column if Value Not Present rule box.
In Column, select the attribute whose values you want to add to the current attribute. If a current value doesn't have the data stored in this selected attribute, the rule box adds this data to the current value.
The attributes listed here come from a previous stage. The values you add also come from a previous stage.
In Mode, select a suitable value modification option:
append adds the dynamic value at the end of the current value and separates it with a space character. This is the default option.
prepend adds the dynamic value at the beginning of the current value and separates it with a space character.
Optionally, you can add a static text before or after the added dynamic values:
In the text field at the bottom, enter the static text you want to add to your current values together with the chosen dynamic values.
In the drop-down menu on the left, select where you want to add the desired static text:
Text Before adds the static text before the dynamic value. You may need to add a space character after your static text to separate it from the dynamic value.
Text After adds the static text after the dynamic value. You may need to add a space character before your static text to separate it from the dynamic value.
Select Save.
For example, you have the following values in your title attribute and want to feature the name of the relevant brand from brand in your titles if the brand name isn't already present there. You want the newly added brand names to be introduced with by at the end of your product titles. You can achieve this with the following setup of the Append/Prepend Column if Value Not Present rule box:
brand (no changes) | title (before) | title (after) |
---|---|---|
Massimo Dutti | Flat leather sandals with a bow |
|
& Other Stories | High-heel sandals with a buckle by & Other Stories | High-heel sandals with a buckle by & Other Stories |
COS | Square-toed loafers |
|
Tall rubber boots | Tall rubber boots | |
Mango |
|
Set Column if Empty
The Set Column if Empty rule box overwrites empty values in the current attribute with the desired dynamic values of a selected attribute.
Take the steps from Add a rule box to add the Set Column if Empty rule box.
In Select an Option, select the attribute whose values you want to add to the empty values of the current attribute. The attributes listed here and their added values come from a previous stage.
Select Save.
For example, you have the following values in your description attribute and want all products with no descriptions to display the corresponding value from title as their description. You can achieve this with the Set Column if Empty rule box by choosing title in the rule box setup:
title (no changes) | description (before) | description (after) |
---|---|---|
Flat leather sandals with a bow | Comfortable leather flats with an orthopedic sole that makes sure your feet don't get tired during long, busy days | Comfortable leather flats with an orthopedic sole that makes sure your feet don't get tired during long, busy days |
High-heel sandals with a buckle |
| |
Square-toed loafers |
|
Add a static value if other attributes meet a condition
The Add static or dynamic values rule box category contains the rule boxes Set Value by Column Compare (Multicondition), Set Value by Compare, Set Value if Column Contains, Set Value if Contains, Set Value if Empty (Conditional), Set Value if Match (RegEx), Set Value If Value In, and Set Value If Value Not In. These rule boxes let you add static values to your current attribute if other attributes in your site meet a condition.
Set Value by Column Compare (Multicondition)
The Set Value by Column Compare (Multicondition) rule box adds a static value in the current attribute if both selected attributes meet a condition, such as contain desired values, contain no desired values, are less or greater than desired values, exactly equals desired values, etc. You can set up two different conditions using multiple values for each attribute.
Take the steps from Add a rule box to add the Set Value by Column Compare (Multicondition) rule box.
In Source Column 1, select the first attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the first Match type drop-down menu, choose a condition that the values of your first selected attribute should meet:
contains modifies the current value if the selected attribute contains the provided comparison value. This is the default option.
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In Source Column 2, select the second attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the second Match type drop-down menu, choose a condition that the values of your second selected attribute should meet:
contains modifies the current value if the selected attribute contains the provided comparison value. This is the default option.
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In the field Search Values Column1:Column2, enter the comparison values for your conditions in the following format: value for attribute 1:value for attribute 2.
Note
To enter multiple combinations of values, start each pair from a new line. If you enter multiple value combinations, they follow the
OR
logic. The rule box modifies the current value if the values of the selected attributes meet the chosen conditions based on at least one of the provided value pairs.In Set Value, enter the static value that should modify the current value if both conditions are met.
In the assign drop-down menu, select a suitable value modification option:
assign overwrites the current value with the desired static value. This is the default option.
append adds the desired static value at the end of the current value. You may need to add a space character before your static value to separate it from the rest of the value.
prepend adds the desired static value at the beginning of the current value. You may need to add a space character after your static value to separate it from the rest of the value.
Select Save.
For example, you have the following values in your title attribute and want to add the text 30% OFF at the end of all titles of kids' products that are currently on sale. These products have Yes in the sale attribute and kid in the age_group attribute. You want to avoid adding the text to products that belong both to kids' and adults' age groups. You can achieve this with the following setup of the Set Value by Column Compare (Multicondition) rule box:
sale (no changes) | age_group (no changes) | title (before) | title (after) |
---|---|---|---|
No | kid | Flat leather sandals with a bow | Flat leather sandals with a bow |
Yes | adult | High-heel sandals with a buckle | High-heel sandals with a buckle |
Yes | kid, adult | Square-toed loafers | Square-toed loafers |
Yes, on sale | kid | Eco-leather sneakers |
|
Yes | kid | Tall rubber boots |
|
If you select contain in the second Match type drop-down menu, the value Square-toed loafers changes to Square-toed loafers 30% OFF
because kid is a part of the corresponding value in age_group.
If you also want to add the text 30% OFF at the end of all titles of adult products on sale, which would change the title High-heel sandals with a buckle to High-heel sandals with a buckle 30% OFF
, you can add another value pair in Search Values Column1:Column2:
Set Value by Compare
The Set Value by Compare rule box adds a static value in the current attribute if a value in the selected attribute meets your desired condition, such as is less than or equal to a desired value, exactly equals a desired value, is greater than or equal to a desired value, etc.
The difference between Set Value by Compare and Set Value if Contains is that the former is mostly suitable for numeric values, while the latter works with alphanumeric values, provides more condition options, and lets you handle the cases when the condition isn't met. See Set Value if Contains.
Take the steps from Add a rule box to add the Set Value by Compare rule box.
In If, select the attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In Is, select the condition that the values of the chosen attribute should meet:
less than modifies the current value if a value in the selected attribute is less than the provided comparison value.
less or equal modifies the current value if a value in the selected attribute is less than or equal to the provided comparison value.
equal to modifies the current value if a value in the selected attribute is equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
greater than or equal modifies the current value if a value in the selected attribute is greater than or equal to the provided comparison value.
greater than modifies the current value if a value in the selected attribute is greater than the provided comparison value.
In value to compare, enter the comparison value you want to use for your condition. It can be a number or, less likely, a text string.
In Then, select a suitable value modification option:
assign column to overwrites the current value with the desired static value. This is the default option.
append adds the desired static value at the end of the current value. You may need to add a space character before your static value to separate it from the rest of the value.
prepend adds the desired static value at the beginning of the current value. You may need to add a space character after your static value to separate it from the rest of the value.
In output if comparison is true, enter the static value that should modify the current value if the condition is met.
Select Save.
For example, you have the following values in your title attribute and want to add the text Cheap at the beginning of titles for all cheaper products in the site, meaning that their values in the price attribute are less than 20. You can achieve this with the following setup of the Set Value by Compare rule box:
price (no changes) | title (before) | title (after) |
---|---|---|
12.57 | Flat leather sandals with a bow |
|
323.69 | High-heel sandals with a buckle | High-heel sandals with a buckle |
20.00 | Square-toed loafers | Square-toed loafers |
3.39 |
| |
10.50 | Tall rubber boots |
|
Set Value if Column Contains
The Set Value if Column Contains rule box adds a static value in the current attribute if a selected attribute contains a corresponding search term. You can enter multiple pairs of search terms and desired static values in this rule box.
The difference between Set Value if Contains and Set Value if Column Contains is the ability of the latter to consider multiple search terms and desired static values, while the former lets you use conditions other than contains and handles the cases when the condition isn't met. See Set Value if Contains.
Take the steps from Add a rule box to add the Set Value if Column Contains rule box.
In Column, select the attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the input area, use the format search term:static value to enter the desired search terms and static values. The rule box looks for the search terms in the chosen attribute and, if a search term is present there, uses the corresponding static value to modify the current value.
Note
To enter multiple pairs of search terms and static values, start each pair from a new line.
In Mode, select a suitable value modification option:
assign overwrites the current value with the desired static value. This is the default option.
append adds the desired static value at the end of the current value and separates it from the rest of the value with a space character.
prepend adds the desired static value at the beginning of the current value and separates it from the rest of the value with a space character.
In Match Mode, select how strict the match of the search term should be:
broad matches the search term with any part of a word within a value and isn't case-sensitive.
Caution
The broad match mode can significantly increase your site processing times. If applicable, we recommend choosing the exact match mode instead.
exact matches the search term only with entire words within a value and is case-sensitive.
In Find, select how many matches the rule box should search for if you have more than one pair of search term:static value:
first finds only the first match of a search term within a value and modifies the current value with one corresponding static value. This is the default option.
all finds all matches of all search terms within a value and modifies the current value with all corresponding static values.
Select Save.
For example, you have the following values in your title attribute and want to use the description attribute to add more information to your titles:
If a product description mentions the brand Prada, you want to add High-Fashion at the end of the title.
If a product description mentions the brand Gucci, you want to add Haute Couture at the end of the title.
If a product description mentions skirt, you want to add Female at the end of the title.
If a product description mentions autumn, you want to add Rainproof at the end of the title.
You can achieve this with the following setup of the Set Value if Column Contains rule box:
description (no changes) | title (before) | title (after) |
---|---|---|
Everyday leather flats by Prada. Perfect for summer and easy to combine with all types of clothes. | Flat Leather Sandals With A Bow |
|
Soft-top shoes by Manolo Blahnik with a 9 cm heel, a round front, and an ankle chain element. Perfect for summer. An ideal option for chic looks with skirts and dresses. | High-Heel Sandals With A Buckle | High-Heel Sandals With A Buckle |
Glossy black leather shoes by Gucci with a 3D pattern, a 3 cm thick sole, a squared front, and a fringe deco element. Perfect for early to mid autumn and easy to combine with coats, pants, skirts, and other types of clothes. | Square-Toed Loafers |
|
If you choose assign to overwrite your titles with the relevant static values, you get the following output:
title (before) | title (after) |
---|---|
Flat Leather Sandals With A Bow |
|
High-Heel Sandals With A Buckle | High-Heel Sandals With A Buckle |
Square-Toed Loafers |
NoteThe rule box uses the static value of the last search term match. |
If you choose prepend to add the relevant static values at the beginning of your titles, you get the following output:
title (before) | title (after) |
---|---|
Flat Leather Sandals With A Bow |
|
High-Heel Sandals With A Buckle | High-Heel Sandals With A Buckle |
Square-Toed Loafers |
NoteWith every search term match, the rule box adds every new corresponding static value at the beginning of the title. |
Set Value if Contains
The Set Value if Contains rule box adds a static value in the current attribute if a selected attribute contains a desired value. Alternatively, the rule box can add a static value to the current attribute if the selected attribute meets other conditions, such as contains no desired value, is less or greater than a desired value, exactly equals a desired value, etc.
The difference between Set Value by Compare and Set Value if Contains is that the former is mostly suitable for numeric values, while the latter works with alphanumeric values, provides more condition options, and lets you handle the cases when the condition isn't met. See Set Value by Compare.
The difference between Set Value if Contains and Set Value if Column Contains is the ability of the latter to consider multiple search terms and desired static values, while the former lets you use conditions other than contains and handle the cases when the condition isn't met. See Set Value if Column Contains.
Take the steps from Add a rule box to add the Set Value if Contains rule box.
In Source Column, select the attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the compare value field, enter the comparison value you want to use for your condition. It can be a text string or a number.
In the contains drop-down menu, choose the needed condition:
contains modifies the current value if the selected attribute contains the provided comparison value. This is the default option.
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
!= modifies the current value if a value in the selected attribute is numeric and doesn't equal the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute doesn't exactly match the provided comparison value. The option is case-sensitive.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In the assign value field, enter the static value that should modify the current value if the condition is met.
In the assign drop-down menu, select a suitable value modification option:
assign overwrites the current value with the desired static value. This is the default option.
append adds the desired static value at the end of the current value. You may need to add a space character before your static value to separate it from the rest of the value.
prepend adds the desired static value at the beginning of the current value. You may need to add a space character after your static value to separate it from the rest of the value.
leave unchanged doesn't modify the current value at all.
Optionally, you can choose an alternative value modification option for cases when your selected condition isn't met:
In the handle no match drop-down menu, choose what the rule box should do if the condition isn't met:
leave unchanged doesn't modify the current value at all. This is the default option.
assign overwrites the current value with an alternative static value, even if the current value is empty.
append adds an alternative static value at the end of the current value, even if the current value is empty. You may need to add a space character before your alternative static value to separate it from the rest of the value.
prepend adds an alternative static value at the beginning of the current value, even if the current value is empty. You may need to add a space character after your alternative static value to separate it from the rest of the value.
If your chosen value modification option requires an alternative static value, enter it in change to.
Select Save.
For example, you have the following values in your title attribute and want to add the text 30% OFF at the end of all titles if a product is currently on sale, meaning that it has Yes in the sale attribute. You can achieve this with the following setup of the Set Value if Contains rule box:
sale (no changes) | title (before) | title (after) |
---|---|---|
Yes | Flat leather sandals with a bow |
|
No | High-heel sandals with a buckle | High-heel sandals with a buckle |
Yes, on sale | Square-toed loafers |
|
Yes |
| |
Tall rubber boots | Tall rubber boots |
If you select = in the contains drop-down menu, the value Square-toed loafers stays unchanged because its corresponding value in sale contains additional symbols besides Yes.
Set Value if Empty (Conditional)
The Set Value if Empty (Conditional) rule box finds empty values in the current attribute and overwrites them with a static value if a selected attribute meets a condition.
Take the steps from Add a rule box to add the Set Value if Empty (Conditional) rule box.
In Source Column, select the attribute whose values should determine if the rule box adds a static value in the empty values of the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the compare value field, enter the comparison value you want to use for your condition. It can be a text string or a number.
In the contains drop-down menu, choose the needed condition:
contains modifies the current value if the selected attribute contains the provided comparison value. This is the default option.
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
!= modifies the current value if a value in the selected attribute is numeric and doesn't equal the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute doesn't exactly match the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In Set Value, enter the static value that should overwrite your current empty values if the condition is met.
Select Save.
For example, you have the following values in your shipping attribute and want to add free to products with empty values if they weigh less than 0.5 kg according to the weight attribute. You can achieve this with the following setup of the Set Value if Empty (Conditional) rule box:
weight (no changes) | shipping (before) | shipping (after) |
---|---|---|
0.125 |
| |
3.269 | 7.28 | 7.28 |
0.200 | 1.57 | 1.57 |
1.269 | ||
13.75 | 13.75 | |
0.250 |
|
Set Value if Match (RegEx)
The Set Value if Match (RegEx) rule box assigns a static value in the current attribute if a selected attribute contains a regex match.
Take the steps from Add a rule box to add the Set Value if Match (RegEx) rule box.
In Column, choose the attribute you want to search for regex matches.
Enter a valid regex in RegEx. See regex101 to verify your regular expressions.
Note
Make sure to add a forward slash (
/
) or a hash sign (#
) at the start and end of your regular expression.In Assign, specify the value that the current attribute should display if the platform finds a regex match in the searched attribute.
In the handle no match drop-down menu, choose how the platform should treat the values of the current attribute if there is a product with no regex match in the searched attribute:
leave unchanged makes sure the values of the current attribute stay the same.
assign makes sure the platform changes the values of the current attribute. Enter what value the platform should assign to products with no matches in change to.
Select Save.
For example, you can use the Set Value if Match (RegEx) rule box to get the price_range attribute to contain information on whether a product is cheap or expensive based on the values of the price attribute.
The regex /\b(?:0*[1-9]|[12][0-9])\$/
lets the rule box search the price attribute for products that cost less than 30$. If the platform finds a product that costs less than that, it assigns the value cheap to this product in the price_range attribute. If the platform discovers products that don't match the regex and cost 30$ or more, such products get the value expensive.
price (no changes) | price_range (before) | price_range (after) |
---|---|---|
11$ | 10-19$ |
|
20$ | 20-29$ |
|
90$ | 90-99$ |
|
110$ | 110-119$ |
|
Set Value If Value In
The Set Value If Value In rule box adds a static value in the current attribute if a selected attribute contains a match of at least one of the provided search terms.
Take the steps from Add a rule box to add the Set Value If Value In rule box.
In Source Column, select the attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the field searchterms newline separated, enter the search terms you want the rule box to find in the selected attribute.
Tip
If you want to search for multiple terms, start each search term from a new line.
In Match, select how strict the match of the search term should be:
broad matches the search term with any part of a value and isn't case-sensitive.
Caution
The broad match mode can significantly increase your site processing times. If applicable, we recommend choosing the exact match mode instead.
exact matches the search term only with entire values and is case-sensitive.
In Set Value, enter the static value that should overwrite your current values if the rule box finds a match in the selected attribute.
Select Save.
For example, you have the following values in your season attribute and want to add the text autumn, winter to products with the titles Tall rubber boots and Square-Toed Loafers. You can achieve this with the following setup of the Set Value If Value In rule box:
title (no changes) | season (before) | season (after) |
---|---|---|
Tall rubber boots | all |
|
Square-Toed Loafers | all |
|
Columbia Rainproof Hiking Jacket | summer | summer |
The rule box doesn't change the value in the last row because the provided search term doesn't exactly match the corresponding title. That title uses a different case and has one more word and one more space character.
Set Value If Value Not In
The Set Value If Value Not In rule box adds a static value in the current attribute if a selected attribute contains no match of at least one of the provided search terms.
Take the steps from Add a rule box to add the Set Value If Value Not In rule box.
In Source Column, select the attribute whose values should determine if the rule box adds a static value in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the field searchterms newline separated, enter the search terms you want the rule box to look for in the selected attribute.
Tip
If you want to search for multiple terms, start each search term from a new line.
In Match, select how strict the match of the search term should be:
broad matches the search term with any part of a value and isn't case-sensitive.
Caution
The broad match mode can significantly increase your site processing times. If applicable, we recommend choosing the exact match mode instead.
exact matches the search term only with entire values and is case-sensitive.
In Then, select a suitable value modification option:
assign overwrites the current value with the desired static value. This is the default option.
append adds the desired static value at the end of the current value and separates it from the rest of the value with a space character.
prepend adds the desired static value at the beginning of the current value and separates it from the rest of the value with a space character.
In Set Value, enter the static value that should modify your current values if the rule box finds no match in the selected attribute.
Select Save.
For example, you have the following values in your season attribute and want to change them to autumn, winter for all products except the ones titled Flat leather sandals with a bow, High-heel sandals with a buckle, and Blue flip-flops. You can achieve this with the following setup of the Set Value If Value Not In rule box:
title (no changes) | season (before) | season (after) |
---|---|---|
Tall rubber boots | all |
|
Flat leather sandals with a bow | summer | summer |
Columbia Rainproof Hiking Jacket | summer |
|
High-heel sandals with a buckle | summer | summer |
Blue Flip-Flops | all |
|
The rule box changes the value in the last row because the provided search term doesn't exactly match the corresponding title. The title uses a different case.
Add a dynamic value if other attributes meet a condition
The Add static or dynamic values rule box category contains the rule boxes Set Column by Column Compare, Set Column if Contains, Set Column if not Empty, Set Value by Column Compare, and Set Value if List Match (String). These rule boxes let you add dynamic values of a chosen attribute to your current attribute if other attributes in your site meet a condition.
Set Column by Column Compare
The Set Column by Column Compare rule box adds dynamic values in the current attribute if two selected numeric attributes meet a condition. For example, if a value in attribute A is greater than the value in attribute B, the rule box overwrites the current value with the value from attribute C.
Take the steps from Add a rule box to add the Set Column by Column Compare rule box.
In the first Select an Option drop-down list, select the first attribute whose values should determine if the rule box adds dynamic values in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the > drop-down menu, choose a condition that the values of your two selected attributes should meet:
> modifies the current value if a value in the first attribute is greater than the value in the second attribute. This is the default option.
< modifies the current value if a value in the first attribute is less than the value in the second attribute.
>= modifies the current value if a value in the first attribute is greater than or equal to the value in the second attribute.
<= modifies the current value if a value in the first attribute is less than or equal to the value in the second attribute.
== modifies the current value if a value in the first attribute is equal to the value in the second attribute.
!= modifies the current value if a value in the first attribute isn't equal to the value in the second attribute.
In the second Select an Option drop-down list, select the second attribute whose values should determine if the rule box adds dynamic values in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In set column, select the attribute whose dynamic values should overwrite the current values if the chosen condition is true. The attributes listed here and their added dynamic values come from a previous stage.
Select Save.
For example, you have the following values in your description attribute and want to overwrite them with the values from shipping_conditions if the value in import_tax is greater than the value in shipping_cost. You can achieve this with the following setup of the Set Column by Column Compare rule box:
import_tax (no changes) | shipping_cost (no changes) | shipping_conditions (no changes) | description (before) | description (after) |
---|---|---|---|---|
74.44 | 17.57 | Shipping across Germany within 5 working days. Shipping internationally within 15 working days. Special import conditions apply. | The manufacturer uses only natural and hypoallergenic materials to produce these dog beds. |
|
0 | 3.69 | Shipping across Germany within 2 working days. Shipping internationally within 5 working days. | The manufacturer uses only natural and hypoallergenic materials to produce these dog blankets. Colors available: brown, gray, green, and blue. Size range: XS, S, M, L, XL, XXL. | The manufacturer uses only natural and hypoallergenic materials to produce these dog blankets. Colors available: brown, gray, green, and blue. Size range: XS, S, M, L, XL, XXL. |
80.47 | 34.89 | Shipping across Germany within 7 working days. Shipping internationally within 20 working days. Special import conditions apply. | The manufacturer uses only natural and hypoallergenic materials to produce these climbing trees for cats. Colors available: beige, gray, white, black, and brown. Size range: M, L, and XL. |
|
Set Column if Contains
The Set Column if Contains rule box adds dynamic values in the current attribute if a selected attribute contains a desired value. Alternatively, the rule box can add dynamic values to the current attribute if the selected attribute meets other conditions, such as contains no desired value, is less or greater than a desired value, exactly equals a desired value, etc.
Take the steps from Add a rule box to add the Set Column if Contains rule box.
In Source Column, select the attribute whose values should determine if the rule box adds dynamic values in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the compare value field, enter the comparison value you want to use for your condition. It can be a text string or a number.
In the contains not drop-down menu, choose the needed condition:
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value. This is the default option.
contains modifies the current value if the selected attribute contains the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
!= modifies the current value if a value in the selected attribute is numeric and doesn't equal the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute doesn't exactly match the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In the assign drop-down menu, select a suitable value modification option:
assign overwrites the current value with the dynamic value of the needed attribute. This is the default option.
append adds the dynamic value of the needed attribute at the end of the current value and separates it from the rest of the value with a space character.
prepend adds the dynamic value of the needed attribute at the beginning of the current value and separates it from the rest of the value with a space character.
leave unchanged doesn't modify the current value at all.
In Select an Option next to the assign drop-down menu, choose the needed attribute whose dynamic values the rule box should use to modify your current values. The attributes listed here and their added dynamic values come from a previous stage.
Optionally, you can choose an alternative value modification option for cases when your desired condition isn't met:
In the handle no match drop-down menu, choose what the rule box should do if the condition isn't met:
leave unchanged doesn't modify the current value at all. This is the default option.
assign overwrites the current value with a static value, even if the current value is empty.
append adds a static value at the end of the current value, even if the current value is empty, and separates it from the rest of the value with a space character.
prepend adds a static value at the beginning of the current value, even if the current value is empty, and separates it from the rest of the value with a space character.
If your chosen value modification option requires a static value, enter it in change to.
Select Save.
For example, you have the following values in your title attribute and want to add the dynamic values of the sale_percentage attribute at the end of your titles for the products that cost 15.00 EUR and less according to their sale_price attribute. If a product on sale costs more than 15.00 EUR, you want to add the text ON SALE at the end of the title. You can achieve this with the following setup of the Set Column if Contains rule box:
sale_price (no changes) | sale_percentage (no changes) | title (before) | title (after) |
---|---|---|---|
10.50 | 17% OFF |
| |
300.00 | 8% OFF | Tall rubber boots | Tall rubber boots |
15.00 | 58% OFF | Eco-leather sneakers | Eco-leather sneakers |
2.30 | 33% OFF | Flat leather sandals with a bow | Flat leather sandals with a bow |
4.45 | High-heel sandals with a buckle | High-heel sandals with a buckle |
Set Column if not Empty
The Set Column if not Empty rule box overwrites the values of the current attribute with the dynamic values of a selected attribute if the selected attribute isn't empty.
Take the steps from Add a rule box to add the Set Column if not Empty rule box.
In Select an Option, select the attribute whose non-empty values the rule box should add in the current attribute. The attributes listed here and their added values come from a previous stage.
Select Save.
For example, you have the following values in your price attribute and want to overwrite them with the values of the sale_price attribute if they aren't empty. This way, products without a sale price keep their current prices untouched. You can achieve this with the Set Column if not Empty rule box by choosing sale_price in the setup:
sale_price (no changes) | price (before) | price (after) |
---|---|---|
10.50 | 12.57 |
|
323.69 | 323.69 | |
15.00 | 34.89 |
|
2.30 |
|
Set Value by Column Compare
The Set Value by Column Compare rule box modifies your current values with either a static value or the dynamic values of the needed attribute if two selected attributes meet the defined conditions, such as contain desired values, contain no desired values, are less or greater than desired values, exactly equals desired values, etc.
The second attribute and its condition are optional. You can use this rule box to set only one condition. If you set two, both conditions must be true for the rule box to modify the values of the current attribute.
Take the steps from Add a rule box to add the Set Value by Column Compare rule box.
Set up the first condition that must be true for the rule box to modify your current values:
In Source Column, select the first attribute whose values should determine if the rule box modifies values in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the contains drop-down menu, choose the needed condition for your first attribute:
contains modifies the current value if the selected attribute contains the provided comparison value. This is the default option.
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
!= modifies the current value if a value in the selected attribute is numeric and doesn't equal the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute doesn't exactly match the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In the compare source value field, enter the comparison value you want to use for your first condition. It can be a number or a text string.
Optionally, set up the second condition that must be true for the rule box to modify the current values:
In Optional Column, select the second attribute whose values should determine if the rule box modifies values in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In the contains drop-down menu, choose the needed condition for your second attribute:
contains modifies the current value if the selected attribute contains the provided comparison value. This is the default option.
contains not modifies the current value if the selected attribute doesn't contain the provided comparison value.
< modifies the current value if a value in the selected attribute is numeric and is less than the provided comparison value.
<= modifies the current value if a value in the selected attribute is numeric and is less than or equal to the provided comparison value.
!= modifies the current value if a value in the selected attribute is numeric and doesn't equal the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute doesn't exactly match the provided comparison value. The option is case-sensitive.
= modifies the current value if a value in the selected attribute is numeric and equal to the provided comparison value.
Note
This option also works with text values. The rule box modifies the current value if a value in the selected attribute exactly matches the provided comparison value. The option is case-sensitive.
>= modifies the current value if a value in the selected attribute is numeric and is greater than or equal to the provided comparison value.
> modifies the current value if a value in the selected attribute is numeric and is greater than the provided comparison value.
In the compare source value field, enter the comparison value you want to use for your second condition. It can be a number or a text string.
Define how you want to modify your current values if the conditions are true:
Choose whether you want to modify the current values with a static value or the dynamic values of another attribute:
In Set Value, enter a static value if you want to modify your current values with it.
In Set Column, choose the needed attribute if you want to modify your current values with its dynamic values.
Note
If you enter a static value in Set Value and choose an attribute in Set Column, the rule box uses only the dynamic values of the chosen attribute without the entered static value.
In the assign drop-down menu, select a suitable value modification option:
assign overwrites the current value with the provided static value or the dynamic value of the needed attribute. This is the default option.
append adds the provided static value or the dynamic value of the needed attribute at the end of the current value without separating the added value from the rest of the current value with a space character. If you are adding a static value, you may need to add a space character at the start of it to separate it from the rest of the value. If you are adding dynamic values, you can't separate them from the rest of the current values with spaces using this rule box.
prepend adds the provided static value or the dynamic value of the needed attribute at the beginning of the current value without separating the added value from the rest of the current value with a space character. If you are adding a static value, you may need to add a space character at the end of it to separate it from the rest of the value. If you are adding dynamic values, you can't separate them from the rest of the current values with spaces using this rule box.
Select Save.
For example, you have the following values in your title attribute and want to add the dynamic values from the sale_promo_text attribute at the end of all titles if a product costs 50 EUR or less and has the value in stock in availability. You can achieve this with the following setup of the Set Value by Column Compare rule box:
price (no changes) | availability (no changes) | sale_promo_text (no changes) | title (before) | title (after) |
---|---|---|---|---|
12.57 | out of stock | 17% OFF | Flat leather sandals with a bow | Flat leather sandals with a bow |
323.69 | in stock | 8% OFF | High-heel sandals with a buckle | High-heel sandals with a buckle |
34.89 | in stock | 58% OFF | Square-toed loafers | Square-toed loafers |
10.50 | in stock | Tall rubber boots | Tall rubber boots |
In the last row, the rule box would add the value of sale_promo_text at the end of the title Tall rubber boots if the added dynamic value weren't empty.
If the product with the title Square-toed loafers had anything else besides in stock in availability, the rule box wouldn't change the title because the chosen second condition is =, which requires an exact match of the value.
Set Value if List Match (String)
The Set Value if List Match (String) rule box modifies the current attribute with replace terms from a replacement list if a selected attribute contains search terms from that replacement list. See Lists feature for more information on using lists.
Go to Lists from your site's main menu and add all terms you need to replace to the Standard, Dynamic, or Attribute-based Replacement list. See Replacement lists to choose a required type.
Take the steps from Add a rule box to add the Set Value if List Match (String) rule box.
In Column, select the attribute whose values should determine if the rule box modifies values in the current attribute. The attributes listed here and their searched contents come from a previous stage.
In List, choose the needed replacement list. The rule box searches the chosen attribute for matches with the terms on this list.
In Format, select a suitable value modification option:
assign overwrites the current value with a replace term from the chosen list. This is the default option.
append adds a replace term from the chosen list at the end of the current value and separates it from the rest of the value with a space character.
prepend adds a replace term from the chosen list at the beginning of the current value and separates it from the rest of the value with a space character.
replace finds a search term from the chosen list in the selected attribute, looks for the same match in the current attribute, and substitutes the match with a corresponding replace term.
In Find, select how many list matches the rule box should search for in the selected attribute:
first finds only the first match of a search term within a value and modifies the current value with one corresponding replace term. This is the default option.
all finds all search term matches within a value and modifies the current value with all corresponding replace terms.
In Case, select between sensitive and insensitive if the search needs to consider capitalization. This choice influences the search in both the selected and the current attributes.
In Match entire word, select whether a term from the replacement list has to match an entire word within the value or it is enough to match a part of a word. This choice influences the search in both the selected and the current attributes.
no accepts search term matches if they match a part of a word or an entire word within the value.
yes accepts search term matches only if they match an entire word within the value.
Optionally, you can choose an alternative value modification option for cases when a value in the selected attribute doesn't match any terms on the list:
In the handle no match drop-down menu, choose what the rule box should do if there is no match:
leave unchanged doesn't modify the current value at all. This is the default option.
assign overwrites the current value with a static value, even if the current value is empty.
If you choose assign as your alternative value modification option, enter the desired static value in change to.
Select Save.
For example, you have a Standard Replacement list called replacement. It maps the following values to their corresponding replace terms:
If your title attribute contains a search term from the Standard Replacement list and the color attribute contains the same search term, you want to substitute the color mentioned in the title with the corresponding replace term from the list. You want to search for all possible list matches within the attributes, ignore capitalization, and exclude cases when a search term matches only a part of a word instead of the whole word. You can achieve this with the following setup of the Set Value if List Match (String) rule box:
color (no changes) | title (before) | title (after) |
---|---|---|
This is a blackLeather sandal | Flat leather sandals with a bow, black | Flat leather sandals with a bow, black |
The color is orange | High-heel sandals with a buckle, orange | High-heel sandals with a buckle, |
green | Square-toed loafers, black | Square-toed loafers, black |
Black, green | Tall rubber boots, black, green | Tall rubber boots, |
If you choose to append terms from the list rather than replace them, your title attribute doesn't have to contain the search terms for the rule box to modify your current values. When appending the replace terms, you get the following result:
color (no changes) | title (before) | title (after) |
---|---|---|
This is a blackLeather sandal | Flat leather sandals with a bow | Flat leather sandals with a bow |
The color is orange | High-heel sandals with a buckle | High-heel sandals with a buckle |
green | Square-toed loafers | Square-toed loafers |
Black, green | Tall rubber boots | Tall rubber boots |