Transactional emails are non-marketing messages which are sent in response to a customer action, or as the result of a standard process in your store. These messages should be informational, and the send should be expected or understood by your customers. Examples of transactional emails include password resets, purchase confirmation, payment failures, and shipping confirmation messages.
With Cortex's custom transactional stage, your brand can now organize all of its email messaging through Cortex.
The timeline of a transactional email
- A user visits your website or mobile app, and makes a "transaction", such as making a purchase.
- Your store or application will then use an API call to trigger a transactional email from Cortex
- In the API call, your store will send a "payload" of information, representing the email. This will identify the specific email to send, and will include dynamic content for the email
- ReSci's API will trigger Cortex's transactional stage, which will build and send the email immediately. This entire process will typically take seconds to complete.
Before you begin: if you have not already set up your API key for transactional emails during onboarding, request an API key from firstname.lastname@example.org. The help team will provide further instructions for activation.
Developers on your team will need to build API calls which send to ReSci for each transactional email. When it's time to send a transactional email, this API call will contain both the email information and dynamic content for the email. Cortex's normal merge tags are not available in transactional emails.
Coordinate with your developer to make sure any content you need is available for your API call. For example: a shipping confirmation may include purchaser, shipping address, order ID, and ordered item names. If you're not sure what content you will need, review your existing template or similar emails from other brands.
- Give your developers a list of the data you need and the merge tags you will use*.
- Build your Custom Transactional email template, and include your merge tags. (more on this below).
- Your developer will set up an API call for your email by following our documentation. They should test the API call thoroughly to ensure they are not getting any error responses.
- After the template is complete and active, have your developer test the email using a payload of example data.
- IMPORTANT: ensure you are passing an "accepts marketing flag" in any transactional emails that are potentially adding new users (such as an order confirmation). To be GDPR compliant, any forms that are collecting emails should also be collecting explicit consent to receive marketing. For more details, see our subscription options article.
*DO NOT use any of ReSci's reserved merge tag names.
Setting up emails in the custom transactional stage
Log in to Cortex, and navigate to the "Experiments" section on the "Campaign" page, and click "Custom Transactional":
Select "new email", and walk through the three steps, filling out the appropriate information.
On step 3, you can choose from several options to design your email:
For more info on how to use the various email building options, check out this section in our help center.
Setting up Merge Tags in your Custom Transactional Emails
In transactional emails you will declare new merge tags for each specific email template. These merge tags are then filled with content included in the API call for each email.
IMPORTANT: ensure the tags you are using in your Custom Transactional emails are your own unique tags. DO NOT use any of ReSci's reserved merge tag names, or some unintended things can happen, ranging from unexpected info being returned, to the emails not sending.
When you are finished with your email, save and send yourself a test send to ensure everything looks ok. Merge tags will not show true values, but will follow the example below:
Example email template and received test send:
In your transactional email, ensure all the merge tags used are present in the API call and spelled exactly the same as they appear in the email body. For our example above, the body of the API call would need to appear in the following format:
Custom Transactional Campaign Reporting
You can view the performance of your transactional emails in Trend Details, along with the rest of your campaign data.
Note: we already have a dedicated transactional "Welcome" stage to respond to account creations, which will work without needing your developer to set anything up, and you will not need to use the custom transactional stage. Simply use one of our integration partners, such as Privy, for email capture. Contact email@example.com for details.