Search for and replace data
Search for and replace data with rule boxes in Productsup.
Introduction
Certain rule boxes let you search for keywords and replace parts of your data in bulk.
Choose the most appropriate rule box from the following list. Select the links to go directly to the necessary rule box description:
Search for and replace static text - Set of rule boxes that replace the same value for all products in the column.
Search for and replace dynamic text based on condition - Set of rule boxes that replace values that differ per product.
Other Search for and replace rule boxes:
Remove Duplicate Words - A rule box that removes duplicate words.
Text Replace if Column Contains - A rule box that replaces text based on a condition related to another column.
Replaces in Between - A rule box that replaces the text between two words or symbols.
Remove Terms in Brackets - A rule box that removes values between two brackets.
Search for and replace static text
You can search for and replace values across all products in your column with the help of rule boxes. The conditions are static and affect all products containing the search value.
Note
Consider using Lists instead if you are searching for and replacing over 100 conditions. See Replace feed terms with the Standard Replacement list.
There are three rule boxes for static text replacement:
Text Replace - A rule box that replaces the same values for all products in one column with another specified value.
Map-Replace - A rule box that replaces values within a string with another specified value.
Mapping - A rule box replaces the entire string with another specified value.
Replace static text with the Text Replace rule box
To search for and replace the same values for all products in one column, use the Text Replace rule box:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Text Replace rule box.
Enter the value you wish to replace in the Search for field.
Enter the value you wish to have instead of the existing value in the Replace by field. Leave the Replace by field empty to delete your search term or whitespaces. To remove whitespace, see Clean and format your data.
Choose how sensitive your search is relating to capitalization in Case:
Sensitive: The search takes capitalization into account.
Insensitive: Capitalization has no effect.
Select Save to apply the rule.

The Text Replace rule box result:
Before | After |
---|---|
In this example, the word "exists" exists two times. | In this example, the word "appears" appears two times. |
Replace multiple values with Map-Replacing or Mapping rule boxes
Instead of applying several Text Replace rule boxes to replace multiple values in a column, you can apply only a single Map-Replace or Mapping rule box.
The difference between the Map-Replace and Mapping boxes is that Map-Replace searches for and matches values within a string, while Mapping searches for and matches values only if the entire string matches.
For example:
1. Map-Replace: If the input value is Jordan 1
, then the rule replaces both Jordan 1
and Air Jordan 1
:

2. Mapping: If the input value is Jordan 1
, then the rule only matches Jordan 1
and does not replace Air Jordan 1
because the search doesn't match the entire string.

The following sections explain each rule box in detail.
Map-Replace rule box
To replace several different values within a string, apply a single Map-Replace box:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Map-Replace rule box.
Enter each search value line by line into the field.
Add the delimiter directly after your search term. The rule box selects Colon (:) as a default. But you can choose another delimiter in the List Delimiter drop-down menu if, for example, the delimiter is a part of the phrase you want to replace.
Enter the replace value directly after the delimiter.
Choose how sensitive your search is relating to capitalization in Case:
Sensitive: The search takes capitalization into account.
Insensitive: Capitalization has no effect.
Select Save to apply the rule.

The Map-Replace rule box result:
Before | After |
---|---|
Please note: you should customize the delimiter in your map-replace box if it appears in your search search or replaces terminologies. | It's important to know that you should customize the delimiter in your map-replace box if it appears in your search or replaces terms. |
Mapping rule box
Unlike Map-Replace, which replaces multiple values within a string, the Mapping rule box replaces the entire string. To apply the Mapping rule box:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Map-Replace rule box.
Enter your search value line by line into the field.
Add the
colon (:)
delimiter directly after your search value.Enter the replace value directly after the delimiter.
Choose how sensitive your search is relating to capitalization in Case:
Sensitive: The search takes capitalization into account.
Insensitive: Capitalization has no effect.
Select Save to apply the rule.

The Mapping rule box result:
Before | After |
---|---|
blue | cyan |
This product is blue. | This product is blue. |
In the second case, blue
doesn't change, as the entire string doesn't match the input.
The order of rules operations
When applying the Map-Replace or Mapping rule boxes, remember that the order of the input values is essential, and the order change can lead to different results. The rules process each replacement operation in order from top to bottom.
Example 1: This is the result of replacement if the order of lines in the Map-Replace field is as follows:

Example 2: With the reverse order, you get a different result from Example 1.

