How to create an Automated Email Reminder for when a record is due
Accessing Schedules #
Navigate to Setup by selecting the spanner at the bottom left.
Select Schedules,
Select the plus icon to create a new schedule,
Schedule Details #
First name the schedule, the general naming convention is Module Name – what the schedule is doing – Company Name.
It is recommended to leave the Start & End Dates the same! (These will be affected by further options)
Select Active to ensure the schedule is running once saved.
Schedule Recurring #
The recurring section of the Schedule is how we define when the schedule shall run,
(Critical Note: You must select at least one value for the schedule to run at)
Recurring Example One #
As an example, if we wanted the schedule to run on the first day of every month at 8 am,
We would select 01 under ‘Day of Month’, 08 under ‘Hour’, and 00 under ‘Minute’,
Recurring Example Two #
As another example, if we wanted the schedule to run, every Wednesday during September at 10.30 am,
We would select September under ‘Month’, Wednesday under ‘Day of Week’, 10 under ‘Hour’, and 30 under ‘Minute’.
Recurring Example Three #
Finally, if we want the schedule to run every 30 minutes to be checked over the system for changes,
We select 00 & 30 under the ‘Minute’ column.
The Function Chain #
Below is a chart explaining the flow of the Function Chain we will make,
Adding Interceptors #
To add an interceptor navigate to the plus and the top right of the Function Chain,
Query #
First, we need to add the query interceptor, this is where we define our module to use,
Select the Model drop down and find the Module,
(In this example we will be sending an email to the Risk Admin when a Risk Review is Due)
Once you have selected the Module we need to define criteria for the schedule to check against, if it passes these criteria it will proceed, if it fails it shall stop here,
Selecting the AND will bring up a list of attributes we can use to create our criteria, in our example, we shall be checking if a Risk Review is Due, therefore we select the Review attribute,
Selecting the Equals option in orange will bring up additional operator options, for our example, we will stay with Equals,
Next, we need to select a date value to compare against, you can select a specific date or select a dynamic date range.
For our example, we shall be selecting Today,
The schedule shall then read as the following: Schedule continue where Risk Review equal to Today,
If the schedule runs and can’t find any Risk Reviews that are equal to Today it will stop here and run at the next assigned time,
Manager Interceptor #
Next, we add a manager interceptor, which allows you to select a certain Role to send the Email to,
(Note: Manager interceptor is normally used to send emails to Module Admins and Managers. Record owners and assignees don’t need a manager interceptor.)
Configuring the Manager Interceptor #
Next, we need to configure the interceptor, select the data source, what attributes to search for a certain role on, and then the actual role to be sending the email to,
- Data Source: Interceptors are hierarchical so they consume interceptors above them as you go down the Function Chain, as the manager is below query it will consume it via the Data Source option.
- Attribute: This is the field we search on to then find the specific Role, this will normally be the Owners field, but you can search for a Role on any user field.
- Role: This is where we select which role to send our email to. (You can have multiple manager interceptors, to send to multiple roles)
Template Interceptor #
The template is the critical section of your Automated Email where we define the content of the email, set up who the email gets sent to and any record data we would like to include,
First, we define the last Data Source in the Function Chain, (In this example that is the manager)
Next, we define who the email is from, you can use a users email, but its best practice to use the noreply@symbiant.co.uk
Setting up who to send to #
Next, we set who we are sending the email to, this can include;
- Valid Users names within the system (e.g. John Smith)
- Valid Emails (e.g. johnsmith@gmail.com)
- Coded Emails Senders (e.g. {{<generic/owners}}{{sm.user/email}}{{>generic/owners}} Sends to the owner of the record,
Below is an example of multiple ways to select who to email,
As we are using a manager interceptor, and want to send an email to every Risk Admin when a Risk Review is due we shall use the below-coded email sender to do this.
Coding Explanation #
{{<generic/owners}} – Open tag denoted by “<” we are setting which attribute to search a user on
{{<manager}} – Open tag denoted by “<” we are setting that we are using the manager interceptor to find the role
{{sm.user/email}} – System code to pick out a user accounts email
{{>manager}} – Close tag denoted by “>”
{{>generic/owners}} – Close tag denoted by “>”
Adding a Cc #
You can also add other users on the Cc line by using the same logic as before.
Adding a Subject #
Next, add a subject for your email, this can be whatever you wish,
Add Content #
Next, add the content of the email, again this can whatever you choose,
Adding Record Data #
To add record data, select the Template Patterns from the top right of the template,
Select Text Markers from the top menu, here you can see attributes that relate to the selected Module, simply copy and paste these onto your email,
We now have the reference of the Due Risk in our template, (Shown Below)
Adding End Of Message #
To ensure the schedule knows when to end an email we need to add <EOM> to the schedule, this ensures not all records that fit the schedules criteria are sent in one long email,
Adding the Tag-Filter #
Next, add the tag-filter, this works alongside tag-record, to ensure only one email is sent out per event occurring, select the Template from the drop-down,
Adding the Email Interceptor #
Next, add the Email interceptor, select the Template and what format to send the email as, either Plain Text OR HTML.
Adding the Tag-Record #
Next, add the tag record, this works alongside the tag filter, to ensure only one email is sent out per event occurring, select the Template from the drop-down,
HTML Formatting #
If you select to send your email as HTML, you can then use HTML tags to format the email further,
Such as adding line breaks with <br> and Bold Text with <b>Text</b>
Adding a Log #
Finally, we can add the Log interceptor which will store the email in the log viewer, name the Log Group to be the Module you selected at the beginning and select the template once again.
(Critical Note: Ensure there are NO spaces between words, instead use a dash (-) as shown below)
Once you have completed your schedule, remember to save from the top right.
Testing your Schedule #
To test your schedule simply select the play icon at the top of the function chain to force run,
An email should be sent and logged (Accessible from the log viewer in Set-Up mode).