Let the platform do the work

Automatically Closing Cases on Customer Request

Overview

In Sugar Serve 11.0 and higher, you can configure the Sugar Portal to allow customers to indicate that they would like a case closed using the Request To Close button. Once marked for closure by the customer, an agent can manually close the case, but this process can easily be automated, too. This article covers how to use SugarBPM to automate the closure of these cases.

Note: This article pertains to Sugar Serve 11.0 and higher.

Prerequisites

  • You must have a Sugar Serve license type to create a process definition based on the Cases module that uses the Request to Close feature, which is only available to Sugar Serve users. See the License Types Matrix page in the Administration Guide for more details on license types.
  • You must create a process email template for the Cases module or use the one included in the .bpm file provided in the Downloads section. This is the email that will be sent to the case owner when automatically closing the case.
  • 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.
  • You must enable "Allow portal users to close case" in Admin > Sugar Portal > Configure Portal to use the process definition designed in this article. See the Sugar Portal page in the Administration Guide for more details on this field.
  • 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 SugarBPM.

Steps to Complete

Use the following steps to create a SugarBPM process definition that automatically closes a case when the customer clicks the Request To Close button.

  1. Create a new process definition record named "Case Closure on Customer Request" 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 "Case Requested to be Closed".
    KB StartEvent
  3. Right-click on the Start event and select "Settings" to configure its criteria. Set the event to apply to updated records only, including all updates. Then, click inside the Criteria box to add a Module Field Evaluation where the case's Request Close field changes to true (i.e. the checkbox is enabled).
    KB StartCriteria
  4. Save the Start event's Settings window and then drag an action onto the canvas. Rename it "Close Case", right-click it and set the action type to "Change Field", then connect the Start event to this Change Field action.
    KB Action
  5. Right-click the Change Field action and select "Settings" to configure it to update the case's status. Enable the checkbox next to the Status field and set its value to "Closed". Then, save the action's Settings window.
    KB CaseClosed
  6. Drag an End event onto the canvas, right-click it to set the result to "Send Message", and connect the Change Field action to it. Name it "Notify Case Owner" then right-click the End event and select "Settings" to configure the email template, sender, and recipients.
  7. 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.
  8. Then, choose a value for the From field, such as the system email. Next, click inside the To box to add the case owner as a recipient by adding the user who is assigned to the record. Click "Save" to save and close the Settings window.
    KB SendMessage
  9. Click the "Save and Validate" icon in the design toolbar to ensure that all changes have been saved and are valid. The completed process definition should look like this:
    KB PD2
  10. 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, log in to the portal as a portal user and click the Request To Close button on an open case. This will set the Request Close field, triggering a new process to close the case and send an email to the user that the case is assigned to. The Request Close and Request Close Date fields become visible in record view when they have a value so you can see that the customer requested to close this case.
KB Application

Downloads

The SugarBPM file created in this article is provided here for your convenience. While this file is importable, keep in mind the following:

  • You must thoroughly review the settings of all imported SugarBPM files to confirm that they are configured as expected.
  • Process definition files may import in a "Disabled" state. Please enable the process definition after confirming its elements' settings.

SugarBPM File: Case_Closure_on_Customer_Request.bpm