Creating pages for notifications and subscription management

For the Notifications functionality to work properly, you need to create pages where portal members will be able to see notifications (in addition to the notification pane on the toolbar) as well as manage their subscriptions.

Ensure that you created the following pages (recommended structure, but can be changed to suit your needs; page names are an example):

Notifications page

Create a Notifications page (with the Simple content page type) as a child page to the Account page to host all other notifications-related portal pages. Filling in page settings is not required.

My Notifications page

Create a My Notifications page (with the  Grid page type, as a child page to the Notifications simple content page) – This page will display all notifications received by a portal member when they select See all notifications in the notifications pane.

For this page, ensure the page settings include the following:

  • On the Data source tab, specify GeneratedNotifications as the source entity, and set a filter by member user name (Field = MemberUserName, Value = [data from field] UserName) so that only member-specific notifications are displayed on this page.
  • On the Grid tab, specify the fields that you want to be available on this page. This selection depends on what kind of information you want to be available for portal members on this page.

Filtered Notification Subscriptions page

Create a Filtered Notification Subscriptions page (with the  Composition page type, as a child page to the Notifications simple content page) – this page will host all page content blocks (or separate pages if necessary) where notification subscriptions will be managed. Filling in page settings is not necessary.

Notification subscription groups page

Create a Notification subscription groups page (with the  Layout block type, as a child page to the Filtered Notification Subscriptions composition page) – this content block is necessary to host all other grid pages with various subscription types, and to be able to show those child pages as, for example, tabs. Ensure that on the Layout settings tab, you select a view type (for example, Tab) to display child grid pages with various types of notification subscriptions. Filling in other page settings is not required.

Direct Notifications page

Create a Direct Notifications page (with the  Grid type, as a child to the Notification subscription groups layout block) – this page will display notifications subscriptions, created as a result of manual subscription (clicking the notification icon on a detail or grid page where it is enabled).

       For this page, ensure the page settings include the following:

  • On the Data source tab, ensure that you specify PortalNotifications as the data source, and set the following filters:
    • NotificationType = direct (to show subscriptions of the Direction Notifications type)
    • memberUserName = [data from field] User Name (to show only member-specific subscriptions)
    • IsGroupNotificationType != 1 (to not show subscriptions intended for group notifications)
  • On the Grid tab, specify which fields will be available on this page. Additionally, in the Detail page setting, specify the detail (card) page (after you have created it) where the portal member will be able to modify the subscription settings.
  • On the Permissions tab, specify member group permissions for this page and add commands. Ensure you add the Edit command that will open the related detail page for the portal member to be able to edit a notification subscription.

All Records Notifications page

Create an All Records Notifications page (with the  Grid type, as a child to the Notification subscription groups layout block) – this page will display template-based notifications subscriptions with the allrecords type (notifications are automatically sent when field values are changed for any records on a page, the source entity of which has a default notification subscription template setup; the subscription details, such as which fields to track and which email template to use are configured by each member for themselves in the front end).

For this page, ensure the page settings include the following:

  • On the Data source tab, ensure that you specify PortalNotifications as the data source, and set the following filters:
    • NotificationType = all records (to show subscriptions of the All Notifications type)
    • MemberUserName = [data from field] User Name (to show only member-specific subscriptions)
    • IsGroupNotificationType != 1 (to not show subscriptions intended for group notifications)
  • On the Grid tab, specify which fields will be available on this page. Additionally, in the Detail page setting, specify the detail (card) page (after you have created it) where the portal member will be able to modify the subscription settings.
  • On the Permissions tab, specify member group permissions for this page and add commands. Ensure you add the Edit command that will open the related detail page for the portal member to be able to edit a notification subscription.

Date Condition Notifications page

Create a Date Condition Notifications page (with the  Grid type, as a child to the Notification subscription groups layout block) – This page will display template-based notifications subscriptions with the periodic type (notifications are automatically sent when a date field value is changed the specified date; the rule is configured by each member in the front end).

For this page, ensure the page settings include the following:

  • On the Data source tab, ensure that you specify PortalNotifications as the data source, and set the following filters:
    • NotificationType = periodic (to show subscriptions of the Date Condition Notifications type)
    • MemberUserName = [data from field] User Name (to show only member-specific subscriptions)
    • IsGroupNotificationType != 1 (to not show subscriptions intended for group notifications)
  • On the Grid tab, specify which fields will be available on this page. Additionally, in the Detail page setting, specify the detail (card) page (after you have created it) where the portal member will be able to modify the subscription settings.
  • On the Permissions tab, specify member group permissions for this page and add commands. Ensure you add the Edit command that will open the related detail page for the portal member to be able to edit a notification subscription.

