Dynamic CSV and XML articles

You can send personalized product recommendations with dynamic CSV Stands for "comma-separated values"; tabular data in a plain text file separated by the comma character. and XML articles. Product data is loaded from the CSV or XML source for each individual recipient while sending.

URLs that reference image files are dynamically inserted into the mailing during dispatch. Ensure that your server can handle a large number of requests when the mailing is sent.

Prerequisites

Creating a mapping reference

When sending the message, Optimizely Campaign uses the product ID from the mapping reference to load product data from the data source. This loads different products into the message for each recipient.

To send a different product to each recipient, create a mapping reference that lists product recommendations for each recipient using the product ID. There are two ways to create a mapping reference:

  • Recipient list. Import the product IDs to be mapped into a recipient list field in your recipient list.
  • Mapping file. Create a CSV file that contains the recipient ID of each mailing recipient on a separate line. Add to each recipient ID an additional column that specifies the product ID to be mapped.

    Structure of the mapping file

    AB
    [email protected]ProductID001
    [email protected]ProductID002
    [email protected]ProductID003
    and so onand so on

If you enter several product IDs, leave no space after the separator.

Wrong: 001, 002, 003

Correct: 001,002,003

Using a recipient list as a mapping reference

  1. To set up the recipient list field for mapping product IDs, contact customer support. Up to 256 characters may be transferred to the recipient list field. If you want more, tell customer support.

    Several methods (including CSV file import and SOAP API Stands for "application programming interface". The API specifies how some software components should interact with each other, such as accessing a database or computer hardware, or easing the work of programming graphical user interface components. APIs often are in the form of a library that includes specifications for routines, data structures, object classes, and variables. See also: https://world.optimizely.com/documentation/class-libraries/) are available for importing recipient-specific product IDs to recipient lists.

  2. Transfer product IDs to the recipient list.

Using a mapping file as a mapping reference

  1. Create a CSV file whose first column contains recipient IDs. Each ID must be on a new line.
  2. In the second column, enter the product IDs for each recipient.
  3. Transfer the mapping file to the server, in the mapping file location specified when you set up dynamic articles.

    Alternatively, use the Upload file feature, located in the Optimizely Campaign menu under More. (To enable this feature, contact customer support.)

Creating dynamic CSV and XML articles

  1. To create a dynamic CSV or XML article, in the Template Kit, create a new content paragraph by clicking New: Content Paragraph.

    Image: New content paragraph

  2. Select the content interface paragraph type by clicking Content Interface.

    Image: Content interface

  3. Click Apply. A new content paragraph of type content interface is created. On the left of the preview is the Content Interface Article button.
  4. Click Content interface article. A new content interface article is created. The configuration window for the article opens.

Configuring dynamic CSV and XML articles

After you create a dynamic CSV or XML article, configure it by following these steps:

Recipient list as the mapping reference

  1. On the right of the content interface article configuration window, open the Recipient List tab.

    Image: Recipient list

  2. In the Recipient List Field box, enter the name of the recipient list field that contains the product ID. Enclose the name with curly brackets: {Name}.
  3. If multiple product IDs are contained in the recipient list field, enter the separator used between product IDs.

    If you enter nothing, a comma is assumed.

  4. If the recipient list field contains multiple product IDs, enter the position number of the product to be loaded.

    For example, your recipient list field contains three comma-separated product IDs: "001,002,003." To select the product with the ID "003", enter position number "3," because the product ID "003" is in the third position. If you do not enter a position number, the product in the first position is selected automatically.

  5. Click Apply. To the left of the preview, you see configuration data on the content interface article. When the message is sent, product data is loaded from the data source using this configuration.

Mapping file as a mapping reference

  1. On the right of the content interface article configuration window, open the Mapping File tab.

    Image: Mapping file

  2. In the File name box, enter the name of the mapping file.
  3. In the Recipient list field that contains the recipient ID (internal name) box, enter the internal name of the recipient list field. If you do not know the internal name, contact customer support.
  4. If the mapping file in the product ID column contains multiple product IDs, enter the position number of the product to be loaded.

    For example, Your recipient list field contains three comma-separated product IDs: "001,002,003." To select the product with the ID "003", enter position number "3," because the product ID "003" is in the third position. If you do not enter a position number, the product in the first position is selected automatically.

  5. Click Apply. To the left of the preview is the configuration data on the content interface article. When the message is sent, product data is loaded from the product data source using this configuration.