Skip to main content

Adobe Journey Optimizer integration

This guide walks you through connecting Adobe Journey Optimizer (AJO) to Better Email. Each Campaign you sync becomes an email content template in an AJO sandbox, ready to use when your team builds a campaign or journey in AJO. Better Email can also read the sandbox's Profile attributes and audiences into recipient fields for personalization and segmentation.

A sandbox is Adobe Experience Platform's word for an environment. Each one has its own Profile schema, profiles, audiences and templates, and organizations usually have one for production plus a few for development or testing. Some keep separate production sandboxes for brands or regions. Connect each sandbox you want to sync to as its own integration.

Before you start​

To connect AJO, you will need:

  • access to the Adobe Developer Console for your organization
  • the name of the sandbox you want to sync to
  • an admin user in Better Email who can create and edit integrations

1. Create a credential in the Adobe Developer Console​

In the Adobe Developer Console:

  1. Create a new project, or open an existing one, for Better Email.
  2. Add the Adobe Journey Optimizer API and the Adobe Experience Platform API to the project.
  3. Choose OAuth Server-to-Server as the credential type.
  4. Assign product profiles that give access to the sandboxes Better Email should sync to. One credential can serve several sandboxes.
  5. Copy the Client ID, the Client Secret and your organization ID from the credential.

Both APIs share this one credential. Better Email writes content templates through the first, and reads Profile attributes and audiences through the second.

2. Set up the integration in Better Email​

In Better Email:

  1. Go to Integrations.
  2. Create a new integration.
  3. Enter a clear name for the integration.
  4. Choose Adobe Journey Optimizer as the type.
  5. Enter:
    • Organization ID, which ends in @AdobeOrg
    • Client ID
    • Client Secret
    • Sandbox, the sandbox's name, not its title. Names are lowercase, like prod or dev-emea. Leave it blank for prod.
  6. Leave Scopes blank unless the credential's sample token request in the Developer Console lists different ones. Better Email uses the standard Experience Platform scopes by default.
  7. Optional: turn on Sync recipient fields (see Personalization with recipient fields).
  8. Enable the integration.
  9. Save the integration.

Better Email requests and refreshes the access token itself. There is no approval popup.

To sync to another sandbox, create another integration with the same credential and that sandbox's name. If you change the Sandbox of an existing integration, Better Email retires the recipient fields it synced from the old sandbox. Sync recipient fields again afterwards.

3. Set up Destinations​

Saving the integration creates the default Destination. Open the Destinations tab to set where templates land:

  • Folder ID, the ID of the content template folder new templates go in. Leave it blank for the top level.
  • Default subject, the template's subject when a Campaign has none of its own.

If your teams keep their templates in separate folders, add one Destination per folder and pick it on the Campaign.

4. Sync a Campaign to AJO​

On the Campaign's Review tab, click Sync to <integration name>.

The first sync creates an email content template in the integration's sandbox, in the Destination's folder, named after the Campaign, with the Campaign's subject and rendered HTML. Its description reads "Synced from Better Email", so you can tell it apart from templates built in AJO.

Later syncs replace that same template with the latest version. Better Email creates a new template instead when:

  • the template was deleted in AJO
  • the integration now points at a different sandbox

Better Email doesn't create campaigns or journeys. In AJO, build the campaign or journey and use the synced template for its email content.

AJO content templates get no separate preheader from Better Email. The preheader reaches the inbox only if your Design System renders it in the HTML, for example with context.email.preheader.

5. Personalization with recipient fields​

Recipient fields export as AJO personalization expressions on the Profile, which AJO fills in per recipient at send time:

Hi {{profile.person.name.firstName}},

Syncing fields from AJO​

  1. On the integration, turn on Sync recipient fields and save.
  2. Click Sync now in the page header.

Better Email reads the sandbox's Profile schema and creates a recipient field for each attribute a condition can compare. Fields are named by their path in the schema, such as person.name.firstName or _yourtenant.loyaltyTier for an attribute in one of your own field groups. Attributes with a list of allowed values bring those values along.

Some attributes are left out on purpose:

  • date-time attributes, because they carry a time of day that a calendar-date condition would compare on the wrong side of midnight (plain date attributes are included)
  • arrays and maps, because a condition can't compare them with a single value
  • identities, experience events and audience membership, which aren't personalization values

New fields arrive inactive. Switch on the ones you want to use on the integration's Recipient fields tab.

Audiences​

The sync also reads the sandbox's audiences. Each one arrives as a yes/no recipient field named Audience: <audience name>, so segments and block variants can target people by audience membership. A profile counts as a member when AJO has it in the audience, whether it just qualified or has been in for a while. Audience fields take is and is not only: a profile is always either in an audience or not, so is set isn't offered.

If Better Email can't read the whole audience list, the sync says some fields could not be read and keeps your existing fields available.

Adding a field by hand​

You can also add recipient fields by hand under the Recipient fields tab. Set the field's ESP field name to the attribute's path in the Profile schema, such as person.name.firstName. Better Email adds the profile. prefix on export.

See Recipient Fields / Merge Tags for the general setup.

6. Segmentation and block variants​

Segments and block variants export as AJO conditional blocks around each variant's content:

{%#if profile._yourtenant.loyaltyTier = "gold"%}
...content for gold members...
{%else%}
...content for everybody else...
{%/if%}

The Everybody else fallback becomes the final else branch, so the first matching variant wins, as it does in preview. A field with no value only matches is not and is not set, the same as in Better Email's preview. Use preview profiles to check the variants before you sync.

Troubleshooting​

  • AJO refuses the credentials. The credential's product profiles probably don't cover the integration's sandbox. Add the sandbox to a product profile on the credential.
  • "… is not an Experience Platform sandbox name." The Sandbox setting holds the sandbox's title. Use its name, which is lowercase with hyphens, such as prod.
  • Sync fails before reaching AJO. Check that the Organization ID, Client ID and Client Secret all come from the same credential, and that the secret hasn't been rotated. If you filled in Scopes, try clearing it.
  • A date-time attribute is missing after a sync. Date-time attributes are left out on purpose. See Syncing fields from AJO.
  • A new field doesn't show up in the Campaign Editor. Synced fields arrive inactive. Switch it on in the Recipient fields tab.