(2024.2) Notifications
'Notifications' are tools that can be used to alert a User to specific 'Events' that occur in PCR-360.
Navigate to "Admin > Escalations / Notifications > Notifications."
Notifications must be built before they can be used in 'Escalations'. When building an Escalation, define certain criteria for the Escalation to follow including sending a Notification (message) to relevant parties. This section covers how to define a specific Notification to send.
Build a Notification
There are a number of standard Notifications that come pre-built in PCR-360. Sometimes, however, these can be insufficient for an Organization's needs.
To add a new Notification that can be sent by an Escalation follow these steps:
Click the button located on the Grid toolbar.
This will open the 'Add New Notification' form.
On this form the User can specify the who, what, where of a given Notification.
The 'Event' field is required. The selected 'Event' in this field corresponds directly to the Start Event of an Escalation.
Set a 'Title', which is required, for the Notification for internal reference.
Set the email related fields of the Notification. These will be inserted into their equivalent email fields:
'Subject', which is required, will serve as the email subject.
'To', which is required, will serve as the To field of the email.
'Cc' will serve as the Cc field of the email.
'Bcc' will serve as the Bcc field of the email.
'Body', which is required, is the main body of the email.
Note: All of these fields can hold either static values like a particular email address, or a Hash Variable to dynamically select the information from elsewhere in PCR-360. For more information see the next section, Setting "Hash Variables".
Once all the fields have data, click the button to save the Notification.
Use of HTML Tags
Some fields within PCR-360 allow Users to input HTML tags to make displaying that information a richer experience for those that are expected to consume it. For more information on HTML tag usage, please see the wiki entry for it.
Setting "Hash Variables"
Notifications are essentially email/system message templates. Admins can fill in the generic text that is used each time the Notification is sent out, but can also set placeholders for actual data to be set into the message before it is sent. These placeholders are dynamically loaded based on the Event selected when the Notification's 'Event' field is selected. These placeholders are known as "Hash Variables" and can be selected in the 'Available Data' field, and inserted into any of the fields for the Notification with the button.
In the Notification's fields, use various text strings surrounded by "##" to hold the place for a piece of data replaces it when the message is generated & sent out. These are called these "Hash Variables". The list of Hash Variables Users can use changes based on the Event selected for the Notification, (located in the drop-down list below the Body area). Please don't use any ##...## text patterns not found on the list. For example, if a User adds "##THIS_IS_NOT_VALID##" to the message body, it is replaced with nothing when the Notification is populated with data because this is not a valid Has Variable.
For any field that a User wants to use a Hash Variable simply follow these steps:
- Select the Hash Variable from the 'Available Data' list that should be inserted.
- Click the button.
Note: This will always insert into the 'Body' field at the current cursor position in that field. - The variable will automatically insert into the 'Body' field on the Notification form.
- Select the entire text of the Hash Variable and press "CTRL+X" (Command+X on Mac) to cut the variable.
- Select the field to insert the variable into and press "Ctrl+V" (Command+V on Mac) to paste the variable.
- Fields can be any mix of regular text and Hash Variables.
- If formatting is desired, select the content around it and using the editor's toolbar.
Note: The Notification's Event must be selected before this works.
Lastly, in order to make the Notification available for Escalations, check the "For Escalation" check box. Notifications can be used for several purposes but must be specifically made available to Escalations when intended for that purpose. If a Notification is assigned to an Escalation Sequence and the User unchecks the 'For Escalation' check box, the User will receive a prompt warning the Notification will be removed from any Escalation Sequences to which it was assigned. If this prompt is ignored, the Sequences may fail as they no longer have access to the Notification. Make sure to reassign Escalation Sequences to different Notifications or remove the Sequence before performing this action.
Saving the New Notification
Once all required are filled and other fields are completed as desired, click the button. The new Notification appears as an item on the Grid and can be selected when you build an Escalation with a corresponding Start Event.
Editing Existing Notifications
You can edit existing Notifications by double-clicking on any item on the Notifications Grid or by selecting an item and clicking the button located immediately above the grid.
You can make desired changes to the Notification. The Event assigned to the Notification cannot be changed, as it must match the Start Event for any Escalations that use it. If you wish to use the same template content for a different Event, use the form's Options menu, and click Copy to New Form:
This sets up the same content for a new Notification where you can now change the Event. Once all required fields have been satisfied, click the button at the bottom of the form.
Note: Any existing Hash Variables from the original Notification may need to be replaced if the Event is altered on the 'Add New Notification' form.
You can delete existing Notifications by selecting the appropriate item on the Notifications grid and clicking the button located immediately above the grid. Once a Notification is deleted from the Grid, it can no longer be selected as a Notification when adding an action to an Escalation Sequence.
Notifications Log
To see a comprehensive history of all the Notifications that have been sent throughout the organization, open the Notification Log grid. Navigate to Admin > Escalation / Notifications > Logs > Notifications Log. Users cannot add, edit, or delete items on this grid, but can double-click any item in the grid to see the content of the actual message that was sent:
Can single Notifications with data from multiple records be created?
The short answer is that this is not possible without also using Custom Events and Escalations. The Notification functionality is intended to provide information about changes to a single record at a time. In order to accomplish the effect of a single Notification sending out data from multiple records, the User would first have to set up a Custom Event that is capable of querying for the desired records. Using the application's Notifications isn't an option because we don't have the ability to loop over an unknown number of child records when Hash Variables are replaced with real values. This would Require a much more complex system for constructing Notifications, and Escalation Criteria than is currently implemented. Once a Custom Event exists, the Escalation process can be used to create Criteria that will help determine when the Notification would be sent out. Even using these systems, the content of the Notification has to be built within the Event code. You can't use Notifications as provided by the application. Contact PCR for assistance with creating these processes using report writing hours.