Conditional Notifications page

Create a Conditional Notifications page (with the  Grid type, as a child to the Notification subscription groups layout block) – this page will display template-based notifications subscriptions with the conditional type (notifications are automatically sent when a field value is changed according to the specified rule; the rule is configured by each member in the front end).

For this page, ensure the page settings include the following:

  • On the Data source tab, ensure that you specify PortalNotifications as the data source, and set the following filters:
    • NotificationType = conditional (to show subscriptions of the Date Condition Notifications type)
    • MemberUserName = [data from field] User Name (to show only member-specific subscriptions)
    • IsGroupNotificationType != 1 (to not show subscriptions intended for group notifications)
  • On the Grid tab, specify which fields will be available on this page. Additionally, in the Detail page setting, specify the detail (card) page (after you have created it) where the portal member will be able to modify the subscription settings.
  • On the Permissions tab, specify member group permissions for this page and add commands. Ensure you add the Edit command that will open the related detail page for the portal member to be able to edit a notification subscription.

Group Notifications page

Create a Group Notifications page (with the  Grid type, as a child to the Notification subscription groups layout block) – this page will display notifications subscriptions where the Notify Group field on the subscription setup card was filled in. Such notifications are sent to all members of the specified groups.

For this page, ensure the page settings include the following:

  • On the Data source tab, ensure that you specify PortalNotifications as the data source, and set the following filters:
    • MemberUserName = [data from field] User Name (to show only member-specific subscriptions)
    • IsGroupNotificationType = 1 (to show subscriptions intended for group notifications)
  • On the Grid tab, specify which fields will be available on this page. Additionally, in the Detail page setting, specify the detail (card) page (after you have created it) where the portal member will be able to modify the subscription settings.
  • On the Permissions tab, specify member group permissions for this page and add commands. Ensure you add the Edit command that will open the related detail page for the portal member to be able to edit a notification subscription.

Notification Subscription Setup page

Create a Notification Subscription Setup page (with the  Detail page type as a child page to the Notifications simple content page) – this page will host layout blocks with field sets, the combination of which will constitute a detail (card) page where portal members will be able to set up or edit their notification subscriptions, both direct and template-based.

  Important

Ensure you specify this detail page as a detail page for all grid pages that you created for managing notification subscriptions so that this page is opened when the portal members tries to edit a notification subscription.

For this page, ensure the page settings include the following:

  • On the Data source tab, ensure you select PortalNotifications as data source entity.

Fields block page

Create a Fields block page (with the  Layout block type; as a child page for Notification Subscription Setup detail page) – this layout block will host all field sets (group of fields) on the detail page where the portal member will set up or edit a notification subscription. Filling in page settings is not required; this page serves only as a container.

Notification conditions page

Create a Notification conditions page (with the  Extended field set block type; as a child page for Layout block page) – this content block will contain fields for setting up conditions that trigger a notification.

For this page, ensure the page settings include the following:

  • On the Fields tab, under Fields, ensure that you add a Conditions field with the following parameters:
    • Field name = Conditions (PortalNotifications)
    • Data type = Entity filter builder (Field editor = entity filter constructor)

Common fields page

Create a Common fields page (with the  Field set type; as a child page for Layout block page) – this content block will contain a set of fields for configuring subscription settings.

For this page, ensure the page settings include the following:

  • On the General tab, set the descktop width in Width settings to 6, because the layout block will host another field set.
  • On the Fields tab, add fields from the PortalNotifications entity that will be used to configure notifications subscriptions. It is recommended that you add at least the following fields (a suggested caption and the field name in the brackets):
    • Notification Subscription Type (NotificationsType) – Specifies the type of notification subscription.
    • Page (RelatedEntityAlias) – Specifies the page the subscription is set up for.
    • Enable Email Notification (SendMailToMe) – This switch will be used to toggle email notifications for the subscription on or off.
    • Enable Portal Notification (notifyMe) – This switch will be used to toggle portal notifications (in the notifications pane) for the subscription on or off.
    • Member Name (MemberUserName) – Specifies the name of the portal member (with value retrieved from the UserName field).
    • Notify Groups (NotifyGroupNames) – Specifies the names of portal member groups the notifications will be sent to.
    • Group Notification Subscription (IsGroupNotificationType) – Specifies whether this subscription is intended for member groups or individual member.

