How To Set Up an Order Follow Up Email

Define the orders whose customers should be sent a follow up email.

From the main Orders grid screen, use the filters and keyword search, to create the criteria of which orders should be included in the follow up email.

image-20240314105912641

In this example, the filters limit the orders by the Placed On date. In addition we have added another filter to limit the orders to those that were for a particular item. Any set of filters can be applied. For full details on how to use the grid screen and filters, see the Administrator Grid Screens document.

Using the Placed On date as this one does is a common approach:

image-20240314110005173

Note the above criteria (from 30 days ago to 7 days ago) is a rolling criteria. This means we can reuse the report and have the job send follow up emails on a nightly basis. The follow up job (see below) keeps track of which orders it has sent emails for, and will not resend the same notification for the same order.

Create a report from the filtered grid screen you've set up.

Once you have defined which orders to send follow ups to, create a report from the filters you've defined. Under the three dots menu, select Save Page as Report:

image-20240314105941039

On the next screen, give the report a name and code to describe it. Note the code you give the report - you'll use this later to set up the follow up job. Click Add New Record to save the report.

image-20240314105821559

Under Report Parameters, you can set the Size field to limit the number of records in the report - and thus, the number of emails that are sent out. If you do not define the Size field, it defaults to 1000, which is the maximum number of emails produced by each run of the job. Setting the Size field to a very low number initially can be a good way to test the whole process.

Review and if necessary edit the Notification and Template for the follow up job.

A notification and template is provided for you for follow up emails related to orders, but it may not be exactly what you want to send your customers. You should find and review both the notification and the email template it uses. Under Notifications, click into the Order Follow Up Job Notification:

image-20240314110350284

In particular, review the notification's "Tos" field under Message Fields. By default the notification sends emails to the customer's billing email address. This is probably suitable for most cases but you might prefer to send them to the delivery email address, for example.

Next, click into the notification's Template, which by default has the same name as the notification (Order Follow Up Job Notification). Review the messaging and layout of the template, including the Email Subject field and Email Body field. Make any necessary changes.

Note, it is often a good idea to create a new notification and/or template, particularly if you are setting up multiple follow up reports based on different criteria. For full details on how to do this, see the Notification Features document.

Configure the follow up job with the report and the notification you would like to use.

The last step is to configure the site job. Tell it to use your notification to send an email for each of the orders in the report you created.

Set up the Site Job

The system comes configured with a default Order Follow Up Job under Operations -> Site Jobs. You can reuse this job or set up a new one. If you set up a new one, just make sure it uses the "Order Follow Up Job" site function for the job's Site Function field.

image-20240314111145278

You'll note by default this job's Is Active flag is off. We suggest you keep it off until you've finished configuring it with the below steps.

If your report has a rolling criteria, like our above example, it might make sense to set the Frequency of the job to Nightly or another recurring value. However, it's also possible to just have the system send out the follow up emails once, in which case you can select "Once and Done" for the Frequency.

For Next Fire Time, note that any date in the past will cause the job to run within a few minutes of when you activate it. If you wish the emails to go out at a particular time in the future, set the Next Fire Time to a future date or time. (If you have configured the Frequency to Nightly or another recurring value, the system will reset the Next Fire Time automatically after it runs each time.)

Configure which Report and Notification to use

Next, you need to tell the job which report and which notification to use to send out the emails. Do this from the Site Job Settings option under the three-dots menu:

image-20240314111828359

On the settings grid screen, make sure the setting values for the "reportCode" and "notificationCode" settings are set to the report and notification you want to use:

image-20240314112054038

With these values in place, you can then go back to the main Site Job screen, and activate the job to have it run automatically. In addition you can choose Run Job ... from the three-dots menu to the run job manually and send out the emails.

Option to reuse a notification for multiple follow ups

By default the system will skip sending an email if it sees that the follow-up notification was previously sent for the order. You can override this, however, which can be useful if you need to send the same notification periodically to the same customers. To override this setting, add another Site Job Setting whose code is 'sendOnlyOncePerOrder' and with a Boolean Value of 0 (ie false):

image-20240329153125118

Note: if you do not add this setting, it will default to true. In other words it will only ever send the same follow up notification once per order.

View the email messages that are produced by the job.

After the job runs, you can view all of the email messages that it produced by visiting the Notifications -> Email Messages screen. You can filter by the subject field or other fields to find the emails produced by the job.

Note: it's not a bad idea to test this whole process by adding filters to the report that limit the number of emails that are sent out, or using the report's Size field to limit it. Once you are comfortable with the emails that are generate, you can then expand the report's criteria to include everyone you want to include.

Opting Out of Order Follow Up Notifications

Generally speaking, follow up emails related to an order the customer placed with you are not considered spam, because there is an existing business relationship between the sender and the recipient. Nevertheless, It's a good idea to provide a way for your customers to opt out of receiving the notification repeatedly.

Note: This pertains to notifications that are reused for multiple follow up emails for the same order, ie, where there is a site job setting with a code of "sendOnlyOncePerOrder" set to false (see above). If the customer opts out of a given notification and order, and they place another order later, they must opt out again for the new order. In addition, if more than one type of notification is sent out for the same order, they must opt out of each notification separately.

The default OrderFollowUpNotification template that the system comes with has a link at the bottom for the customer to opt out of receiving the notification again for the same order. If you create a different template for your order follow up emails, you use the same link format:

<a href="${baseUrl}/orderNotificationOptOut/${order.orderNumber}/${order.syncCode}?notification=${notification.syncCode}">Opt Out</a>

When a customer clicks the link that is generated from this template code, the order setting described below will get added to their order, and it will be excluded from being sent the same notification again. The customer will be taken to your site and shown a success message indicating they were successfully opted out.

How To Manually Mark an Order As Opted Out From a Given Follow Up Email

  1. Find the customer's order, and under the three-dots menu, click "Order Settings" to add a new order setting indicating that they have opted out of a particular follow up email:

image-202403211133206252. Click the plus icon to add a new Order Setting under the order and enter the following values for the fields.

image-20240321113657587

  1. For the setting's code and name, enter the code of the notification record that they are opting out of, followed by "-OptedOut". For example if you are using the default "OrderFollowUpJobNotification" notification, enter "OrderFollowUpJobNotification-OptedOut" for the code and name of the setting.

  1. For the setting's Setting Type, use "PRIVATE". (This means the customer will never see the setting or its value.)

  1. For the Setting Value, enter 1.

  1. Click Add New Record.