Skip to main content

Agillic integration

This guide walks you through connecting Agillic to Better Email and exporting an email straight into Agillic as a ready-to-send campaign under Channels -> Emails.

Before you start

To connect Agillic, you will need:

  • an Agillic account with access to API credentials
  • a developer key and secret key created with public scope
  • the names of one or more target groups in Agillic that you want to send to
  • an admin user in Better Email who can create and edit integrations

1. Create the API credential in Agillic

In Agillic:

  1. Go to Settings -> API.
  2. Create a new credential.
  3. Use public scope.
  4. Copy the Developer Key and Secret Key.

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 Agillic as the type.
  5. Optional: under Access, restrict the integration to specific users or groups.
  6. Save the integration.
  7. Enter the Developer Key and Secret Key.
  8. In Target Groups, enter a comma-separated list of target group names from Agillic that should be selectable when exporting (for example: All customers, Newsletter subscribers, VIP).
  9. Enable the integration.
  10. Save the integration again.

TODO: Add a screenshot of the Agillic integration in Better Email showing the developer key, secret key, and target groups fields.

3. Prepare the email template

Agillic campaigns expect a placeholder block in the HTML. Add this block directly inside the email's <body> tag before exporting:

<div agblockgroup="true" agid="export_placeholder_does_nothing">
<div agrepeatingblock="true" agid="title"></div>
</div>

Better Email also shows this snippet on the export screen so you can copy it from there.

TODO: Add a screenshot of the Better Email editor highlighting where the Agillic placeholder block has been added in the template HTML.

4. Export to Agillic

When the integration is active, export is a single step:

  1. Open the email in Better Email.
  2. Click Export and choose the Agillic integration.
  3. Enter the Subject for the campaign.
  4. Pick a Target Group from the dropdown (populated from the list you configured on the integration).
  5. Click export.

Better Email then:

  • uploads the rendered HTML as a template in Agillic
  • commits the template
  • creates a campaign in Agillic under Channels -> Emails, wired up to your selected target group and ready to send

TODO: Add a screenshot of the Better Email export dialog with the Agillic subject and target group fields filled in.

TODO: Add a screenshot of the resulting campaign in Agillic under Channels -> Emails so users can see what to expect on the Agillic side.

Re-exporting an email

Re-exporting the same email from Better Email updates the existing template and campaign in Agillic instead of creating new ones:

  • Better Email stores a template identifier after the first export and uses it to update the same template on the next export.
  • Better Email also stores the Agillic campaign ID, so re-exporting updates the existing campaign's subject, target group, and content.
  • Templates are uploaded into the email/Better Email folder path in Agillic.

If you've already exported the email once, Better Email shows a note on the export screen letting you know the existing template and campaign will be updated.

Troubleshooting

If export fails, check:

  • the developer key and secret key are both valid
  • the credential was created with public scope in Agillic
  • the integration is enabled in Better Email
  • the right users or groups have access to the integration
  • the target group name you selected matches a target group that exists in Agillic
  • the placeholder block (agblockgroup with export_placeholder_does_nothing) is present in the email template