Use CSV

If you have selected CSV format, your product data is prepared in two steps:

  1. Export your product data from your e-commerce system or from some other data source into a CSV file.
  2. Move the CSV file to your personal directory on the server. Episerver Campaign retrieves the CSV file from there and makes the product data it contains available to you in the Template Kit.

If you have a personal directory on the server but no login information, contact the Episerver customer support team, who will be happy to set up a user account for you.

Below, you can learn more about the details of both steps.

1. Export product data

In the first step, you need to export your product data from your system as a CSV file.

CSV files exported from different systems can differ widely from each other. For example, the names and order of the column headings can be different. Consequence: Such differences will lead to problems when importing your product data. If no information is provided about what kind of dataset is contained in specific columns, for example: "Which column contains the product name?" or "Which column contains the old product price?", Episerver Campaign cannot read your CSV file properly and cannot correctly classify the individual datasets.

Sole exception: The content interface is able to recognize CSV files that have different structures and process them without any errors if you use an Episerver integration for one of the following e-commerce systems:

  • Magento
  • OXID
  • Shopware

If you use an Episerver integration for one of these systems, you can export your product data using the Episerver plugin without any further adjustment necessary.

If you do not use an Episerver integration as well as for all other systems and data sources, you need to use the standardized CSV structure used by Episerver Campaign, hereinafter referred to as "generic CSV structure."

Generic CSV structure

The generic CSV structure used by Episerver Campaign standardizes the structure and naming scheme for the column headings in your CSV files. The generic CSV structure ensures that the import of your product data can proceed without any errors.

To export your CSV files with the generic CSV structure to Episerver Campaign, perform the following steps:

a) If your system/your data source has a feature that allows the export of datasets into a CSV file (e.g. a plugin)

Configure the export feature so that the CSV file created has the following structure and column headings:

Generic CSV structure

"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";

Configuring an export feature generally requires programming work. For more information, consult your system administrator or your software service provider.

When configuring the export feature for your system, observe the following:

  • The CSV file must be RFC-compliant. Technical notes are contained in RFC 4180.
  • The character encoding for the CSV file must be set to UTF-8 without BOM.
  • The semicolon must be used as a separator.
  • If some product data includes quotation marks (inverted commas), these need to be masked with so-called escape characters. If you do not mask quotation marks in your text elementsOne component of a campaign. As examples, recipients and email are elements. Nodes are used to transfer elements through the sequence of actions that occur when a Smart Campaign is activated., these will be misinterpreted as code and the import of your product data will be unsuccessful. Use the quotation mark " as the escape character.

    Example: If you put a word or a word group in your text into quotation marks, for example "Savoir Vivre", then in your CSV file you need to wrap "Savoir Vivre" with double quotation marks: ""Savoir Vivre"". The outer quotation marks will automatically be recognized as escape characters and will not be displayed in your message text.

b) If you want to save your product data into a CSV file