Action type page

Create an Action type page (with the  Extended field set type; as a child page for the Layout block page) – this content block will contain the Action type fields for setting up what type of action with a record will be monitored by the subscription.

For this page, ensure the page settings include the following:

  • On the General tab, set the desktop width in the Width settings to 6.
  • On the Fields tab, under Fields, ensure that you add an Action type field with the following parameters:
    • Field name = ActivityType (PortalNotifications)
    • Data type = picker with three static values: Insert (title = Insert record), Modify (title = Modify record), and Delete (title = Delete record)
    • Template = Light

Portal Notification Template page

Create a Portal Notification Template page (with the  Extended field set type; as a child page for the Layout block page) – this content block will contain fields for setting up the portal template for a subscription.

For this page, ensure the page settings include the following:

  • On the General tab, set the desktop width in the Width settings to 6.
  • On the Fields tab, under Caption settings, set the desktop width in the Width settings to 3.
  • On the Fields tab, add the following fields from the PortalNotifications entity:
    • Portal Notification Template (NotificationMaleTemplateId) with Data type = Template (Enabled preview = Enabled, Allow edit = Enabled, Template type = Portal notification, Preview title/subject field = Title, Preview body field = Description) – Specifies the portal template that will be used for portal notifications in this subcription.
    • Portal Notification Title (Title) with Data type = Text editor (Field editor = text box) – Specifies the title of the portal notification. Enable usage in new records and choose this field to be editable.
    • Portal Notification Body (Description) with Data type = Text editor (Field editor = text box) – Specifies the body of the portal notification. Enable usage in new records and choose this field to be editable.

Email Notification Template page

Create a Email Notification Template page (with the  Extended field set type; as a child page for the Layout block page) – this content block will contain fields for setting up the email template for a subscription.

For this page, ensure the page settings include the following:

  • On the General tab, set the desktop width in the Width settings to 6.
  • On the Fields tab, under Caption settings, set the desktop width in the Width settings to 3.
  • On the Fields tab, add the following fields from the PortalNotifications entity:
    • Email Notification Template (NotificationMaleTemplateId) with Data type = Template (Enabled preview = Enabled, Allow edit = Enabled, Template type = Email notification, Preview title/subject field = MailSubject, Preview body field = MailBody) – Specifies the email template that will be used for email notifications in this subcription.
    • Email Notification Subject (MailSubject) with Data type = Text editor (Field editor = text box) – Specifies the subject of the notification email. Enable usage in new records and choose this field to be editable.
    • Email Notification Body (MailBody) with Data type = Text editor (Field editor = text box) – Specifies the body of the notification email. Enable usage in new records and choose this field to be editable.

Service hidden fields page

Create a Service hidden fields page (with the  Field set type; as a child page for Layout block page) – this content block will contain a set of hidden servce fields required for configuring subscription settings.

For this page, ensure the page settings include the following:

  • On the Fields tab, add fields from the PortalNotifications entity that will be used to configure notifications subscriptions. Set the Data type setting set to Hidden for all these fields. These fields are used internally for subscriptions to work properly. Add the following fields (since they are hidden, configuring localized captions is not necessary):
    • RelatedEntityUniqueId
    • RelatedEntityAllKeys
    • RelatedListId
    • RelatedPageId
    • RelatedPageUrl
    • ColumnMetaData

Group notifications

For members to be able to unsubscribe from group notification (when a notification for a role was set up and every member with the role starts receiving notifications about record changes), the following configuration must be performed:

  • The MembersCustomData field must be added to the PortalNotification entity.
  • On the Group notifications grid page (where members can manage their group notifications), the following filters must be added as shown below.
  • For the PortalNotifications entity, a lookup field must be added as shown below.
  • In the Site localization settings, in the site notification subscription entities, in the body of a portal notification template as well as the notification email template, add text with an unsubscribe link (##unsubscribelink##) that will allow the members to open the page where they can unsubscribe from a group notification.
    • For example, for portal notification template: <p>If you want to unsubscribe from such notifications, please follow this <a href="##unsubscribelink##">link</a> to manage your notifications</p>
    • For example, for email notification template: <p>If you want to unsubscribe from such emails, please follow this <a href="##unsubscribelink##">link</a> to manage your notifications</p>