Email Actions: When you need to send Emails from SAI360

The Email Designer is a graphical tool, which enables users to create and modify emails which need to be sent by the SAI360.

You are able to define the content of the email, and you can apply formatting to the message body by using the integrated rich text editor.

In addition to all the fields which are necessary to define emails (To, CC, From, Subject and Message), there are two additional fields you need to define:

  • Email Action

    You should enter a short description for the current Email Template.
    The name you enter here will be shown in the Action Designer, therefore you should use a description which will make it easy to identify this email at a later stage.

  • Fallback Address

    You need to manually enter a REAL email address.

    This address will be used if the email cannot be sent to the recipient defined in the TO field, for example because of a missing email address.

    Note: For most clients, this address will be same throughout the system.

WHAT can I include in an email?

Email Content

If you need to use ...

You will have to

Text, which is the same for each email which is sent from this template (static text).

Type the required text in any of the fields.

For example:
- Notification of Incident:
- Incident was reported by:

Text, which will represent the value of the current record (dynamic text).

You will need to enter the relevant field, either by selecting it from the field picker, or by typing the field name within square brackets: [field name].

You can insert these at any position within a text or field.

For example:
Notification of Incident [Incident Number]:[Summary]

Relationships, which are "to many". For example Incident : People notified.

(In the Field Picker, these Relationships are denoted either as or as )

The way you need to treat these fields will depend on whether you are using it as part of the TO or CC field, or as part of the Message Body.

  • When used in the TO or CC field:
    You will need to select the field which contains the Email Address, for example:

    - Send an Email to all People who need to be notified:
    [People notified:Email Address]

    - Send an Email to all Staff Members of a Department responsible:
    [Department responsible:Staff:Email Address]
  • When used as part of the Message Body:
    You can only select the relationship itself, but you won't be able to select include individual fields of a to-many relationship. For example:
    - Correct: [People notified]
    - Not correct: [People notified:Email Address]

Attachments in the Email

To include any files which may be attached to a record, for example Supporting Documentation, you will need to just add the relationship to the File Component to the field Attached.

For example: [File Storage], or [Links to Minutes].

A link in the email, which will take the user back to the record which triggered the email.

The link can be simply created by clicking on the Insert Link button. This will generate the string "#Link to record#", which you can place in your message body.

After saving, this link will be displayed as follows in the email designer:

#WebRoot#view/Actions/[Action Number]

 

If you intend to take a user directly to a Page on a Form, you can simply add a '#' symbol plus the name of the page to that link, for example:

#WebRoot#view/Actions/[Action Number]?page=Action-Completion

A link in the email, which will take the user to the PARENT record of the record which triggered the email.

NOTE:
You can only use parent relationships if this parent will ALWAYS be there.

For example:

  • OK:
    Action Progress back to Actions
  • NOT OK:
    Actions back to Incident as Source of Action (because not all Actions will have an Incident as a source).

An example would be: from an Action Progress Record, you want a link directly back to the Action Record, rather than the Action Progress Record.

Follow these steps:

  • Using the field selector, place the auto-number field representing the ID of the Parent Record (e.g.: Action Number) onto the Message Body.
    In our example, this would look like:

    [Action as source of Action Progress:Action Number]
  • Now you need to precede the above string with
    #WebRoot#view/[Form Name]/

    In our example, this would translate to:

    #WebRoot#view/Actions/[Action as source of Action Progress:Action Number]

 

A link in the email, which takes the user to other parts of the Web Application which can be accessed via Smart URL.

Using Smart URL, it is also possible to create links to other parts of the SAI360 Web Application within an Email Action. These are for a:

  • a Page on a Form:
    #WebRoot#view/[Form Name>>/[Auto-Number]?page=[Page Name]
    e.g. #WebRoot#view/Actions/[Action Number]?page=Action-Completion
  • List View:
    #WebRoot#list/[Name of List View]
    e.g: #WebRoot#list/All-Actions
  • BI Report:
    #WebRoot#report/[Menu Group Name/[Report Name]
    e.g: #WebRoot#report/Incident-Management/Incident-Report
  • SAI360 Dashboard:
    #WebRoot#dashboard/[Dashboard Name]
    e.g: #WebRoot#dashboard/Environment-Management


NOTE: if any of the Pages, Views, Reports or Dashboards have a space in their name, you must replace that space with a '-'. For instance, instead of "All Actions", you need to use "All-Actions".

HOW can I select a "Field" (dynamic text) for an email?

You can enter fields into the Email Designer in three different ways:

  1. Select the Field via the Field Picker

    The buttons To:, Cc:, From:, Subject:, and Message: will open a field picker, from which you can select the required field.

    • To select a field, just click on it. The system will copy the selected field into the target field.
    • To make selecting several fields easier, the field picker will allow you to select multiple fields. Once you have all the information you need, click on Done.
    • To select a field from a related record (for example the email address of the person who is the responsible supervisor), you will need to expand the relationship by clicking on the '+', select the necessary field, and then click Done.
  2. Type the Field Name manually, and check if it is correct
    • If you happen to know the exact field name(s), you can simply type it into any of the fields. All you need to do is to wrap the field name in square brackets, e.g. [Summary].
    • If the field is from a related record, you need to use the format [Relationship_Name:Field_Name]. Please note the colon in between the relationship, and the field name.
    • To ensure that the field names are typed correctly, click on Check Fields.
      • If name is correct: field will be highlighted in green.
      • If name is incorrect: field will be highlighted in red.
        Should a field be highlighted in red, either correct the spelling, or use the Field Picker to retrieve the Field Name.
  3. Copy and Paste from other documents
    • If you happen to know the exact field name(s) and used them in Specification Documents, you can use Copy and Paste
    • To ensure that the field names are typed correctly, click on Check Fields (see above).

exclamation_mark_red

WARNING WHEN COPYING TEXT FROM WORD DOCUMENTS

While copying text from a Word Document will also maintain some of the formatting, please be aware that Word also inserts invisible control characters which may distort the layout.

Therefore, you may need to perform some 'cleaning up' after pasting text from a Word Document.

exclamation_mark_red

CAUTION WHEN FORMATTING THE EMAIL BODY

The new email builder does offer rich text formatting, like bold or italics.

If you apply any formatting to a field, make sure that you include and highlight the square brackets ([, ]) of this field.

  • Correct:
    Please review Incident [Incident Details] and send your comment.
  • Incorrect:
    Please review Incident [Incident Details] and send your comment.

Sending Calendar Invitations to Outlook

Note

Supported Calendars:

this functionality was implemented using the iCalendar Format, which is supported by the most commonly used calendar tools in the market.

Amongst these products are:

  • Microsoft Office Outlook
  • Apple Calendar
  • Google Calendar
  • ...

If your organization is making use of a different calendar tool, please check with your vendor if it does support the iCalendar format.

Note

Limitations:

Updating a calendar via SAI360 is a "one-way street". This means users will not be able to change a record in SAI360 when they for example change:

  • times or dates in the Calendar
  • the content of the invitation

The SAI360 Web Application allows you to send an calendar invitation via an email which, once accepted by the recipient, will be entered into their calendar.

Sending Calendar Invitations

For the task of ...

I need to ...

Assessing if there is enough information available to create an invitation.

The DATES and TIMES which are necessary to create an invitation will be read from a field on the record - therefore you must have all the necessary information available as part of that record.

Exactly WHAT is required will depend on the circumstances. If you intend to

  • create an entry which lasts a calendar day (an 'All Day Event'), you will need

    - a single date field only

    It can be used for the START DATE and the END DATE, the TIME fields won't be required.

    NOTE: for these type of events, the Reminder cannot be altered from it's default setting of 15 minutes (this is a limitation of the calendar tools themselves).
  • create entries where the START DATE will be the same as the END DATE, but will last less than 24 hours, you will need

    - a single date field
    - two time fields (for start and end time)
  • create entries which can last several days, and they are All Day Events, you will need

    - two date fields only (for start and end date)
  • create entries which can last several days, and are NOT All Day Events, you will need

    - two date fields only (for start and end date)
    - two time fields (for start and end time)

    NOTE: for these type of events, the Reminder cannot be altered from it's default setting of 15 minutes (this is a limitation of the calendar tools themselves).

Adding an invitation to an email message

If you want to add an invitation to an email, tick the box for Calendar Event.

This will reveal the following parameters, where you can select the fields to define

  • Start Date Field
  • Start Time Field
  • End Date Field
  • End Time Field
  • Reminders: In addition, from a lookup you can select if, and how long prior to the set date, any reminder should be triggered (see Notes below).
  • Then add the fields you selected to the message body of your email.

