Set up push notifications for mobile application users

PDF
Products
All Creatio products

Creatio mobile app uses push notifications to display custom notifications on mobile devices. These “push notifications” are generated by a pre-configured “Send push notifications” BPMN process. Use it as a sub-process to integrate push notifications in your custom processes and cases.

Example. Create a business process that will send a push notification to mobile app users once they are added to activities as participants. The notification message displays the name of the activity and text “You have been added as participant”. By tapping the notification, the user opens the corresponding activity record.

Business process diagram (Fig. 1) elements:

  1. Signal start event: “Activity participant added” – the process is triggered when a contact is added to activity participants.

  2. Read data system action: “Read activity participant data” – the process obtains activity participant data needed to perform the next steps.

  3. Read data system action: “Read system administration object data” – based on the activity participant data, the process obtains information on the user whose contact was added to activity participants.

  4. Read data system action: “Read activity data” – based on the activity participant data, the process obtains information on the activity record. Outgoing conditional flow to the terminate element that will end the process if the activity participant is the same as the activity author (to avoid sending push notification to the activity author). Outgoing default flow to the “Send push notification” sub-process.

  5. Sub-process: “Send push notification” – the process sends push notification to the specified user with the specified text.

    Fig. 1 The “Send push notification to activity participant” process
    scr_process_creation_push_diagram.png

To configure the process:

  1. Place the Signal element of the Initial events group on the schema — "Activity participant added". The element will be activated when a contact is added on the Participants detail of the activity.
  2. Set up the signal parameters:
    1. In the Which type of signal is received? field, select “Object signal”.

    2. In the Object field, select “Activity participant”.

    3. In the Which event should trigger the signal field, select “Record added”.

      The “Activity participant added” element properties (Fig. 2):

      Fig. 2 The “Activity participant added” element
      scr_process_creation_push_signal.png
  3. Set up the “Read activity participant data” element properties (Fig. 3):
    Fig. 3 The “Read activity participant data” element properties
    scr_process_creation_push_read_data.png
    1. In the Which data read mode to use? field, select “Read the first record in the selection”.

    2. In the Which object to read data from? field, select “Activity participant”.

    3. Set up the following filter in the How to filter records? area: “Id = Activity participant added.Unique identifier of record”.

      Note. To set the “Id = Activity participant added.Record Id” filter: click Add condition, select the Id column; click <?> and select Compare with parameter command; select the “Activity participant added” signal in the list to the left, and select the “Id” column in the list to the right.

    4. In the What record data should the process read? field, select “Read data from selected columns only”.

    5. Add the “Activity” and “Participant” columns (only these two columns from the activity participant record will be used further in the process).

      Note. We recommend to restrict the list of columns, whose values are read by the Read data elements, to those used in the process. This will increase the overall Creatio performance and lower the hardware load in applications with many processes in progress.

  4. Set up the “Read system administration object data” element properties (Fig. 4):
    Fig. 4 The “Read system administration object data” element properties
    scr_process_creation_push_read_data2.png
    1. In the Which data read mode to use? field, select “Read the first record in the selection”.

    2. In the Which object to read data from? field, select “System administration object”.

    3. Set up the following filter in the How to filter records? area: “Contact = Read activity participant data.First item of resulting collection.Participant”.

      Note. To set the “Id = Read activity participant data.First item of resulting collection.Participant” filter: click Add condition, select the Contact column; click <?> and select Compare with parameter command; select the “Read activity participant data” element in the list to the left, and select the “Participant” column in the list to the right.

    4. In the What record data should the process read? field, select “Read data from selected columns only”.

    5. Add the “Id” column (the “Send push notification” process will require the identifier of the user to send push notification to).

  5. Set up the“Read activity data” element properties (Fig. 5):

    Fig. 5 The “Read activity data” element properties
    scr_process_creation_push_read_data3.png
    1. In the Which data read mode to use? field, select “Read the first record in the selection”.

    2. In the Which object to rad data from? field, select “Activity”.

    3. Set up the following filter in the How to filter records? area: “Id = Read activity participant data.First item of resulting collection.Activity”.

      Note. To set the “Id = Read activity participant data.First item of resulting collection.Activity” filter: click Add condition, select the Contact column; click <?> and select Compare with parameter command; select the “Read activity participant data” element in the list to the left, and select the “Activity” column in the list to the right.

    4. In the What record data should the process read? field, select “Read data from selected columns only”.

    5. Add the “Subject” and “Reporter” columns (the “Send push notification” process will use the “Subject” column as the title of the push notification and the “Reporter” column will be used in the conditional flow).

  6. Set up the properties of the outgoing conditional flow (Fig. 6)
    Fig. 6 Conditional flow
    scr_process_creation_push_flow.png
    1. In the Condition to move down the flow parameter, click btn_process_element_settings_lookup00015.png and select Process elements. In the Formula window, click the “Read activity participant data” in the list to the left and select Participant column in the list to the right.

    2. Type “==” after the selected formula in the formula area.

  7. Click the “Read activity data” in the list to the left and select Reporter column in the list to the right.

    As a result, the formula area will contain the following formula: “#Read activity participant data.First item of resulting collection.Participant#==#Read activity data.First item of resulting collection.Reporter#” (Fig. 7).

    Fig. 7 Conditional flow formula
    scr_process_creation_push_formula.png
  8. Set up the “Send push notification” sub-process to send notification to the user that was selected by the “Read system administration object data” element.
    1. In the Related entity parameter, click btn_process_element_settings_lookup00018.png and select Lookup value. In the lookup window, select the “Activity” object.
    2. In the Related record ID parameter, click btn_process_element_settings_lookup00019.png and select Process parameter. In the Select parameter window, click the “Read activity participant data” in the list to the left and select Activity column to the right.

      Note. The Related entity (EntityUID) and Related record ID (RecordId) parameters of the “Send push notification” sub-process determine which record page will open when the user taps the push notification on their mobile device. For example, to open the activity page, we selected the “Activity” object as the value of the Related entity parameter, and mapped the Related record ID to the unique identifier of the activity record to open.
      The Related entity (EntityUID) and Related record ID (RecordId) parameters are optional. If they are left empty, tapping a push notification will simply open Creatio mobile app.

      As a result, when the business process is run, a push notification will be sent to the user, whose contact was added as the activity participant (Fig. 8).

      Fig. 8 – A push notification in a mobile device
      scr_chapter_process_creation_designer_push_notification_bpmonline.png