Integrate with your email service provider (ESP) to send triggered emails to your users.
Prerequisites
To integrate with Dynamic Yield, your ESP must:
- Offer a RESTful API for sending messages, either using a “Send email” endpoint or an API-based events service.
- Support one of the following authentication methods:
- No Auth
- Basic Auth
- OAuth2
- Support JSON as a payload.
Setting up the integration
To set up an integration with your ESP:
- In Reconnect, go to the Integrations tab, and then click Create Channel Integration.
- Select the Email channel, and then complete the following information in the integration wizard.
Step 1: Configure
- Name: The integration name is included in your campaigns and their reports.
- HTTP Post URL: Your ESP's messaging endpoint.
- HTTP Header Parameters (Optional): You can insert header parameters in a key:value format. Click the lock icon next to the field to encrypt the value. The value displays as masked, and is encrypted before it's saved to our database.
-
Identifier Type: Select the user identification method required by your ESP. The corresponding value is included in the message JSON when you use the User Identifier variable.
For example, if you select Email, and insert the User Identifier variable into your JSON payload in a campaign, it's replaced with the user's email address, which you provided as part of the identification process.
Click Next.
Step 2: Authenticate
Select the authentication method required by your ESP:
- No Auth: No authorization is required, so there are no additional parameters to configure.
- Basic Auth: Enter a valid username and password as provided by your ESP.
-
OAuth2: Enter a token URL, client ID, and client secret, as provided by your ESP.
-
- You can change the key names of the client ID and secret in the header parameters section of the token information.
- By default, the client secret value is encrypted for security purposes.
-
When you click Next, the system validates the credentials you provided against the token URL. If they are invalid, an error is displayed.
Step 3: Test
To test your integration, send a test API call to your ESP:
- Request Headers: Displays the parameters you entered in the previous steps.
-
JSON Payload:
- Enter the message body, in JSON format, as your ESP expects to receive it.
- Click Test. An API call is sent to the ESP messaging endpoint you defined earlier.
- Request Response: This is the response from your ESP server.
If everything is working as expected, click Save. The integration appears in the Integrations tab.
Email integration configuration per provider
With this integration, Reconnect triggers emails from your ESP, enabling you to manage frequency capping, view reports, and generally maintain more control over how Reconnect emails are sent as part of your complete email program.
Prerequisites
- The Responsys integration enabled on your account. Contact your technical account manager for assistance.
- One or both of the following set up:
- Opted-in email addresses feed
- Message opt-in and opt-out events:
- Script-based event schema: Message opt-in, Message opt-out
- API reference: Track events
Note: The Responsys integration supports raw email addresses, hashed email addresses, and any external identifiers supported by Responsys. If you use hashed email addresses or external identifiers, make sure you use the same CUID or identifier in the message opt-in and opt-out events as you use for your omnichannel identification events (login, signup, and so on).
Enable the integration
- In Responsys, create an API user. Set to the role API Admin.
- In Experience OS, go to Reconnect › Integrations › Create Channel Integration › Email and select Oracle Responsys.
- In the Responsys Integration wizard, complete the following steps, as described in the following sections:
- Configure
- Authenticate
- Test
- If everything works as expected, save the integration.
Step 1: Configure
- Set the HTTP Post URL. This is the Responsys endpoint to which Dynamic Yield sends the POST request. By default, this is the Trigger Email Message endpoint, but you can modify it to use the Trigger Custom Event endpoint for additional flexibility. When a message is sent to Responsys, the ${dyCampaignName} variable injected to the last route of the endpoint is replaced with the relevant Reconnect campaign name.
After the username and password are authenticated, the complete URL is stored by Dynamic Yield and used to trigger calls to the defined endpoint. - Select the Identifier Type. This must be the same one you use in your identification events.
- Email: Select if your opted-in email addresses feed or message opt-in/opt-out events use raw email addresses as the identifier.
- Phone Number: Select if your opted-in email addresses feed or message opt-in/opt-out events use phone numbers as the identifier.
- Other: Select if your message opt-in/opt-out events use any other identifier that isn't an email address or a phone number.
Step 2: Authenticate
- Enter the Token URL issued by Responsys in your account.
- Username and Password: Enter your Responsys credentials to gain access to Responsys REST APIs.
Step 3: Test
- When authentication is complete, click Next to text the communication via the endpoint you defined in the Configure step, and view the server response.
- For testing purposes, you can change the campaign name in the URL. This doesn't affect the endpoint. You can also insert a test message in the JSON Payload field.
- Click Test. The response is displayed in the Request Response field.
- In Reconnect, go to Integrations › Create Channel Integration › Email and select Emarsys.
- In the integration wizard, complete the following steps:
-
Configure: Select the identifier type you use to identify users:
- Email: Plain text email addresses.
- Phone number
-
Other: Any string your ESP can map to an email address.
Important: If you select this option, you must also implement an Identify User event on your site, even if you already have another identification event implemented, such as Signup, Login, or Newsletter Subscription.
-
Authenticate: Upload the Emarsys credentials JSON file. The file is available on your Emarsys account or from your Emarsys account representative.
Sample Emarsys credentials file:{ "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" }
-
Test: Validate the integration by making a test call to Emarsys. Copy the JSON that you plan to send later on, in your campaigns.
In the following sample JSON payload, see the parameters you might need for a cart abandonment campaign, including the user identifier, 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="alt" width="\" 1\="1\" border="\" 0\="0\" height="\" 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\="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\">" ] }
- Click Save to enable the integration.
-
Configure: Select the identifier type you use to identify users:
With this integration, Reconnect triggers emails from your Klaviyo account, enabling you to manage frequency capping, view reports, and generally maintain more control over how Reconnect emails are sent as part of your complete email program.
Prerequisites
One or both of the following set up:
Enable the integration
In your Klaviyo account:
- Click your account avatar and then select Settings.
- Go to API Keys and copy the relevant private key.
Note: If you have not yet created a key, click Create Private API Key, and grant it full access permissions.
In Experience OS:
- Go to Reconnect › Integrations › Create Channel Integration › Email and select Klaviyo.
- In the Klaviyo integration wizard, complete the steps, as described in the following sections below:
- If everything works as expected, save the integration.
Step 1: Configure
Select the Identifier Type. This must be the same one you use in your identification events and Opt-in events/feed.
- Email: Select if your opted-in email addresses feed or message opt-in/opt-out events use raw email addresses as the identifier.
- Phone Number: Select if your opted-in email addresses feed or message opt-in/opt-out events use phone numbers as the identifier.
- Other: Select if your message opt-in/opt-out events use any other identifier that isn't an email address or a phone number.
Step 2: Authenticate
Paste the private API key you copied from your Klaviyo account and then click Next.
Step 3: Test
- In the JSON Payload input field, use the predefined JSON body that is expected, or enter any JSON expected by Klaviyo:
- Click Test. The API response from Klaviyo is displayed.
- Click Save. The new integration now appears in the Integrations tab.
For this integration, Reconnect uses the SendGrid Mail Send API endpoint, with a JSON API call body.
Note that the integration supports existing SendGrid account credentials. Use the same API keys you currently use in the Triggered Email app.
Enable the integration
- Go to Reconnect › Integrations › Create Channel Integration › Email and select SendGrid.
- In the Configure step, select the identifier type you use to identify your users on the SendGrid platform. Click Next.
- In the Authenticate step, enter your designated API key, provided by SendGrid (the API key can be found in your SendGrid account under Settings › API Keys). Click Next.
- In the Test step, enter a test JSON body, and then click Test.
- If everything works as expected, save the integration.
Create a template in the SendGrid platform
Sendgrid enables you to create dynamic templates with reusable HTML designs, which are triggered by an external API call from Reconnect.
- In Sendgrid, go to Email API › Dynamic Templates.
- Click Create a Dynamic Template and enter a name. Click Create.
- The template is created in the grid. Click it.
Note: When a template is created, it's assigned a unique Template ID. Use this ID in the JSON payload of the API request, as created in the Reconnect campaign. - Click Add Version.
- When a version is created, you can edit it using either a code editor or a design editor. For ease of use, we recommend working with the design editor. If what Sendgrid offers in its design editor does not align with your design requirements, use the code editor to edit the HTML code directly.
- To inject the data sent from Reconnect in the API call (as part of the campaign triggering), replace relevant content with dynamic variables by inserting double curly brackets (like this: {{variable name}} ). Learn more about which variables can be used in the message.
- To preview simulated content, go to the editor's Preview tab, and click {} Show Test Data.
Important: In the HTML code editor, make sure that the email’s product components can support not being displayed when a value is returned empty. You can do this using conditional statements.