Let the platform do the work

Using Legacy Workflows to Notify a Customer of a New Note on Their Case

Overview

The following article walks through the process of creating a workflow that will email the contacts related to a case when a SugarCRM user adds a note. You will need to have notifications turned on and an SMTP server configured under Admin > Email Settings.

Each user's license type (e.g., Sugar Serve, Sugar Sell Premier) determines what functionality is available as described in the License Types matrix.

Note: This will not work for notes created through the Portal. To send out emails for notes created through the Portal please refer to the Notifying a Customer When Receiving a Note Via the Portal article.

Steps to Complete

Creating the Alert Template

  1. Navigate to Admin > Workflow Management.
  2. Select "Create Alert Template" from the Workflow Definitions tab.
  3. Set the following:
    • Name: note to customer
    • Module: Notes
    • Subject:
      [CASE:{::future::Notes::Cases::case_number::}] {::future::Notes::Cases::name::}
    • Body:
      A note has been added to case number {::future::Notes::Cases::case_number::}.
      
      Subject:
      {::future::Notes::name::}
      
      Description:
      {::future::Notes::description::}
      
      Thank you

There are a few limitations to be aware of:

  1. You cannot reference contacts related to a case from within the note template.
  2. Contact drop down option in the Alert Template EditView relates to the Contact field in the Note. This field must be manually populated during note creation if one wants to use {::Notes::contact::field_name::} in the alert template.

Creating the Workflow Definition

  1. From the Shortcuts menu pick "Create Workflow Definition".
  2. Set the following:
    • Name: note to customer
    • Execution Occurs: When record saved
    • Target Module: Notes
    • Processing Order: Alerts then Actions
    • Status: Active
    • Applies to: New Records Only

Creating the Condition

  1. Click "Create" from the Conditions subpanel.
  2. Set the following:
    • Condition: When a field in the target module contains a specified value
    • Field: Available Externally
    • Comparison: Equals
    • Value: Yes

Note: This condition assumes you will be using the Available Externally field (called "Display in Portal?" in Sugar versions 12.0 and lower) in the Notes module to control private/public notes. Users will have to check this field during note creation for emails to go out.

Creating the Alert

  1. Click "Create" from the Alert subpanel.
  2. Set the following:
    • Name: note to customer
    • Source Type: Custom Template
    • Custom Template: note to customer

Creating the Alert Recipient List

  1. Click "Create" from the Alert Recipient List subpanel.
  2. Set the following:
    • Recipient Source: Recipient associated with a related module
    • Related Module: Case
    • Related Module: Contact
    • Recipient Options: Select custom email and name fields
    • Custom Email Field: Email
    • Name Field: Name
    • Address Type: To: