Skip to content

How To: Create Notification Templates#

Automation Scheduled Action Definitions reference MES notification templates by name. When a task transitions to a notable state (before an action runs, when a task fails, succeeds or is ignored), the MES looks up the template configured on the Definition and sends a notification. The template must exist before the Definition can use it.

This guide shows how to create the four standard ASA notification templates. The example values below come from the sample master data package (02-notify.json) and can be used as-is or adapted to your naming conventions.

Template name Sent when
ASA PreAction Template Immediately before the action executes
ASA Success Template Task completes with a Processed outcome
ASA Failure Template Task reaches a Failed outcome
ASA Ignored Template Task ends as Ignored (no-op)

Table 1: Standard Automation Scheduled Action Notification Templates

Option 1 - Load the Master Data Package#

The sample package 02-notify.json creates all four templates in a single step.

  1. Download 02-notify.json.
  2. Navigate to Administration → Master Data Packages.
  3. Create a new master data package and load the downloaded file.
  4. Execute the load operation.

For full instructions, see Master Data Packages User Guide.

Option 2 - Create Templates Manually#

Create each template one at a time from the MES Notifications Management page.

For full wizard instructions, see Create Notification User Guide.

Steps (Repeat for Each Template)#

  1. Navigate to Business Data → Notifications.
  2. Select Create New Template.
  3. In the wizard, fill in the fields as shown in the template table below.
  4. Select Save.

Template Values#

Support for placeholders

The notification template Title and Details fields support tokens that are replaced with task-specific values at send time. Refer to Notifications for the full reference.

Field Value
Name ASA Failure Template
Title Automation Scheduled Action Task {{ TaskName }} (ID {{ TaskId }}) failed
Details Automation Scheduled Action Task={{ TaskName }} ({{ TaskId }}); Definition={{ DefinitionName }} ({{ DefinitionId }}); Entity={{ EntityName }} (Id={{ EntityId }}, TypeId={{ EntityTypeId }}); Automation={{ AutomationInstanceName }} ({{ AutomationInstanceId }}); LastOutcome={{ LastOutcome }}; LastError={{ LastError }}

Table 2: Failure Notification Template Values

Field Value
Name ASA Ignored Template
Title Automation Scheduled Action Task {{ TaskName }} (ID {{ TaskId }}) was ignored
Details Automation Scheduled Action Task={{ TaskName }} ({{ TaskId }}); Definition={{ DefinitionName }} ({{ DefinitionId }}); Entity={{ EntityName }} (Id={{ EntityId }}, TypeId={{ EntityTypeId }}); Automation={{ AutomationInstanceName }} ({{ AutomationInstanceId }})

Table 3: Ignored Notification Template Values

Field Value
Name ASA PreAction Template
Title Automation Scheduled Action Task {{ TaskName }} (ID {{ TaskId }}) is about to execute
Details Automation Scheduled Action Task={{ TaskName }} ({{ TaskId }}); Definition={{ DefinitionName }} ({{ DefinitionId }}); Entity={{ EntityName }} (Id={{ EntityId }}, TypeId={{ EntityTypeId }}); Automation={{ AutomationInstanceName }} ({{ AutomationInstanceId }})

Table 4: Pre-Action Notification Template Values

Field Value
Name ASA Success Template
Title Automation Scheduled Action Task {{ TaskName }} (ID {{ TaskId }}) finished with {{ LastOutcome }}
Details Automation Scheduled Action Task={{ TaskName }} ({{ TaskId }}); Definition={{ DefinitionName }} ({{ DefinitionId }}); Entity={{ EntityName }} (Id={{ EntityId }}, TypeId={{ EntityTypeId }}); Automation={{ AutomationInstanceName }} ({{ AutomationInstanceId }})

Table 5: Success Notification Template Values