Business Events: Push Notifications

If a subscriber to a business event is a push notification, when the business event occurs, the system sends a push notification or multiple push notifications to the mobile devices of particular recipients, based on the settings of the notification template that you have specified for the business event.

In this topic you will read about configuring and processing of push notifications created as subscribers of business events.

Configuring Push Notification as Subscriber

The easiest way to create a push notification for a business event is to do so while you are creating the event on the Business Events (SM302050) form: On the table toolbar of the Subscribers tab, you click Create Subscriber > Mobile Push Notification. This causes the system to open the Mobile Notifications form with the Push option selected in the Delivery Method box and the correct value selected in the Screen box.

Also, you can open the Mobile Notifications (SM204004) form and configure a notification template to be used as a subscriber of the Mobile Push Notification type. On this form, you must specify the push delivery method, the description, the recipients of the notifications, and the template for the message. Also, in the Screen box, you specify the generic inquiry of the business event.

If a data entry form is selected as a source for the business event, you can create a notification template directly from the entry from. For details, see Business Events: Use of a Data Entry Form as a Source.

After you have saved the notification template, you can link it to the business event on the Send by Events tab of the template. You add a row to the table and select the needed business event in the Event ID column. You can also create a needed business event by clicking Create Business Event on the table toolbar of the tab. Alternatively, you can return to the Business Events form and add the notification template on the Subscribers tab for the event.

Using Placeholders in a Template

In the notification template you define on the Mobile Notifications form, you can use placeholders for the values of the form elements. As the placeholders, you can use the data fields available in the results of the generic inquiry of the business event as follows:

  • To specify the recipients of the notification (in the To box), you can use the data fields (as the placeholders, separated with semicolons) that hold user identifiers and whose values are retrieved when the business event occurs. For example, if you need to monitor cases and send notifications to assignees, you can use a placeholder for the identifier of the assignee, such as ((CRCase_ownerID!PKID)).
  • You use the needed fields to specify which entity should be opened by the mobile app after a user taps the notification (in the Destination Entity ID box). Make sure that the NoteID data field is present in the results of the generic inquiry for the entity. For example, suppose that you selected Sales Orders in Destination Screen ID and want to open a particular order for the user; then you need to select the NoteID data field for the SOOrder object in Destination Entity ID.
  • To specify the subject (Title) of the notification template, you can use any data fields whose values are retrieved when the business event occurs. For example, the subject could be Opportunity ((CROpportunity_opportunityID)) has been assigned to you.
  • In the body of the notification template (on the Message tab), you can click Insert Data Field on the formatting toolbar to insert as a placeholder any data field whose value is retrieved when the business event occurs. Also, you can click Insert Previous Data Field to insert as a placeholder any data field whose value was retrieved before the business event occurred. You can use this ability to demonstrate how the value of the data field has changed, for example, a case status has changed from New to Open.

Processing a Push Notification as Subscriber

When the business event occurs and the system processes the subscriber of the Mobile Push Notification type, the system extracts the values of the fields specified for placeholders of the template (from the results of the generic inquiry that satisfy the conditions) and inserts these values into the notification. The system then sends the push notification or notifications to appropriate mobile devices of the recipients.

If the notification has been sent successfully, the system considers the subscriber to be successfully processed and adds a record on the Business Event History (SM502030) form. If any error has occurred during the processing of the notification template, the system displays the error on the Business Event History form for the business event.