NOTES:

  • If you define an invitation with just a START TIME, and no END TIME, SAI360 will default the duration of the invitation to one hour.
  • All Day events will be marked as "Free' in the Calendar, whereas events with a Start and End Time will be marked as "Busy".
  • The following variations are always invalid, and therefore will be ignored:
    - Invitations without a START DATE.
    - Invitations with an END TIME, but without a START TIME
  • For events without a Start TIME, reminder cannot be altered from the default setting of 15 minutes (this is a limitation of the calendar tools themselves).

Allowing a User to update a Record by replying to an Email

Note

Limitations:

This functionality has the following limitations:

  • only SINGLE LOOKUP fields can be updated via a reply.
  • each reply will only update a single field.

Prerequisites

Prerequisites

BEFORE you can successfully define a Reply Link, you will need to fully define the Email Responder Import process.

This feature can be used for a scenario like the following example:

  • A Task has been assigned to a User, and the SAI360 Web Application does send an email to the "Assigned To" Person.
  • The email contains a link, on which the user can click to reply. For example:
    "Once the task is completed, click here."
  • This will generate a reply email, which the user can send off.
  • SAI360 will import this email and set the status of this Task to "closed".
    I.e. the record is updated without the need for the user to log into the Web Application.

Sending Calendar Invitations

For the task of ...

I need to ...

Creating an Import Process to retrieve the Reply Email.

Before you can set up your Email template to include a response, you will need to have to create an Import of the type "Email Responder".

Adding a "Reply Link" to an Email

In the Email Designer, click on the Reply Link button. This will open a dialogue "Create Reply Link", where you:

  • select the Lookup Field which will need to be updated by a reply, for example "Completion Category"
  • select the Lookup Value to which the record needs to be set to, for example "Completed"
  • select the corresponding Import for this Email Reply.
  • Define the Link Text, which will be displayed in the email as the hyperlink, for example:
    "To set this task to COMPLETE, reply by clicking on this link."
  • Save the link. You can place this link anywhere in the message container.

Allowing a user to have several reply options.

If the intention is to give the user several options, for example allow the user to also set the task to "Cancelled" or "Re-opened", repeat the above steps for each of the options the user should have.

RECOMMENDATION:

Prevent users to inadvertently 'break' the reply.

The crucial information to update the record is contained in the email Subject. For example:

{"Value":"9999999_1674","RecordUniqueId":"AFBWkBchgs3VpQjRIozaOCeG","AttributeId":"9999999_1695"}

Therefore, by default the reply email will contain the following text in it's message body:

### JUST CLICK SEND, DO NOT MODIFY THIS EMAIL! ###

Sending this email will set the field '<Field Name>' to '<Value>'

 

When are Email Actions triggered?

In addition to the "normal" rules which decide if an Action is triggered, the SAI360 Web application uses an additional set of rules for Email Actions:

  • The System does evaluate if the Content of an Email has changed since the last time when the record was saved.
    • If YES: the email will be sent
    • If NOT: the email will NOT be sent
  • To evaluate IF an Email content has changed, the system will check the following fields. If any of these been modified, the system will mark the Email as changed:
    • TO, CC
    • Subject
    • Message

Email Actions

For the task of ...

I need to ...

Only sending an email when it's content (To, CC, Subject or Message) has changed.

This will prevent users from receiving the same email time and time again.

Just create an Email Action.

The prevention of sending out identical emails is standard behavior of SAI360.

Making sure that an Email IS being sent EVERY time when a record is saved.

To achieve this, it will be necessary to work the following workaround, which will ensure that the content of the email is changed EVERY time when the record is saved - even if the "real message" is unchanged.

  • Add the following text, including the brackets, at the end of the Email Message:
    [bms_VersionNo]
  • Highlight this text, again include the brackets, and set the font color to the same color as the background.
  • Since bms_VersionNo will change every time the record is saved, the system will deem the email content as being changed, and will send the email.

See Also

Form Actions

How to define Form Actions

Creating Action Group, and the individual Actions

Filtering and Finding Action Groups

System Notifications: sending 'pop-up' messages to users of Roam and the Web Application

Rest Callouts: interacting with external Systems via REST Calls

Set Value Actions: When the System needs to copy or manipulate Field Values in the Web Application

Analytics Rules