Last modified September 15, 2016 by Shelly Wolfe

Mandrill

mandrill_logoMandrill is a transactional email delivery and management service offered as an add-on for MailChimp. The Mandrill Adaptor enables you to trigger custom and template-based emails from Swrve based on user actions within the app. It also processes email delivery and engagement statistics sent from Mandrill to Swrve.

Supported Actions

The Mandrill Adaptor supports the following actions:

Outbound Actions

  • Send a custom email
  • Send a template-based email

Inbound Actions

  • Process email delivery and email engagement events from Mandrill

Use Cases

Transactional Emails

Transactional emails are sent in response to a user’s real-time action in the app. For example:

  • Send a welcome email after the customer completes the sign up process.
  • Send a purchase receipt email after the customer completes a purchase.

Using the Mandrill adaptor, Swrve triggers a transactional email upon receipt of a selected user action that is configured as a mobile event. There are two main steps involved in triggering transactional emails via the Mandrill adaptor:

  1. Create a custom event in the Swrve SDK for the user action that you want to use to trigger the email send process; for example, registration_complete.
  2. Create an Amplify rule that is triggered on receipt of the designated event and uses the Send Custom Email or Send Template Email action to send the email.
The Send Custom Email and Send Template Email action configuration includes mandatory fields, such as the To and From email address. If the values vary by user and you want to include them as dynamic content when configuring the rule, ensure the values are included as part of the trigger event payload or set up in Swrve as a user property. If any of these values are the same for all the emails (for example,  From Email), you can configure it manually when setting up the rule.

Update User Properties

The Mandrill adaptor sends email delivery and engagement events to Swrve, which you can use as part of your campaign engagement analysis or to trigger actions in Swrve. For example, if a customer unsubscribes from receiving emails, use the receipt of the Unsubscribe event to trigger a Swrve Amplify rule that updates the value of a user property called email_unsubscribed to true. You could then target those users with a push notification instead.


Adaptor Configuration

Step 1: To access the configuration settings, on the Mandrill Adaptor card, click Configure.

Step 2: Complete the following fields as required:

Field Description
API Key The Mandrill API key.

Step 3: To save the configuration settings, click Save.

After you click Save, the status of the Adaptor changes to Active and the Deactivate button is available. If you Activate or Deactivate the adaptor at any time, the changes apply to both the outbound and inbound actions.


Rule Configuration

This section describes the fields that are included when creating a new rule using the selected action. For most fields, you have the option to manually enter the value or to select a user property from the list to have Swrve automatically populate the value when the rule is processed. For more information on rules, see Creating Amplify Rules.

Send Custom Email

Use the Send Custom Email action to trigger a fully composed email that is sent from Mandrill. Complete the following fields to include the values required to send the email.

Field Description
To Comma separated list of recipient email addresses.
From Email The sender’s email address.
From Name The sender’s name.
Subject The subject of the email message.
Text Body The plain text content of the email message.
HTML Body The HTML content of the email message.
Global Merge Variables Global Merge variables are used to personalize the email with user-specific values. Each variable is used to inject text into the email body.
BCC BCC recipient email address. (Optional)
Reply To Comma separated list of Reply To email addresses, including aliases if applicable. (Optional)
Async Enables a background sending mode that is optimized for bulk sending. (Optional)
IP Pool The name of the dedicated IP pool previously setup at Mandrill to send this message.
Send at Timestamp The date used in the email header. The date must be coded in UTC text format. (Optional)

Send Template Email

Use the Send Template Email action to trigger a template-based email that is sent from Mandrill. Complete the following fields to include the values required to send the email.

Field Description
To Comma separated list of recipient email addresses.
From Email The sender’s email address.
From Name The sender’s name.
Subject The subject of the email message. (Optional) If the selected template includes a Subject value, this value overwrites it.
Template Name The email template (slug) to use with this email. Email templates are managed in Mandrill.
Template Content Content that you want to include in the email that is auto-populated with custom values, based on a payload included in the selected property. (Optional)
BCC BCC recipient email address. (Optional)
Reply To Comma separated list of Reply To email addresses, including aliases if applicable. (Optional)
Global Merge Variables Global Merge variables are used to personalize the email with user-specific values. Each variable is used to inject text into the email body.
Async Enables a background sending mode that is optimized for bulk sending. (Optional)
IP Pool The name of the dedicated IP pool previously setup at Mandrill to send this message.
Send at Timestamp The date used in the email header. The date must be coded in UTC text format. (Optional)

Inbound Actions

The Mandrill inbound adaptor uses webhooks with the Mandrill system to receive asynchronous email delivery and engagement events. The webhooks are set up when you activate the Mandrill adaptor. Mandrill sends the following events to Swrve:

Event DESCRIPTION
Click Recipient clicked a link in the message. You need to enable Click Tracking to receive this type of event.
Hard Bounce The message was hard bounced.
Opened Recipient has opened the message. You need to enable Open Tracking to receive this type of event.
Rejected The message was rejected. For more information about rejection reasons in Mandrill, see About Rejected Emails.
Sent Message has been sent successfully.
Soft Bounce Message has soft bounced.
Spam Report The recipient marked the message as spam.
Unsubscribe Recipient unsubscribed.
Delayed Message has been sent, but the receiving server has indicated mail is being delivered too quickly and Mandrill should slow down sending temporarily (not exposed in Reports UI).