The Variation feed enables you to automate the process of creating, editing, and removing variations. You choose a template, and connect it to a CSV or XML file with the variations metadata (images, titles, and so on). Whenever the file changes – the variations changes as well.
Step 1: Design Your Template
- Create a template of the variations.
- Turn into a variable every part of the template that you want to be populated by the variation feed. For example, if you want the image to be different for every variation, and the image URL is in the variation feed – the image src should be a variable.
Step 2: Prepare the File
The file can be a CSV or an XML file, that you can either upload to Dynamic Yield or host on your server.
- Every row is a variation.
- Columns are the variables. For example, if you have 3 variables for the title, image URL and link – the file must include at least 3 columns – for each of the variables.
- The file must have at least one column with a unique value. It can be an additional column (that is not used in any variable). This column is used for the variation name.
- Avoid using spaces or special characters in the title. If there are special characters in the table, save the file in UTF8 format.
- Files with over 50 columns or 4000 rows are not supported, and values must include fewer than 4,000 characters.
|Title||Image URL||Target URL|
|New summer collection||acme.com/img/summer.png||acme.com/summer|
|Complete the look||acme.com/img/complete.png||acme.com/collection|
Step 3: Create a Variation Feed
- Go to Assets › Data Feeds.
- Click Add New and select Variation Feed.
- Name the feed.
- In the Feed Source, you can do one of the following:
- Upload the file: After you connect variations to the variation feed, they update every time you replace the file.
- Paste the URL that hosts the file: Whenever the file changes – the variations will change.
- Under the Advanced Settings:
- If the feed source is a URL on your servers, choose the sync rate.
- Use a Parser Function to adapt and manipulate the feed source, to create a simple, flat table that will be the variation feed.
- Click Preview.
- Choose a column with a unique value in the "Unique Key" settings.
- Choose a column to be served as the variation name in the "Variation Name Key". The variation name later appears in the reports, so make sure it is descriptive of the variation content.
- Click Save and Activate.
Tip: You can use the same feed for multiple experiences or campaigns, and add a column that is later used as a filter, and set a different filter per experience. For example, if you have promotions for mobile users and promotions for desktop users, you can have them in the same feed. Add a column "Device", and a value of "Mobile" or "Desktop". When you create an experience that is targeted to mobile users, you can filter rows that include "Mobile" value in the "Device" column. The same goes for an experience that is targeted at desktop users.
Step 4: Create Your Campaign
- Create a campaign that contains the experience with your variations.
- When you create a new experience, under the Variation wizard step, click the "Syncing it with a Data Feed" button:
- Select the template you created in Step 1.
- In the template, select the variation feed you created in Step 3.
- In the template, map the feed columns to the template variables. You immediately see a preview of how the variation will appear if it is based on the first row of the feed.
- Choose which variations to create.
- Decide how many (1-50) and which variation to create.
- You can also filter rows by a value in the feed.
- Click Sync Variations. The variations are added to an experience in the campaign.
- Click Save Experience and Save and Publish.
- You can always click the "Sync Settings" to change the template, the variation feed, the mapping, or the filter.
That's it! Your experience is synced with the variation feed:
- When rows are added – new variations are created.
- When rows are removed – the variations are deleted.
- When values change in the variation feed – the variation changes as well.
Variations do not sync if:
- A new version of the feed source is empty (relevant if the feed is hosted on your server).
- There are no rows in the feed that matches the filters.