Autopilot email in Ortto

This page describes some of the differences and considerations for using Autopilot emails in Ortto.

IMPORTANT:

  • Merge tags from Autopilot are not supported in Ortto. You must adjust the merge tags correctly before uploading. Learn more about using merge tags and Liquid syntax in Ortto in Personalizing campaign content with Liquid.
  • If you assign a variable within a campaign message, including a JSON endpoint, the variable must begin with var so that Ortto can recognize it as a declared variable. Learn more about variable tags.

Use Autopilot email templates in Ortto

When you create an email for an email campaign, playbook or journey, you will see the option Autopilot emails. Click this option to reveal all of your existing emails in Autopilot.

When you find the template you want to use, simply select it then click Use template.

It’s important to update any merge tags or Liquid syntax in your emails to the new Ortto structure. The easiest way to do this is to select Insert merge tag when editing the email message content and select the appropriate tag.


Upload Autopilot formatted emails into Ortto

You can upload an HTML file or ZIP file at the Template stage of creating an email message. However, you will need to check that your HTML file contains the correct merge tags and variable syntax, as these differ between Autopilot and Ortto.

An example of the differences between merge tags is that Autopilot’s {{ contact.email }} in Ortto is now {{ people.email }}. All existing Autopilot fields are accessible using the “ap2” namespace, for example {{ people.ap2.company }}.

Autopilot contact and custom variables

You can access the following values for Autopilot contacts:

{{ people.ap2.from-salesforce }}

{{ people.ap2.is-crm-owner }}

{{ people.ap2.unsubscribed }}

{{ people.ap2.number-of-employees }}

{{ people.ap2.company }}

{{ people.ap2.email }}

{{ people.ap2.first-name }}

{{ people.ap2.ap2-id }}

{{ people.ap2.image-url }}

{{ people.ap2.industry }}

{{ people.ap2.last-name }}

{{ people.ap2.lead-source }}

{{ people.ap2.mailing-city }}

{{ people.ap2.mailing-country }}

{{ people.ap2.mobile-phone }}

{{ people.ap2.mailing-state }}

{{ people.ap2.mailing-street }}

{{ people.ap2.mailing-postal-code }}

{{ people.ap2.name }}

{{ people.ap2.owner-name }}

{{ people.ap2.phone }}

{{ people.ap2.rating }}

{{ people.ap2.status }}

{{ people.ap2.salutation }}

{{ people.ap2.sf-id }}

{{ people.ap2.title }}

{{ people.ap2.type }}

{{ people.ap2.twitter }}

{{ people.ap2.website }}

{{ people.ap2.created-at }}

{{ people.ap2.crm-created-at }}

{{ people.ap2.crm-updated-at }}

You can also still access all of your Autopilot custom fields in merge tags, via the ap2_custom namespace. For example, {{ people.ap2_custom.my-custom-variable }}.

IMPORTANT: Autopilot supported the variable format -email-, where the lowercase name had an un-spaced hyphen on either side. This format is not supported in Ortto and all of these variables will need to be manually converted to the {{ people.email }} format, or, in the case of ap2 variables the {{ people.ap2.company }} format.

Similarly, in Autopilot, variable names handled spaces by removing them (e.g. "My custom variable" would be {{ contact.mycustomvariable }}). In Ortto, spaces are handled by adding hyphens (e.g. {{ people.my-custom-variable }}). So, when accessing custom Autopilot variables in Ortto, you need to replace spaces with hyphens, e.g. {{ people.ap2_custom.my-custom-variable }}.

However, if you create a new campaign or journey/playbook message in Ortto, and select an Autopilot email as a template, you will not need to update the merge tag or variable syntax (as it will already be converted to meet Ortto’s requirements).

Assigned variables

In Ortto, assigned variables must begin with var in order for Ortto to be able to recognize them.

This is demonstrated using an example from the guide to Personalizing campaign content with Liquid, under Variable tags:

One way you could use a variable tag is to assign a variable with the value of now to determine the time (using the strftime syntax) you send the message (rather than when the recipient sees the message)



{% assign vartodaydate = 'now' | date: '%s' %} {% assign varexpiry = people.custom.expire-date | date: '%s' %} {% if varexpiry < vartodaydate %} Your subscription expired today {% endif %}

All non-transactional emails are required to include an unsubscribe link in them. This is best practice for email deliverability, and a requirement in both Autopilot and Ortto.

In Autopilot the unsubscribe link was created with the special variable: -unsubscribe-, or in HTML, <a href="--unsubscribe--">Your unsubscribe text</a>. In Ortto this now needs to be done using Liquid: {{ urls.unsubscribe }}.

JSON static and dynamic content

The {{ json 'https://url.com' }} custom tag used in Autopilot to get in-context information about each contact in the email is still available in Ortto, but is done in a different way. If you use the JSON tag then some changes will need to be made on your side.

The two big changes are:

  • The JSON endpoint is configured at the campaign level now. So instead of having the {{ json }} tag in your code, you configure it as part of the campaign setup, providing a URL and HTTP method. Once configured this works like before where you can access the data through the {{ json.variable }} method.
  • The JSON endpoint now requests up to 200 contacts at a time. So instead of providing a payload like {"contactId": "contacts_person_3C86FF1C-9E87-40B1-8D13-1AA064B0BF7A","email": "george@autopilothq.com"} as it did before, the payload will now look like this: {"people": [{"id": "XXX", "ap2id": "contacts_person_3C86FF1C-9E87-40B1-8D13-1AA064B0BF7A","email": "george@autopilothq.com"}, {"id": "XXX", "ap2id": "contacts_person_3C86FF1C-9E87-40B1-8D13-1AA064B0BF7B","email": "jenny@autopilothq.com"}, …] }

The reason for this batching is performance. Fetching each contact individually slows down the email send significantly, and puts a larger than necessary load on your system too. By using this technique everything is faster and more efficient, and only requires small code changes to be supported.

NOTE: The {% rss https://url.com %} feature in Autopilot is not supported in Ortto, as you can achieve the same result with a JSON endpoint.

The {% json-static 'https://url.com' %} tag is used in Autopilot to fetch data which is used for the entire email campaign not just individual contacts. This means that you only have to fetch it once per send, rather than for every contact — putting a big load on your system. In Ortto, the same technique is available, except you set it on the campaign level, just like the contacts endpoint.

Learn more about JSON under Dynamic content in Creating an email campaign.