A cleansing rule of this type can be used to cleanse imported item data so that attribute values of particular character string attributes are searched for specific terms in order to replace them with specified values.
In order to set up a cleansing rule of this type, proceed as follows:
- From the “Choose rule type” menu, select the rule type “Search and replace”.
- Click on the
button to call up the corresponding dialog box.
- Enter a name for the cleansing rule in the input field “Title”.
- From the drop-down menu “Order”, select the appropriate option. You can choose between:
- Before transformation: The attribute value modification also affects the supplier attributes.
- After transformation: The attribute value modification only affects the iPIM Supply attributes.
- From the “Attribute” menu, select the iPIM Supply attribute whose attribute value is to be modified according to the cleansing rule.
- Possibly enter a short description in the input field “Description”.
- Possibly tick the “Activate rule” checkbox to activate the rule.
- Possibly tick the checkbox “Internal rule” to determine that the cleansing rule is an internal rule. Internal rules can be used as subordinate rule of certain rule types such as “Conditional attribute setting”.
- Select a search type from the “Search for” menu. You can choose between the options:
- Attribute: The search term is always the value that a specified attribute possesses for the respective item.
- Constant: The search term is a fixed value specified by the user.
- Regular Epression: A regular expression is used as the search term.
- If you either chose the search type Attribute or Constant, select a search mode from the “Search mode” menu:
- Anywhere: If the search term is a part of the respective attribute value which occurs anywhere, this part is replaced by the specified value.
- Word: If the search term is a part of the respective attribute value in the form of a standalone sequence, this part is replaced by the specified value.
- Exact: If the respective attribute value exactly complies with the search term, the attribute value is replaced by the specified value.
- Does not contain: If the respective attribute value does not contain the search term, it is replaced by the specified value.
- Starts with: If the respective attribute value starts with the search term, it is replaced by the specified value.
- Does not start with: If the respective attribute value does not start with the search term, it is replaced by the specified value.
- Ends with: If the respective attribute value ends with the search term, it is replaced by the specified value.
- Does not end with: If the respective attribute value does not end with the search term, it is replaced by the specified value.
- Specify the search term:
- If you chose the search type Attribute, select an attribute whose value is to be used as the search term.
- If you chose the search type Constant, enter a search term in the input field.
- If you chose the search type Regular expression, enter a regular expression in the input field. In order to learn more about regular expressions, click here.
- In the input field “Replace with”, enter the value by which the respective attribute value or a part of it is to be replaced.
- Possibly tick the checkbox “Case-sensitive”, so that the case of attribute values is considered by the search.
- Possibly add further replacement rules:
- Click on the
button. Following this, another set of input fields appears. - Configure the replacement rule as described.
- Possibly add further replacement rules.
- Click on the
- Possibly configure a test run and carry it out in order to check if the configuration of the rule is valid.
- In order to finish the configuration, click on the
button. If the process was successful, a corresponding message will appear. The cleansing rule of is now set up. - In order to cancel the process, click on the
button.
In order to remove a replacement rule, click on the
button in the respective line. And in order to move replacement rules to change the order of their execution, click on the
button in the line of a replacement rule, hold the mouse button down and move the replacement rule to the desired position.