Support Article
Email option not disabled from Notification Preferences
Summary
Email notifications are sent to users through the Notifications channels despite disabling the Email option in the user Notification Preferences.
Error Messages
Not Applicable
Steps to Reproduce
- Configure a custom case Notification rule.
- Disable the Email for the notification.
- Trigger the notification.
Root Cause
An issue in the custom application code or rules.
The notification recipients are configured to use the Email ID instead of the Operator ID. This is intended for external users who receive notifications through emails only. The email address is not linked to an Operator ID in the system in order to check preferences.
From the Recipient type list, select the Operator ID if the intended recipients are users with valid operator IDs, or users who are a part of the application.
For external users, select the Email ID. External users are not a part of the application and can receive email notifications only.
Additionally, in this case, the Context class of the call to pxNotify is not set. This results in the Notification executing in the Framework context where the user Notification Preferences are set at the Implementation level. Hence, the user Preference for the notification is not taken into account.
For more information, refer to 'Adding recipients for a notification' in the Pega Help article (Section 4.b): community.pega.com/sites/default/files/help_v82/procomhelpmain.htm#rule-/rule-notification/notification-rule-adding-recipients-for-a-notification-tsk.htm

Resolution
Perform the following local-change:
Configure the Recipients of the notification to be of 'Operator ID' Recipient Type, and/or set the RecipientsList parameter to an OperatorID or a list of OperatorIDs when invoking the pxNotify API instead of the Send Notification smart shape.
Notification Rule example:
Set Recipient type: Operator ID
Set Recipient property: .pyUseridentifier
pxNotify API from activity example:
Set the RecipientsList to User
When using the pxNotify API instead of the Send Notification smart shape, ensure to set the ContextClass parameter appropriately to the Context in which the notification is triggered.
ContextClass: Param.ContextClass
Published December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.