Search for and replace dynamic text based on a condition
You can add rules that search for and replace terms across all products in your column based on a condition. The conditions are dynamic and affect only products that meet the condition.
There are several rule boxes to replace text dynamically based on conditions:
Replace Dynamic Values - A rule box that replaces values taken from another column or sets a static value.
Replace if Column Contains - A rule box that replaces a value if there is a match with another column.
Compare Columns - A rule box that assigns a value if data in two columns match.
Replace Dynamic Values rule box
The Replace Dynamic Value rule box searches for and replaces a value taken from another column. For example, if your title includes data from the brand column, you can replace the data from the brand column with the data from a selected column or a static value.
Nothing changes if the current column does not contain data from another column. For example, if data from the brand column is not in your title, then no replacement happens.
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Replace Dynamic Values rule box.
Choose a column you want to replace in the Search Column drop-down menu.
Choose an option in the Replace Column or enter a value in the Static Value that should appear instead.
Choose if the matching should be broad or exact in Match Type drop-down menu:
broad: The Search Column input includes the search term.
exact: The search term matches the entire input in the Search Column.
Select Save to apply the rule.

In this example, the platform replaces the data from the availability column with a static value:
Before | After |
---|---|
A great t-shirt, in stock | A great t-shirt, Get it now! |
Replace if Column Contains rule box
The Replace if Column Contains rule box searches if there is a match with another column and replaces the data in your current column.
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Replace if Column Contains rule box.
In the Column drop-down menu, choose the column to search for a value you want to change.
Enter the values in the following order separating them with a colon (:) delimiter:
search column:search for replace:replace
, where:search column
- A value to search for in the column chosen in the Column drop-down menu.search for replace
- A column value you want to search for and replace in the column to which you apply the rule.replace
- A replacement value that appears in the current column.
Select Save to apply the rule.

For example, if the platform finds Birkenstock
in the brand
column, it replaces adult
with kid
in the age_group
column:

Compare Columns rule box
The platform compares data in two columns and, if there is a match, assigns a necessary value in the current column:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Compare Columns rule box.
Select columns that you wish to compare in the Column A and Column B drop-down menus.
Choose the action type and enter the replace value in Handle match.
Choose the action type if there is no match between the selected columns in Handle no match.
Choose the action if one of the columns does not exist.
Select Save to apply the rule.

In this example, if the value from Column A matches the value from Column B, then the platform replaces all data in the column, to which you apply the rule box with description=title!
. If Column A doesn't match Column B, no change happens to the data in the current column.
Remove Duplicate Words rule box
The platform removes duplicate words with the Remove Duplicate Words rule box:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Remove Duplicate Words rule box.
Leave the default delimiter or set a custom one if the values have other boundaries. For example, in a category taxonomy, there can be arrows between the terms.
Select Save to apply the rule.

The Remove Duplicate Words rule box result:
Before | After |
---|---|
Cat Cat Dog Cat Parrot Tortoise | Cat Dog Parrot Tortoise |
Text Replace if Column Contains rule box
The platform replaces text based on a condition relating to another column. This rule box works similarly to the Map-Replace rule box, but you can set a condition for replacement.
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Text Replace if Column Contains rule box.
Select a source column.
Note
Ensure that the column exists in the necessary stage before applying this rule. You can select import stage columns for a rule on the intermediate stage.
Choose either
equals
orcontains
as the condition in the drop-down menu and enter the condition text in the field.Enter the search and replace terms.
Select Save to apply the rule.

In this example, if the product_type
column for this product equals t-shirts
, the result is as follows:
Before | After |
---|---|
This is a Cotton t-shirt. | This is a synthetic fibre t-shirt. |
Replace in Between rule box
Replace in Between rule box removes or replaces a value between two other values:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Replace in Between rule box.
Define From and To. The platform replaces the entire phrase, including these values.
Add a replace value into Replace With field.
Select Save to apply the rule.

The Replace in Between rule box result:
Before | After |
---|---|
The word "appears" appears two times. | The word exists appears two times. |
Remove Terms in Brackets rule box
The Remove Terms in Brackets rule box is similar to the Replace in Between, but for removing text in brackets. To remove the terms between two brackets:
Go to Data View from the site's main menu.
Choose the needed export channel or the intermediate stage in the drop-down menu on the left.
Select Edit in the attribute's column where you want to apply the rule box.
Select the Add Box drop-down menu.
Search for and select the Remove Terms in Brackets rule box.
Select Save to apply the rule.

The Remove Terms in Brackets rule box result:
Before | After |
---|---|
This is a great t-shirt, the very best (endorsed by world-famous jazz saxophonist Joshua Redman). | This is a great t-shirt, the very best. |