If your system does not have a feature for exporting product datasets into a CSV file, and you would like to manually create a CSV file with your product data, perform the following steps:

  1. Download the template for the generic CSV structure here: template generic structure.csv
  2. Open the template using a spreadsheet program such as Microsoft Excel or LibreOffice Calc.

    If you need to enter the separator and character encoding when opening the template, select semicolon for the separator and UTF 8 without BOM for the character encoding. Some programs, such as Microsoft Excel, do not provide the option UTF-8 without BOM. If UTF-8 without BOM is not offered, select the UTF-8 option.

    When filling out the template in the generic CSV structure, you must always observe the following:

    If some product data includes quotation marks (inverted commas), these need to be masked with so-called escape characters. Use the quotation mark " as the escape character. If you do not mask quotation marks in your texts with secondary quotation marks, these will be misinterpreted as code and the import of your product data will be unsuccessful.

    Example: One of the text elements in your product offering is: Enjoy the "Savoir Vivre" in Paris.

    "Savoir Vivre" is contained in quotation marks here. In your CSV file, you need to wrap "Savoir Vivre" with double quotation marks: ""Savoir Vivre"". The outer quotation marks will automatically be recognized as escape characters and will not be displayed in your message text.

  3. Begin entering your product data in row 2. The specific data for each product is entered side by side (see image).

    Do not change the column headings or their order in row 1. If you change the headings or their order, your product data cannot be loaded into the Template Kit.

    If you would like to add another product offer, insert the data again side-by-side in the next row (see image).

    The following table shows which specific product data are written in which column:

    Column heading in the templateProduct data to be entered
    id

    Enter the unique product ID here. The product ID will not be shown in your messages. You may only enter a product ID in the document once.

    name

    Enter a name for your product offer here: Later, in the Template Kit, you can select the product offer by its name to include it in your messages (static CSV article only). Use a descriptive name to easily recognize the product offer. The product ID will not be shown in your messages.

    category

    Enter the product category here. The product category will not be shown in your messages. With the product category, you can create overview category trees in the Template Kit and e.g. compile related products together to quickly find specific products (static CSV article only). Enter the individual subcategories in this field, separated by hash symbols. Example: Mediterraneantravel#Italy#Sicily

    A category may have a maximum of 10 sub-categories. Further divisions are not supported.

    text1 – text10

    A total of 10 text fields are available. Enter one piece of information in each field. For example:

    • the heading for your product offer, e.g. in the text field text1
    • the name of the product to be shown in your message, e.g. in the text field text2
    • the description of your product, e.g. in the text field text3
    • the old price of your product, e.g. in the text field text4
    • the current price of your product, e.g. in the text field text5
    • the supplier/manufacturer of your product, e.g. in the text field text6

    You are free to choose what you would like to enter in the text fields. Adapt the content according to your wishes and the requirements of your product/your service.

    Generally it is best to organize the components of your product offer chronologically from text1 through text10, which is how they will be shown from top to bottom in the finished product offer. If you are not sure what order is best for you, contact the Episerver customer support team, who will be happy to advise you.

    The formatting (e.g. text size and text color) of the individual text field contents will be set separately later using an HTML layout.

    link1Text – link3Text

    Enter the heading for the link or links to your product offer.
    For example: "Offer", "More Information" or "Buy Now".

    link1Url – link3Url

    Here, enter the link or links to the page or pages to which recipients will be directed if they click on the link (e.g. the corresponding product page in your webshop).

    image1ImageUrl – image6ImageUrl

    Enter the URLs for the corresponding product images here. The product images will later be automatically loaded by Episerver Campaign and displayed in your messages.

    image1AltText – image6AltText

    Enter the alternative text for your images here. An alternative text is the text that will be shown when an image cannot be loaded. Always enter alternative texts, because these can be read by visually impaired people using special programs, thereby promoting an accessible Internet.

    image1Link – image6Link

    Enter a link here that should be link to the product image. If a recipient later clicks on the image, the recipient is forwarded to the target of the associated link. This can be your webshop or also any other address that you would like to connect to the image. To load the image and display it in your messages, avoid mixing up the ImageLink and the ImageURL, which indicates the saved location of the image. The ImageLink, on the other hand, directs the recipient to the link target, which has further information.

    additionalData1 – additionalData20

    Enter additional data records that you can use, for example, as metadata for the program logic of the HTML layouts.

  4. Once you have entered all product data into the template with generic CSV structure, save the file and rename the file.

    You must rename the file with the name that you entered for your CSV file when setting up the content interface paragraphs. If you use a different name, the import of your product data will not be successful. Always ensure that your CSV file has the correct name. If you have forgotten the correct name, contact customer support.

    When saving the file, make sure that the spreadsheet program does not assign a new file type. The file must always be saved with the file type CSV or the file extension .csv.

2. Transfer the CSV file to the Episerver server

When you have saved the completed and renamed CSV template, in the next step, it needs to be transferred to your personal directory on the Episerver server.

If you use an Episerver integration for Magento, OXID or Shopware, you do not need to manually perform the transfer. Your integration is configured in such a way that the transfer takes place automatically. If you do not use an Episerver integration, but would still like to automate the transfer, you can do this using e.g. a script. Consult your system administrator or your software service provider for development of an appropriate programming solution.

To transfer the completed and renamed Episerver template in your directory onto the Episerver server, perform the following steps:

  1. Log in to the Episerver server with your user data.

    If a user account for the Episerver server has still not been set up for you, contact the Episerver customer support team. Documentation on logging in to the Episerver server can be found here (for Windows): FTP access via SCP (Windows)

    For macOS, see FTP access via SCP (macOS/OS X).

  2. Upload the completed and renamed Episerver template to your personal directory on the Episerver server.

    If you have multiple directories (folders) on the Episerver server, make sure to save the completed and renamed template in the directory that was set up for your CSV files during configuration of the content interface. If you save the completed and renamed template in another directory, the import of your product data will not be successful.

    If you have loaded the completed and renamed template into the correct directory, your current product offers are available to you in the Template Kit for integration into your messages.

    It can take some time for your product offer, transferred as a CSV file, to be available in the Template Kit. We thus recommend automatically performing the data transfer at night.

back to top Episerver image




Episerver | Updated: 2019-03-06 | Send feedback to us