To accomplish this, it is easiest to work backwards when developing the notification rules. By creating the Notification Templates, the Conditions, and then the Notification Rules to tie the defined Conditions and Template together, one can then apply the defined Rules directly to the Activity Notification.
Step 1: Create the Notification Message Templates
We will create Template-1, which applies toward Group-1, and Template-2, which applies to Group-2
For each template:
- Go into Administration Tab, and navigate to Notifications -> Message Templates.
- Click "Create New"
- Fill in the Message template content (See Figure 1 and Figure 2). This is where you may elect to write a custom message to be sent per Notification Rule (ie: you want to send one specific message to Group-1 and a completely different message to Group-2). Save with symbol "Template-1"
- Repeat the same process, creating a second template, which will be saved with symbol "Template-2" (See Figure 2)
After you have created both Templates, you should have the two listings show up as Message Templates available for your usage. (See Figure 3)
Figure 1: Create New Message Template for notifying Group-1
Figure 2: Create New Message Template for notifying Group-2
Figure 3: Message Template List showing both Templates created.
Step 2: Define each Notification Rule Condition
For each rule, you will need to create each of the Site-Defined Condition Macros, which, when they assess as true, will result in the Notification Message Template being triggered
We will create "Group is Group-1" and "Group is Group-2" Site Defined Conditions.
For each Site Defined Conditional Macro
- Go into Administration Tab, and navigate to Events and Macros -> Macros
- Click "Create New"
- Fill in the Macro contents, saving the new macro as "Group is Group-1". (See Figure 4, Figure 5, and Figure 6)
- Repeat the same steps, creating a second macro and saving as "Group is Group-2 (Figure 7, Figure 8, and Figure 9)
Figure 4: Creating the new macro "Group is Group-1"
Figure 5: Creating the Atomic Condition which will check if the specified group attribute equals "Group-1"
Figure 6: The "Group is Group-1" macro is created, with the given condition specified in Figure 5 listed
Figure 7: Creating the new macro "Group is Group-2"
Figure 8: Creating the Atomic Condition which will check if the specified group attribute equals "Group-2"
Figure 9: The "Group is Group-2" macro is created, with the given condition specified in Figure 8 listed
Step 3: Build each Notification Rule.
It is important to understand that every Activity Notification has a Default Notification Rule. It is strongly advised that you do not tamper with any part of this rule and only use it to model any rule elements that you need, ie, use the content from its Notification Template in your own custom templates.
While one can technically recycle the Default Notification Template in any custom rule, it is advised that a copy of any such Default Notification Template be used, and named uniquely to match the Rule that it is associated.
We will assemble each Notification Rule and create rules "Rule 1 - Group 1" and "Rule 2 - Group 2" as follows. The Notification Rule ties the Notification Message Template and Notification Rule Condition together, hence why we created the Notification Message Template and Notification Rule Condition first.
For each Notification Rule:
- Go into Administration Tab, and navigate to Notifications -> Notification Rules.
- Click "Create New"
- Fill in the Symbol for the Rule, in this case "Rule 1 - Group 1" and click “Save and Continue” (see Figure 10)
- Enter the “Condition” field as the Macro that was previously created, in this case "Group is Group-1". Enter the “Message Template” field, the template that was previously created, in this case "Template-1". Enter in the contacts who is meant to receive this notification, in this case, the Assignee (see Figure 11).
- Repeat the same steps as before, to create a new Rule that pertains to Group 2, in this case "Rule 2 - Group 2" and populate the same fields as before with the corresponding "Condition" field, value "Group is Group-2", the corresponding "Message Template" field, value "Template-2", and the contacts meant to receive this notification, in this case, the Affected End User. (see Figure 12 and Figure 13)
Figure 10: Creating a new Notification Rule "Rule 1 - Group 1"
Figure 11: "Rule 1- Group 1" with Condition, Message Template, and Object Contact Notification List fields populated.
Figure 12: Creating a new Notification Rule "Rule 2 - Group 2"
Figure 13: "Rule 2- Group 2" with Condition, Message Template, and Object Contact Notification List fields populated.
Step 4: Add each Notification Rule to the Initial Activity Notification.
Now that we have built the following for each scenario:
- Notification Message Template
- Notification Rule Condition
- Notification Rule (tying the Notification Message Template and Notification Rule Condition)
We will now add the Notification Rules to the Activity Notification. To do this:
- Access the Initial Activity Notification (Administration Tab, Notifications -> Activity Notifications). By default, it will look like what is seen here in Figure 14.
- Click on Update Notification Rules. Under Symbol, search for "Rule%Group%" (See Figure 15)
- Add the generated rules in the listing. (See Figure 16)
- Save. The new rules will be populated to the Notification Rules List for Initial Notification (see Figure 17)
Figure 14: Default content in the Initial Activity Notification
Figure 15: Notification Rules Search
Figure 16: Adding the two rules created "Rule 1 - Group 1" and "Rule 2 - Group 2"
Figure 17: Updated Initial Activity Notification showing the two rules added in.