The automated emails that are sent after a yearbook production run is sent is sent via the Automate FORM EMAILS system. There is an awesome opportunity to use this system for more automated follow ups. The code here is a bit complicated but it’s very robust and can automate hundreds of hours of correspondence if you know how to set it up properly.
The automated FORM EMAILS are sent via the Entourage Ticket system which is great because each time an email is sent, a TICKET is created for the account. The script for sending emails runs every day at 1AM EST.
Automated emails are defined under ADMIN->WEB->Administration Screens -> Form Emails

You can create a new AUTOMATED FORM EMAIL by filling in the form after you click CREATE NEW. You can define the title of the form email, the subject and the email body as seen below.

There are a number of dynamic fields you can specify in the “email_template”. Disregard the email_body as that is not really used as longa s you fill in the email_template.
The dynamic fields you can currently use are:
- [PRIMARY_CONTACT_NAME]
- [YEARBOOK_TITLE]
- [DELIVERY_BY_DATE]
- [ACCOUNT_MANAGER]
- [TRACKING_INFO]
We can add additional dynamic fields if you need them by adjusting the AutomatedFollowUpEmails scripts (details belows).
Specifying the SQL
You then need to specify which accounts should receive the automated email. You just need to build a SQL statement off of the YEARBOOKS table. Make sure to include the following fields from YEARBOOKS
- yearbook_id
- yearbook_title
- primary_contact_name
- contact_email
- status

Then you can use the following dynamic date fields to specify the time based triggers for how to send which emails when. In the above email, we send the email when there are ‘BOX’ components inserted into the JOB_COMPONENTS table for any production run.
- [YESTERDAY_DATE] – yesterdays date at midnight
- [TODAY_DATE] – todays date at midnight
- [ONE_WEEK_AGO] – – 14 days prior
- [TWO_WEEKS_AGO] – 14 days prior
You can use the above technical date fields to trigger when to send the form emails
No Duplicate Sends
One nice feature here is that the Automated FORM EMAILS checks if a FORM email was ever sent to a particular YBID and if it was, it won’t allow a duplicate email to be sent.
Final Send Report
Each day an email is sent a SEND REPORT is emailed to “yearbooks@entourageyearbooks.com” so you can see a record of who was emailed and the delivery status. You can also refer to the TICKETs for a yearbook account and will see the email notification there.

Technical Information
The following is some technical information, more for the WEB TEAM.
Script Name: scripts/ses/AutomatedFollowUpEmails.vbs
Table Name: FORM_EMAILS
