Javascript

A cleansing rule of this type can be used to convert import supplier attribute values using a Javascript function and assign the result of the function to a particular iPIM Supply attribute. Conditions for a selective conversion of supplier attribute values can be defined via if-else-statements.

In order to set up a cleansing rule of this type, proceed as follows:

  1. From the “Choose rule type” menu, select the rule type “Javascript”.
  2. Click on the Add button to call up the corresponding dialog box.
  1. Enter a name for the cleansing rule in the input field “Title”.
  2. From the “Order” menu, 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.
  3. From the “Attribute” menu, select the iPIM Supply attribute which the result of the function is to be allocated to.
  4. Possibly enter a short description in the input field “Description”.
  5. Possibly tick the “Activate rule” checkbox to activate the rule.

This screenshot explains the rule type using the following example: If the attribute “Att13” has a value, the value of the attribute “DeviceType” is attached to the value of the attribute “ShortDescription”. Folloeing this, the combined value is allocated to the attribute “ItemDesc”.
  1. Possibly tick the checkbox “Internal rule” to specify the cleansing rule as an internal rule. Internal rules can be used as subordinate rules for certain types.
  2. Enter the desired Javascript function in the input field.
  3. 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 Save 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 Cancel button.