Note: Before you can create a triggered email campaign, make sure you enabled triggered emails for your site.
Creating a Triggered Email Campaign
- Go to Email › Triggered Email › Add New and select the type of triggered email. The settings in the following steps differ depending on the type you select.
- Define the Triggered Email settings. The settings depend on the type of trigger. For more details about how triggered emails work, see Learn About Triggered Emails.
- Abandonment Triggers:
- Name: Triggered email name. Optionally add notes and labels.
- Trigger: Event that triggers the email send.
- Delay Send: Time between the trigger event and the sending of the email. In case more than one trigger event is detected (e.g. multiple ‘add to cart’ events are fired in the same session) the delay starts from the last event.
- Cancel Send: If these conditions occur within the delay time interval, the email will not be sent.
- Frequency Capping: Maximum number of emails of this type that should be sent within the provided time interval.
- Price Drop Triggers:
- Trigger: The user behaviors and changes to products that define them as eligible to be included in a triggered email.
- Schedule: The time when emails begin to be sent. Each campaign can send a maximum of one email per day.
- Frequency Capping: Maximum number of emails of this type that should be sent within the provided time interval.
- Abandonment Triggers:
- Click Next to define the Targeting settings by selecting the Audiences or Shared Audiences to which this experience will be targeted.
- Create one or more variations that include the email header and body content. For details, see below.
- Set the allocation, primary metric.
- Configure the end of the attribution window in the advanced experience settings. The beginning of the attribution window for triggered emails is defined as the time of the user's last click on the email.
- Configure how much traffic to allocate to each variation, and control group.
- Click Save Experience and create additional targeted experiences as needed clicking the plus icon
.
- To send a preview email, click the preview icon
and specify your email addresses.
- To verify the trigger functionality, click Simulation. For more details, see below.
- Save & Publish if you are ready to fully publish the experience, or Save as Draft if you want to verify the functionality before publishing.
Creating Triggered Email Variations
If you are using a custom ESP, use the procedure about creating JSON triggered email variations below instead of this procedure.
- Variations are created as part of the triggered email campaign creation process, or on their own from Assets › Variations. Select one of the Dynamic Yield templates for triggered emails that are already configured for common use cases.
- Configure the email variation header attributes: Subject, Sender Name & Sender Email.
- Click the HTML tab to code the email body. Here you can dynamically add products to the email that were added to the cart, recently viewed, recommended, or dropped in price.
- In the HTML, create a variable by adding opening and closing variable tags as follows: ${#Name}...${/Name}. For example: ${#Cart}...${/Cart}.
- Click the tags to open the Variable Settings panel. Select the variable type that corresponds to your trigger. You can also create an additional variable to include an email recommendation widget.
- Define the minimum and maximum items to include, and specify a tooltip if desired. This limits the range of items to include that can be selected in the variables tab, and the tooltip that is visible in the variables tab.
- Between the cart variable opening and closing tags, code the HTML markup for each cart item.
You can dynamically insert properties from your product feed by adding variables of type Feed Property to the code.
For Price Drop variations, you can add variables of type User Profile Property to dynamically include information about the difference in price.
At send time, this markup will be multiplied times the number of items included. Every Feed Property variable will be taken from the product feed for the products in the email.
- Go to the Variables tab and specify values for all the variables you defined. For recommendations, make sure the strategy you select matches the type of triggered email you are using.
- Save the variation.
Creating JSON Triggered Email Variations
If you are using Responsys or a custom ESP, use the JSON template to create triggered email variations as follows:
- Configure what information will be sent to your ESP from Dynamic Yield using JSON code. Make sure the following variables exist in the payload and then incorporate them into your ESP templates to compose the full email:
- dyTrackingPixel - allows Dynamic Yield to track the email, for example whether the email was opened or not.
- dyRedirectStringLink - Should be included in EVERY item that is clickable in your ESP email template (for example a product image) to allow Dynamic Yield to collect information. For Responsys, you can use Responsys RPL to concatenate the redirect link with every additional URL.
- Adding email variable - add the standard special character as any variable for example - ${email} or ${external}. Click on the variable to the open the variable settings panel, and change the variable type to either Hashed email, Plain Text email, or External ID depending on the type of your identifier.
- Adding Products in Cart, Recommendations, or Price Drop Products
- Add the special character ${#} for example - ${#cart}, click on the variable settings panel and choose Products in cart , Recently viewed products, Email recommendation widget, or Price drop products.
- Configure the minimum and maximum value of items you would like to allow. You can choose to show the number of items in the variable tab settings as well.
- Between the cart variable opening and closing tags, code the HTML markup for each cart item.
You can dynamically insert properties from your product feed by adding variables of type Feed Property to the code.
For Price Drop variations, you can add variables of type User Profile Property to dynamically include information about the difference in price.
At send time, this markup will be multiplied times the Maximum amount placed in the settings. Every Feed Property variable will be taken from the product feed - either items in cart, recently viewed or any recommended items. - The variable ${#Cart Products(sku)} provides a comma separated list of products within the string. This should be used in Responsys and any other ESP that required this structure. If you would like a different feed property, it should be stated within the variable as follows ${#Cart Products(url)}. Examples are documented below.
- Define your Variables
In the variables tab, select values for the variables you defined in the code. For recommendations, make sure the strategy you select matches the type of triggered email you are using. - Get a preview of the JSON variation payload structure
Examples
{
"content": {
"templateId": "1",
"region": "US"
},
"recipients": [
{
"hashedemail": "${Email}",
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": {
"${#cart}": "${skuInCart}"
},
"recommendations": {
"${#recommendation}": "${sku}"
},
"hiddenPixel": [
"${dyTrackingPixel}"
],
"urlForWrapping": [
"${dyRedirectStringLink}"
]
}
}
]
}
}
]
}
{
"content": {
"templateId": "1",
"region": "US"
},
"recipients": [
{
"hashedemail": "fcc1c1ecbc0b14e7d83d3dca4ece1fcbec85d0a413b3f518eb916c21bd38d25a",
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": [
"1002300-410",
"1004800-469",
"1002600-001"
],
"recommendations": [
"1005111-290",
"1005900-001",
"1005666-210"
],
"hiddenPixel": [
"<img src=\"http://trem.dynamicyield.com/tremop/?cuid=0&cuidType=ihe&sec=8772173&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=\" alt width=\"1\" border=\"0\" height=\"1\" style=\"height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important\">"
],
"urlForWrapping": [
"http://trem.dynamicyield.com/tremclk/?cuid=0&cuidType=ihe&sec=8771748&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl="
]
}
}
]
}
}
]
}
{
"recipientData": [
{
"recipient": {
"plainemail": "${Email}"
},
"optionalData": [
{
"name": "PRODUCTS_TO_SHOW",
"value": "${#Cart Products(sku)}"
},
{
"name": "Rcom_TO_SHOW",
"value": "${#recommendations(sku)}"
},
{
"name": "hiddenPixel",
"value": "${dyTrackingPixel}"
},
{
"name": "urlForWrapping",
"value": "${dyRedirectStringLink}"
}
]
}
]
}
{
"recipientData": [
{
"recipient": {
"plainemail": "test@dynamicyield.com"
},
"optionalData": [
{
"name": "PRODUCTS_TO_SHOW",
"value": "sku1,sku2,sku3"
},
{
"name": "Rcom_TO_SHOW",
"value": "sku1,sku2,sku3"
},
{
"name": "hiddenPixel",
"value": "<img src=\"http://trem.dynamicyield.com/tremop/?cuid=0&cuidType=ihe&sec=8772173&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=\" alt width=\"1\" border=\"0\" height=\"1\" style=\"height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important\">"
},
{
"name": "urlForWrapping",
"Value": "http://trem.dynamicyield.com/tremclk/?cuid=0&cuidType=ihe&sec=8771748&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl="
}
]
}
]
}
{
"content": {
"templateId": "1",
"region": "US"
},
"recipients": [
{
"hashedemail": "${Email}",
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": {
"${#cart}": {"sku":"${skuInCart}",
"image":"${cart_image}",
"name":"${cart_name}",
"price":"${cart_price}"
}
},
"recommendations": {
"${#recommendation}":{ "sku":"${sku}",
"image":"${recs_image}",
"name":"${recs_name}",
"price":"${recs_price}"
}
},
"hiddenPixel": [
"${dyTrackingPixel}"
],
"urlForWrapping": [
"${dyRedirectLink}"
]
}
}
]
}
}
]
}
{
"content": {
"templateId": "1",
"region": "US"
},
"recipients": [
{
"hashedemail": "test",
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": [
{
"sku": "skuInCart1",
"image": "cart_image1",
"name": "cart_name1",
"price": "cart_price1"
},
{
"sku": "skuInCart2",
"image": "cart_image2",
"name": "cart_name2",
"price": "cart_price2"
},
{
"sku": "skuInCart3",
"image": "cart_image3",
"name": "cart_name3",
"price": "cart_price3"
}
],
"recommendations": [
{
"sku": "sku1",
"image": "recs_image1",
"name": "recs_name1",
"price": "recs_price1"
},
{
"sku": "sku2",
"image": "recs_image2",
"name": "recs_name2",
"price": "recs_price2"
},
{
"sku": "sku3",
"image": "recs_image3",
"name": "recs_name3",
"price": "recs_price3"
}
],
"hiddenPixel": [
""
],
"urlForWrapping": [
""
]
}
}
]
}
}
]
}
In this example, the variable ${#cart} is configured to show price drop products. It includes the viewed price, from the unified customer profile.
The variable ${#recommendation} is configured to display product recommendations based on the strategy you selected.
{
"email": "${email}",
"campaign" : "${Campaign}",
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": {
"${#cart}": { // Specify the variable type as Price Drop Products in the JSON editor
"sku": "${sku}",
"SeenPrice": "${SeenPrice}", // Specify the variable type as User Profile Property in the JSON editor, and specify the value as Seen Price.
"Price Drop Percentage": "${Price Drop Percentage}" // Specify the variable type as User Profile Property in the JSON editor, and specify the value as Price Drop (%).
}},
"recommendations": {
"${#recommendation}": {"sku": "${sku}"}
},
"hiddenPixel": [
"${dyTrackingPixel}"
],
"urlForWrapping": [
"${dyRedirectStringLink}"
]
}
}
]
}
}
{
"email": "jajiv49023@94jo.com",
"campaign": "price_drop_DY",
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": [
{
"sku": "81467",
"SeenPrice": "15.99",
"Price Drop Percentage" :"12.2"
}
],
"recommendations": [
{
"sku": "85979",
},
{
"sku": "82404",
},
{
"sku": "82679",
}
],
"hiddenPixel": [
"
"
],
"urlForWrapping": [
"https://trem.dynamicyield.com/tremclk/?cuid=jajiv49023%4094jo.com&cuidType=ihe&sec=8772046&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl="
]
}
}
]
}
}
Creating Triggered Emails in Multiple Languages
To create a single triggered email campaign that delivers content in multiple languages, follow this procedure:
- Before you begin, verify that your product feed has multiple entries for multiple languages.
- Create audiences for each of the languages that are going to use that are defined by the user's location. For example, for french you might create an audience that includes users from France and any other french speaking countries you are targeting.
- Create a new triggered email campaign.
- Create one experience for each language you want to include.
- Each experience should have the same variations, with content that is translated to one of the languages.
- The variations should reference the translated entries in the product feed (e.g. “lang:FR_fr:name”).
- Use the targeting settings of each experience to target one of the audiences you created above.
- Create one experience for each language you want to include.
When a triggered email is served, users will receive an experience based on their location that is fully localized.