Managing a value map
A value map is a two-column list containing SKUs and values of your choice.
After you create a value map, the Value_map_items
cart item filter
becomes available in promotion and strikethrough rules and in other filters.
You can use the Mapped Value attribute in per-item
effects to reference the values that are mapped to the respective SKUs
in Value_map_items
.
Example: Using a value map in promotion rules
Let's imagine you want to offer a large list of SKUs at updated prices during a campaign with promotion rules. You can use a value map to create the list of SKUs and the prices you want to set for them.
When you apply the Discount individual items effect,
select Value_map_items
as the list of items to discount and enter the following discount
value:
(
Item.Quantity *
Item.Price) -
Item.MappedValue.
After rule evaluation, the SKUs present in the value map are discounted accordingly by the effect and their respective prices are applied.
Example: Using a value map in strikethrough rules
For campaigns using strikethrough pricing, you can use the values mapped to individual SKUs in a value map to display the updated prices for items on your ecommerce website.
When you apply the Discount individual items effect,
select Value_map_items
as the list of items to discount and enter the following discount
value: Item.MappedValue.
After rule evaluation, your website displays the updated prices for the items.
Creating a value map
You can create a value map in standard campaigns by uploading a CSV file containing the items of the value map.
You can create only one value map for a given campaign.
To create a value map:
-
Create a UTF-8 CSV file containing the items of the value map.
important- The CSV file must contain only two columns and the following two headers:
identifier
: The SKU of an item. This must be a string value.value
: The value that you want to set for the SKU. This must be a numeric value.
- The CSV file can contain a maximum of 500,000 items.
- The CSV file must contain only two columns and the following two headers:
-
On the left-side menu of a campaign, click Rule Builder.
-
In the top-right corner of the page, click Value Map.
-
Click Upload a CSV File and select the CSV file.
-
Click Create Value Map.
A cart item filter named Value_map_items
is automatically created.
Exporting a value map
You can download a copy of the current value map as a CSV file. Use this file, for example, to make further changes to it and replace the current value map.
To export a value map:
- On the left-side menu of a campaign, click Rule Builder.
- In the top-right corner of the page, click Value Map.
- Click Export Items.
Editing a value map
You can edit a value map by uploading a new CSV file that replaces the current value map.
When you edit a value map, the current value map items are replaced by the items from the new CSV file.
To edit a value map:
-
Create a new UTF-8 CSV file containing the items of your new value map.
important- The CSV file must contain only two columns and the following two headers:
identifier
: The SKU of an item. This must be a string value.value
: The value that you want to set for the SKU. This must be a numeric value.
- The CSV file can contain a maximum of 500,000 items.
- The CSV file must contain only two columns and the following two headers:
-
On the left-side menu of a campaign, click Rule Builder.
-
In the top-right corner of the page, click Value Map.
-
Click Upload a New CSV File and select the CSV file.
-
Click Save.
The current value map items are replaced by the items from the new CSV file.
The Value_map_items
cart item filter and the Mapped Value
attribute now reference the items from the updated value map.
Deleting a value map
You can delete a value map if there are no active references to
the Value_map_items
cart item filter and the Mapped Value
attribute in the campaign.
To delete a value map:
- On the left-side menu of a campaign, click Rule Builder.
- In the top-right corner of the page, click Value Map.
- Click Delete Value Map.
- In the confirmation window, click Delete Value Map.