Emarsys is an omnichannel marketing automation solution, comprising a customer data platform with campaign management.
Dynamic Yield’s integration with Emarsys enhances your email campaigns by triggering personalized emails (for example, upon cart abandonment or a price drop alert) with your Emarsys account.
Enabling Triggered Email integration
Enabling the integration requires a one-time setup that is described in this article. Once enabled, you can create triggered email campaigns in Dynamic Yield for various triggers (such as cart abandonment). When a user meets the trigger settings (for example, if a user abandons items in the cart), an event is sent to your Emarsys account with the relevant information (for example, the user's email address, the cart content, and any other information you might want to pass).
To enable the integration:
- Go to Settings › Integrations.
- Click Emarsys.
- Turn on the toggle to enable the integration for Triggered Emails.
- Upload the Emarsys credential JSON file. This file should be available in your Emarsys account.
Emarsys Credential File Example
{ "type": "service_account", "project_id": "project-id", "private_key_id": "key-id", "private_key": "-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n", "client_email": "service-account-email", "client_id": "client-id", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account-email" }
- Select the Identifier Type you will use in your ESP to identify user identity: Email (plain text email) or External ID (any string that your ESP can map to an email address).
If you use External ID:
- You cannot use the User Email feed to upload emails, and you will manage opted-in users by firing Message Opt-in and Opt-out events.
- Implement an Identify API event on your site. If you already have a Login, Singup, Subscribe to Newsletter events. implemented on your site - you will need to implement the Identify event in parallel with these events.
- Click Save to enable the integration, or use the Developer Sandbox to validate the integration.
Once the integration is enabled, triggered email campaigns will trigger your Emarsys campaigns. Learn more about creating triggered email campaigns.
Validate Triggered Email integration with the developer sandbox
The Developer Sandbox allows you to test that Dynamic Yield can trigger Emarsys campaigns and that the JSON parameters and values that are used in the Dynamic Yield campaign are applicable to the parameters and values of the Emarsys email templates.
To use the Developer Sandbox, copy the JSON that you plan to send later on in your campaigns. See below an example of such JSON, with the parameters you might need for a cart abandonment campaign: the user identifier, the items in the cart and their metadata, and the tracking pixel.
{
"em_dy_event_id": "af2e9aca-cb41",// a unique identifier
"em_dy_event_type": "abandoned_cart",
"em_dy_event_time": "2020-10-09T07:35:45Z",// time of send
"em_dy_user_id": "john.d@mail.com",// plain text email
"profile": {
"userAttrs": [
{
"content": {
"itemsInCart": [
{
"sku": "2264",
"name": "LSL Women Little Red Dress",
"image": "http://acme.com/pub/media/catalog/product/w/d/wd001.jpeg",
"link": "https://www.acme.com/tremclk/?cuid=john.d%40mail.com&cuidType=ihe&sec=8772046&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl=http://lifestylelabels.com/lsl-women-little-red-dress.html",
"price": 330
},
{
"sku": "2504",
"name": "LSL Women Blazer Zip - Red",
"link": "https://www.acme.com/tremclk/?cuid=john.d%40mail.com&cuidType=ihe&sec=8772046&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl=http://lifestylelabels.com/lsl-women-blazer-zip-red.html",
"image": "http://acme.com/pub/media/catalog/product/w/b/wb001_3.jpg",
"price": 750
}
],
"recommendations": [
{
"sku": "81467",
"name": "Flawless Concealer",
"link": "https://www.acme.com/tremclk/?cuid=john.d%40mail.com&cuidType=ihe&sec=8772046&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl=http://lifestylelabels.com/lsl-women-blazer-zip-red1.html",
"image": "http://acme.com/pub/media/catalog/product/w/b/wb001_4.jpg",
"price": 75
},
{
"sku": "83601",
"name": "Contouring Blush & Bronzing Powder",
"link": "https://www.acme.com/tremclk/?cuid=john.d%40mail.com&cuidType=ihe&sec=8772046&expId=0&expVer=0&expVisitId=&mech=0&smech=&va=&targetUrl=http://lifestylelabels.com/lsl-women-blazer-zip-red2.html",
"image": "http://acme.com/pub/media/catalog/product/w/b/wb001_5.jpg",
"price": 50
}
]
}
}
]
},
"hiddenPixel": [
"<img src=\"https://www.acme.com/tremop/?cuid=john.d%40mail.com&cuidType=ihe&sec=8772046&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\">"
]
}
You can revisit the Developer sandbox at any time to validate the integration. However, if you create campaigns, the "Preview variation" button in the campaign settings will allow you to do the same, straight from there, using the variation JSON.