Recurring campaigns

Recurring campaigns are used when you want to send the same message to different recipients at defined intervals. This is usually something along the lines of a daily winback campaign, where the message is an offer to tempt the recipient back to your service, but the chosen recipients change each day, usually via some sort of selection rule like number of days since last order.

The key definition for a Recurring campaign is a batch of recipients at periodic intervals. If you need to send a message to individual recipients on demand, then please look at Triggered emails.

Initial setup

Set up the message content using the interface by following the user guide for Recurring campaigns or Recurring SMS. Additional notes on data selection and frequency control are below.

👍

Testing

While testing your code we recommend keeping the email in draft status so no emails will be sent. You can see if the process has worked correctly by looking at the next run timestamp in the email's 'Recurring' tab within Maxemail.

Data selection and frequency

Maxemail will send the recurring campaign to recipients matching the preselected list and segmentation each time it executes. You will use the API to control this recipient selection in one of two ways.

Standard data import

For a recurring campaign on a fixed schedule, for example daily, the standard approach is to maintain a list which is assigned to the recurring campaign with the correct recipients, and let the recurring campaign send according to the fixed schedule set using the interface. This may be a primary list of recipients with profile data appropriate for the recurring campaign's segmentation, or a dedicated list just for this campaign.

Data can be imported to the list using the API or a scheduled import configured through the interface. If using a list dedicated to this campaign, you may wish to use the option to remove existing subscribers when importing, to keep the list size controlled.

🚧

Use date segmentation

The recurring campaign will always send at the configured time, regardless of whether any data has been added. To prevent accidentally sending the same recipients for consecutive sends, date-based segmentation should be used. See the information in the user guide for Recurring campaigns and Recurring SMS.

If the data selection is being chosen outside Maxemail, you may consider adding a simple profile field to mark the date the campaign should be sent, so segmentation will simply check that the campaign date is equal to today's date. If an import fails, the previous recipients would not be sent the message again, as their date would no longer meet the segmentation criteria.

  • The recipient list is decided outside of the system, and you upload the chosen recipients to a defined list each day
  • You maintain a primary list of all recipients in the system, and use segmentation against a profile field to allow the system to choose the correct recipients for the current day.

Either way, you're probably going to have to import some recipient data into a list, although with option (2) this could be done in advance, and using the Scheduled Import function built-in to the List Import interface. Scheduled Import isn't really viable for option 1, because without the segmentation, if the import fails for whatever reason, the recurring email could be sent at 3pm to the previous day's data.

Advanced batch control

This is used when you need to send batches of recipients which do not fit a fixed schedule - in this case the entire end-to-end process is API controlled, including sending the campaign, following specific steps:

  1. Import recipients to a list which is dedicated to this campaign, setting the option to remove existing subscribers so that previous recipients are removed.
  2. Monitor the progress of the list import until it is complete.
  3. Set the next run time for the recurring campaign to a few minutes in the future, so it is sent to the recipients just imported.

When setting up the Recurring campaign you must set the recurring frequency to be set Via API instead of to a schedule. You may leave the Next Run date blank. If this option is not available, please contact the Support Team.

Email

A Recurring Email sits within a special folder which holds all the campaign copies which are created for each send. To create a new send you must use folder_recurring.update, which requires the ID of the Recurring Folder.

$folderId = 123;
$data = [
    'next_run_ts' => '2021-12-31 15:00'
];
$result = $api->folder_recurring->update($folderId, $data);

You can check that the Recurring Base Email's Recurring tab shows the correct Next Run time, and at the scheduled time the system will make and send a copy of the Base Email, to the selected recipients.

SMS

A Recurring SMS does not create separate campaigns for each recurring send. To create a new send you must use sms.setRecurring.

$smsId = 123;
$data = [
    'next_run_ts' => '2021-12-31 15:00'
];
$result = $api->sms->setRecurring($smsId, $data);

You can check that the Recurring SMS' Recurring tab shows the correct Next Run time, and at the scheduled time the system will send the messages to the selected recipients