The Mailjet Adaptor supports the following actions:
- Send a template-based email
- Subscribe user to an email list
- Unsubscribe user from an email list
- Process email delivery and email engagement events from Mailjet
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 Mailjet 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 Mailjet adaptor:
- Create a custom event in the Swrve SDK for the user action you want to use to trigger the email send process; for example, registration_complete.
- Create an Amplify rule that is triggered on receipt of the designated event and uses the Send Email action to send the email.
Marketing email lists
Marketing emails are bulk emails sent with minimal personalization to a set audience or list of users. Marketing emails are scheduled as opposed to triggered on a per-user basis. The target audience for a marketing email campaign are grouped as email lists. Management of such email lists and the scheduling of marketing email campaigns is done in Mailjet. Swrve is used only as a client to add or remove users from Mailjet-managed email lists.
For example, if you wanted to maintain an email list for users who have made in-app purchases, for retargeting purposes, you could create an email list called high_value_mobile_users in Mailjet and add users to the list (from Swrve) as and when the user makes their first purchase. Likewise, if the user opts out of receiving emails via an in-app message, the same user may be removed from an existing email list.
The action of removing or adding a user’s email is triggered on receipt of a related event. In the above example, the arrival of the purchase event or the email_opt_out event could be used as a trigger in a Swrve Amplify rule to implement the required list management behavior. There are two main steps involved in managing an email list via the Mailjet adaptor:
- Create a custom event in the Swrve SDK for the user action that you want to use to trigger the subscribe or unsubscribe action.
- Create an Amplify rule that is triggered on receipt of the designated event and uses the Subscribe User or Unsubscribe User action to manage the email list.
Update user properties
The Mailjet 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 the status of an email is returned as Blocked, use the Blocked event to trigger a Swrve Amplify rule that updates the value of a user property called email_blocked to true. You could then target those users with a push notification instead.
Step 1: To access the configuration settings, on the Mailjet Adaptor card, select Configure.
Step 2: Complete the following fields as required:
|API Key||The Mailjet API key.|
|Secret Key||The Mailjet API private key.|
Step 3: To save the configuration settings, select Save.
After you select 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.
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.
Use the Send Email action to trigger a template-based email that is sent from Mailjet. Complete the following fields to include the values required to send the email.
|Sender||The sender’s email address. This list is auto-populated from Mailjet.|
|From Name||The sender’s name.|
|To||Comma separated list of recipient email addresses.|
|Subject||The subject of the email message.|
|Template ID||The email template the email should use. Email templates are managed in Mailjet.|
|Substitutions||Substitutions are used to personalize the email template with user-specific values. Each substitution tag is associated with a list of replacement text for that tag in the email template body.|
The Subscribe User action adds a specific user to an email list that is maintained in Mailjet. Complete the following fields to include the values required to add the user to an email list.
|Contact List||The name of the contact list to which the user’s email address will be added.|
|The user’s email address.|
The Unsubscribe User action removes a specific user from an email list that is maintained in Mailjet. Complete the following fields to include the values required to remove the user from an email list.
|Contact List||The name of the contact list from which the user’s email address will be removed.|
|The user’s email address.|
The Mailjet inbound adaptor uses webhooks with the Mailjet system to receive asynchronous email delivery and engagement events. The webhooks are set up when you create your first Email campaign. Mailjet sends the following events to Swrve:
|Blocked||The system anticipated certain delivery problems and blocked the email from being sent.|
|Bounced||Receiving server could not or would not accept message.|
|Click||Recipient clicked a link in the message. You need to enable Click Tracking to receive this type of event.|
|Open||Recipient has opened the message. You need to enable Open Tracking to receive this type of event.|
|Sent||Message has been sent successfully.|
|Spam||The recipient marked the message as spam.|