Let the platform do the work

Using SugarBPM to Notify a Team or User on Record Creation

Overview

It is common practice to notify specific teams or users when an important record is created in Sugar®. This article covers how to use SugarBPM to design a process definition that automatically sends email notifications to select teams or users upon record creation.

Use Case

When a top client submits a high-priority case, you may want to automatically send out an internal email notification to ensure that it is handled in a timely manner. This article uses a custom Priority field in the Accounts module to identify top clients by giving them a priority of "High". For more information on creating fields, refer to the Studio documentation. We then use SugarBPM to notify the Escalations team, the manager of the user assigned to the case, and the user assigned to the account when a high-priority account submits a new high-priority case.

Prerequisites

  • You must create a process email template for the Cases module. This is the email that the recipients listed in the use case will receive.
  • To notify a team, ensure that the team (e.g. Escalations) has been configured in Sugar. Refer to the Team Management documentation for information on creating teams.
  • To notify the manager of the user assigned to the case, any user that may be assigned cases must have their manager selected in the Reports To field on their user record.
  • Sugar must be configured to send outbound emails via Admin > Email Settings. For more information on configuring the system email settings, refer to the Email documentation.
  • Schedulers, specifically the SugarBPM™ Scheduled Job, must be running.
  • To use the SugarBPM modules, you must be an administrator or have developer-level role access. It is also recommended that you have a basic understanding of Sugar's SugarBPM.

Steps to Complete

  1. Create a new process definition record named "High-Priority Case Notification" where the Target Module is set to "Cases". Click "Save & Design" to continue to the Visual Designer canvas.
  2. Drag a Start event onto the design canvas. Rename this event "High-Priority Case Created".
    Add Start Event
  3. Right-click on the Start event and select "Settings" to configure the Start event criteria. Set the event to apply to new records only. Then, click inside the Criteria box to add two conditions, separated by an "AND":
    • A Module Field Evaluation where the case's Priority field must be "High"
    • A Module Field Evaluation where the case's account's custom Priority field must be "High"
    Start Event Settings
  4. Save the Start event's Settings window and then drag a Send Message event onto the canvas. Rename it "Notify" then connect the Start event to this Send Message event.
    Add Send Message Event
  5. Right-click on the Send Message event and select "Settings" to configure the email template and recipients. Set "Email Template" to the process email template that you created as part of this article's prerequisites.
    • Note: If the process email template is not listed in the dropdown menu, its Target Module may not be the Cases module. If this happens, you must update the template or create a new one where the Target Module is the Cases module.
  6. Next, click inside the To box to add three recipients:
    • The Escalations team that you created as part of this article's prerequisites
      Add Team
    • The manager of the user assigned to the case
      Add Manager
    • The user assigned to the account related to the case
      Add User
    Save your changes to the Send Message event.
  7. Drag an End event onto the canvas and connect the Send Message event to it. Click the Save icon in the design toolbar to ensure that all changes have been saved. The completed process definition should look like this:
    Process Definition
    Note: The Visual Designer autosaves every 15 seconds. If the Save icon is grayed out, this indicates that your most recent changes have already been saved automatically.
  8. To prevent inadvertently triggering a new process while designing a process definition, process definitions are disabled by default. Enable the process definition to make it usable in Sugar.

Application

To test this process definition, create a new high-priority case for a high-priority account. When the case is created in Sugar, the process definition starts a new process that emails the Escalations team, the manager of the user assigned to the case, and the user assigned to the account.

Notification Email