Skip to main content

Value maps 

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. You can also use it in cart item filters to filter items by their mapped values.

Example: Use 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. The discount value formula depends on the discount type:

Discount typeValue map containsDiscount value formula
Percentage discountThe percentage, for example, 10% off on leather shoes.Item.Price * (Item.MappedValue / 100)
Flat discountThe discount amount, for example, €5 off on leather shoes.Item.MappedValue
Fixed priceThe target price, for example, all leather shoes at a fixed price of €50 today.Item.Price - Item.MappedValue

Example: Use 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.

Example: Use a value map in cart item filters

Use the Mapped Value attribute in cart item filters to exclude items priced below their mapped value from rule evaluation.

For example, add a condition using the Price of item (Item) attribute against Mapped Value, with the is greater than or equal to operator. The rule then evaluates items priced at or above their mapped value.

Note

The Mapped Value attribute is available only in cart item filters that use the Value_map_items filter type.

Create a value map

You can create a value map in standard campaigns by uploading a CSV file containing the items of the value map.

Note

You can create only one value map for a given campaign.

To create a value map:

  1. Create a UTF-8 CSV file containing the items of the value map. The file must have the following structure:

    • A header row with 2 columns: identifier and value.
    • One row for each SKU and its value.
    • The SKU must be a text value.
    • The value must be a numeric value.

    Here's an example of a valid CSV file:

    identifier,value
    SKU1,10
    SKU2,15.5
    SKU3,8
    Important

    The file can contain a maximum of 500,000 rows.

  2. On the left-side menu of a campaign, click Rule Builder.

  3. In the top-right corner of the page, click Value Map.

  4. Click Upload a CSV File and select the CSV file.

  5. Click Create Value Map.

A cart item filter named Value_map_items is automatically created.

Export 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:

  1. On the left-side menu of a campaign, click Rule Builder.
  2. In the top-right corner of the page, click Value Map.
  3. Click Export Items.

Edit a value map

You can edit a value map by uploading a new CSV file.

Important

The newly imported file replaces the existing value map.

To edit a value map:

  1. Create a new value map CSV file.
  2. On the left-side menu of a campaign, click Rule Builder.
  3. In the top-right corner of the page, click Value Map.
  4. Click Upload a New CSV File and select the CSV file.
  5. 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.

Delete 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:

  1. On the left-side menu of a campaign, click Rule Builder.
  2. In the top-right corner of the page, click Value Map.
  3. Click Delete Value Map.
  4. In the confirmation window, click Delete Value Map.