The purpose of this Knowledge Base article is to introduce the rules and formulas available to use when cleaning vendor product data in the Transformation Rule UI.
The purpose of this Knowledge Base article is to introduce the rules and formulas available to use when cleaning vendor product data in the Transformation Rule UI.
Before we get started:
There is an important concept to understand in the Transformation Rules, Vesta maintains 2 side by side datasets at all times. The first is your own data set called the “Retailer” data, the other is your Suppliers data set called “Supplier” data.
Why is this important to know? You have the ability to create rules which target either/and a product attribute from your Supplier or your own data set when writing rules. To do so prefix any attribute with either Retailer. or Supplier.
For example, you may have a field called Color, value of Blue while your supplier also has a field for Color with a value of BLU e.g:
Retailer.Color = Blue
Supplier.Color = BLU
Steps to create rules using the transformation tools:
1. Choose the source attribute from the dropdown menu in the Source Vesta Field, here you can target either your own field with Retailer. or a Supplier field with Supplier.
2. Select what to look for in the IF dropdown menu (see glossary of IF types at the end of this guide)
Enter the text to look for in the IF Value column
3. Use the And Source Vesta Field column to look for additional criteria in the same or different source attribute. Choose the text to look for in the And dropdown menu.
As can be seen in the example screenshot you can mix and match targeting Retailer and Supplier fields within a single rule
Enter the data to look for in the And Value column (see glossary of AND types at the end of this guide)
4. Select the chosen result in the Then column
Enter the desired text to the source field in the Then Value column (see glossary of THEN types at the end of this guide)
5. Finally choose the destination attribute from the dropdown menu in the Destination Vesta Field column
IMPORTANT NOTE: Destination fields can only be your own i.e Retailer. Fields, it is not possible to update supplier data through the rules engine as their data is READ ONLY
IF/AND Glossary
- Contains - The Contains function will search the product attribute selected in the Source Vesta Field dropdown menu for the specific character, word, or text defined in the IF Value.
-
Does Not Contain - The Does Not Contain function will search the product attribute selected in the Source Vesta Field for SKUs that do not include a character, word or sentence in your IF Value rule.
-
Exactly - The Exactly function will search the product attribute selected in the Source Vesta Field dropdown menu for the EXACT character, word, or text defined in the IF Value.
-
Empty - The Empty function will check if the attribute selected in the Source Vesta Field is empty AND if that attribute does not exist, it will also be considered an empty attribute.
-
Not Empty - The Not Empty function will check if the attribute selected in the Source Vesta Field is not empty.
-
Less than - The Less than function will look for the value lower than the number value entered in the IF Value field.
Important Note: Only works for number value
-
Greater than - The Greater than function will look for the value higher than the number value entered in the IF Value field.
-
Length - The Length function will search the product attribute selected in the Source Vesta Field dropdown menu and return the number of characters defined in the IF Value.
IMPORTANT NOTE: Currently Length can only be used in an IF statement, not in THEN
THEN Glossary
-
Replace - This function will replace the Destination Vesta Field with the character, text, word or product attribute entered in the Then Value field.
IMPORTANT NOTE: When using Replace in conjunction with Contains you must use Contains in the IF Statement, not the THEN Statement for it to work as expected
-
Concatenate - The concatenation function will string together the characters, text or words with the chosen attribute selected in the THEN Value field.
-
Hardcode - The hardcode function will add the characters, text or words entered in the THEN Value field to the Destination Vesta Field
-
Formula - The Formula function will apply the calculation entered in the THEN Value field to the Destination Vesta Field. For example, adding a margin to the Supplier Cost field to get to your selling price.
-
Delete Right / Delete Left - This function will remove the text on the left or right of the value entered into the IF Value field and save it to the Destination Vesta Field
-
The UPPER/lower/Proper function will convert the letters from the Source Vesta Field and save it to the Destination Vesta Field:
UPPER: Convert text to Upper case
Lower: Convert text to lower case
Proper: Capitalizes the first letter in each word and converts all other characters to lowercase
-
The Remove HTML function strips the HTML from the attribute in the THEN Value field and pastes plain text to the Destination Vesta Field
-
The Delete Attribute Function deletes the attribute selected in the Destination Vesta Field.
Important Note: Leave the Then Value Field empty for the Delete Attribute Function to work