The product data interface

  • Updated

General Information

Overview

The product data interface is an optional feature, allowing you to use data from external sources in the Design Editor for emails. It is mostly used for information about products and offers from e-commerce systems. This requires that your e-commerce system can export product data to a file.

Data processing and formatting

Product data is processed in four stages:

  • You upload your product data as a CSV file to Optimizely's server through SFTP. Optimizely creates a job in Campaign which imports the data. Currently, four CSV formats are supported: Campaign (see CSV Structure below), Oxid, Magento and Shopware. If you prefer not to use SFTP, a special upload page can be provided within Campaign.
  • Optimizely support combines your data file with a mapping. This determines which fields will be available in the Design Editor. The combination of your data with a mapping is called product feed.
  • Optimizely creates one ore more customer-specific product layouts that determine how information from your product feed is styled and displayed.
  • You add product elements to your message drafts to show products from your feed. In a product element, product data is rendered according to a product layout.

You can later update your product data file yourself through SFTP, or in the Campaign UI, as long as the data's structure does not change so that the mapping still fits.

Product layouts

As explained in Data processing and formatting above, product layouts are required for using product elements. These product layouts are created by Optimizely on request. This service is subject to charge per layout.

Product elements

Data from a product feed is available in the Design Editor through product elements. Just like any other elements, you add these by dragging them from the side panel to the design area. The product feed does not yet have any formatting, so you need to select a product layout when adding a product element.

After a product element is added to a message draft, its content is static, so that all recipients get the same content. If the data from the feed is not exactly what you want to send to your recipients, you can override individual values within a product element (see Overriding values in a product element below).

The settings for a product element in the Design Editor for emails.
The settings for a product element in the Design Editor for emails, with a preview for the mobile version.

CSV structure

For your CSV files, you can use the export format of Oxid, Magento, Shopware or Optimizely Campaign's generic CSV format. The Campaign format uses following column headings:

"id";"name";"category";"text1";"text2";"text3";"text4";"text5";"text6";"text7";"text8";"text9";"text10";"link1Text";"link1Url";"link2Text";"link2Url";"link3Text";"link3Url";"image1ImageUrl";"image1AltText";"image1Link";"image2ImageUrl";"image2AltText";"image2Link";"image3ImageUrl";"image3AltText";"image3Link";"image4ImageUrl";"image4AltText";"image4Link";"image5ImageUrl";"image5AltText";"image5Link";"image6ImageUrl";"image6AltText";"image6Link";"additionalData1";"additionalData2";"additionalData3";"additionalData4";"additionalData5";"additionalData6";"additionalData7";"additionalData8";"additionalData9";"additionalData10";"additionalData11";"additionalData12";"additionalData13";"additionalData14";"additionalData15";"additionalData16";"additionalData17";"additionalData18";"additionalData19";"additionalData20";

When configuring the export, observe the following:

  • The CSV file must be RFC-compliant. Technical notes are contained in RFC 4180.
  • Set character encoding for the CSV file to UTF-8 without BOM.
  • Use the semicolon (;) as a separator.
  • If the product data includes quotation marks, escape these in the CSV file by using double quotation marks. The product data import fails if quotation marks from your content are misinterpreted as code.
    Example: If your data contains words in quotation marks, e.g. "Savoir Vivre.", put the quoted text in double quotation marks in the CSV file: ""Savoir Vivre"". The first quotation mark of each pair serves as an escape character.

Supported content

The product data interface can load the following data for each product element:

  • the product’s unique ID, name and category
  • up to 10 text elements per product element, e.g. for the heading of a product element, a product description, or the price.
  • up to 3 text links per product element, such as calls to action (e.g. "Buy now")
  • up to 6 product images per product offer (as a URL)
  • up to 6 links to product images (one link per image) that direct the recipient to additional information by clicking the image
  • up to 6 alternative texts for product images in case a recipient cannot load product images and to improve accessibility

Working with product data

Adding a product element to a message draft

Prerequisites: You see a message draft in the Design Editor. A product feed and a product layout are available in your client.

  1. In the side panel, in the Content tab, find the product element.
  2. Drag the element to the desired position in the design area.
    → A new, empty product element is added to your message draft.
  3. In the new element, click Edit...
    → You see the menu Product, the tab Layout and Product Selection is selected.
  4. In the field Feed, select the feed that contains the desired product.
  5. In the field Product Layout, select the layout you want to use.
  6. In the field Product Selection, select the product you want to show in the message draft.
  7. Check if the previews for desktop and mobile view look as expected.
  8. Click Apply.
    → The product element shows the product from the product feed.

Overriding values in a product element

Context: If the content from the product feed is not quite right for your message draft, you can replace the values of individual variables within a product element. This applies only to the current product element and does not change the content of the product feed.
Prerequisites: You see a message draft with a product element in the Design Editor.

  1. Select the product element.
  2. In the side panel, in the section Content properties, click Edit...
    → You see the menu Product, the tab Layout and Product Selection is selected.
  3. Open the tab Overrides.
  4. Click + Override.
    → A new line with two fields is added to the menu.
  5. In the field CSV Column (Variable), select the variable for which you want to define a new value.
  6. In the field Content, enter the value you want to use for this product element.
    Note: You can use simple HTML tags like <b> for bold or <i> for italic here.
  7. Click Apply.
    → The product element shows the new value.

Deleting an override

Prerequisites: You see a message draft with a product element in the Design Editor. The product element contains at least one override.

  1. Select the product element.
  2. In the side panel, in the section Content properties, click Edit...
    → You see the menu Product, the tab Layout and Product Selection is selected.
  3. Open the tab Overrides.
  4. Find the override you want to delete.
  5. In the line of the override, click (Remove line).
  6. Click Apply.
    → The override is deleted.

Adjusting the layout of a product element

This feature is meant for experts, make sure your changes are safe and responsive.

Context: If you want to change the look of an individual product element, you can adjust the pre-defined layout.
Prerequisites: You see a message draft with a product element in the Design Editor.

  1. Select the product element.
  2. In the side panel, in the section Content properties, click Edit...
    → You see the menu Product, the tab Layout and Product Selection is selected.
  3. Open the tab HTML Layout.
  4. Activate the toggle Local overwriting of HTML and Velocity code.
  5. Adjust the code as desired.
  6. Click apply.
    → The changes are applied to the product element. The pre-defined layout is not affected.

Updating your product data file (UI)

This procedure will overwrite your existing product data. Make sure not to lose any data that you still need!

Context: If it is supported by your Campaign configuration, you can update your product data by uploading a new CSV file through the UI. Make sure there are no changes to the structure of your data. The name of the uploaded file is not important, it will automatically be adjusted.
Prerequisites: You are logged in in Optimizely Campaign. You have the permission Special Pages. The file with updated product data is available on your local system.

  1. In the menu bar, go to More... > Upload File.
    Note: Depending on your configuration, the menu entry may have a different name.
  2. Click Choose File.
  3. Select the file with the updated product data.
  4. Click Upload.
    → Your existing product data file is replaced with the new file.

Updating your product data file (SFTP)

This procedure will overwrite your existing data. Make sure not to lose any data that you still need!

Context: You can update your product data by uploading a new CSV file, as long as there are no changes to the structure of your data.
Prerequisites: You have SFTP access to your CSV import folder. An import job was created by Optimizely support.

  1. Start your FTP client.
  2. Connect to your CSV import folder on the Optimizely server.
  3. Upload the new product data file, using the exact same name, overwriting the old file.
    → Your existing product data file is replaced with the new file.