Let the platform do the work

Process Email Templates

Overview

The Process Email Templates module is one of four modules that make up SugarBPM™, Sugar's business process management tool that enables administrators to streamline common business processes by managing approvals, sales processes, call triaging, and more. A process email template is required in order to include a Send Message event in a process definition. Sugar's core product includes several places where email templates can be created for different purposes, but SugarBPM requires all sent messages to be created via the Process Email Templates module.

Before continuing, please read the SugarBPM overview page, which defines critical vocabulary and other elements that may be referenced in this article.

The SugarBPM documentation contains the following pages:

Additionally, the Processes page of the Application Guide contains documentation for the user-facing elements of SugarBPM.

The following image illustrates the relationship between the four SugarBPM modules:
SugarBPM

This documentation will cover information and actions specific to the Process Email Templates module. For instructions concerning views and actions which are common across most Sugar modules, such as creating, editing, and deleting records, please refer to the Working With Sugar Modules section of this page.

Process Email Template Fields

The Process Email Templates module contains the following fields. For information on using and editing various field types, refer to the User Interface documentation. 

Field Description
Assigned To The Sugar user assigned to the process email template.
Date Created The date the process email template record was created.
Date Modified The date the process email template record or its content was last modified.
Description A description or other information about the process email template.
Integration Sync ID The sync key field used by external integrations to identify Sugar records in the external application. See the Integrate REST API endpoints in the Developer Guide for more details on how to use this field.
Note: This field is not visible in the user interface.
Name A unique and descriptive name.
Tags User-created keywords that can be used to identify records in filters, dashlets, and reports.
Note: For more information on creating and using tags, please refer to the Tags documentation.
Target Module The module against which the template's processes will be defined.

Creating Process Email Templates

You should typically create email templates before creating any process definitions that will use the templates. However, it is possible to save an incomplete process definition in order to navigate away and build an email template, then return later to complete the process definition.

Process email templates can be created from any of the following places in Sugar:

  • Process Email Templates dashlet:
    711-pet-create-dashlet
  • Process Email Templates module tab menu:
    createprocessemailtemplate
  • Process Email Templates list view:
    createonlistview

Upon clicking "Create Process Email Template" (or the Create button from list view), you will be directed to the record view. The record view is where Sugar stores information that will make it easy to find and understand the purpose of the email template in the future. After completing this form, you will be directed to the design view to create the actual content of the message.
711-pet-savedesign

After configuring and saving the process email template, it will automatically appear on the administrator's Process Email Templates dashlet and list view, but it will not be ready to use in a process definition until the design step has been completed via the design view

Designing Process Email Templates

After submitting the template's record view, you must create the custom layout and design of the message that will be sent by related process definitions. Click "Save & Design" in record view to automatically enter the Process Email Template's design view. The field values for Target Module, Name, and Description are automatically pre-populated on this screen based on the values entered on the record view.
710-carried-fields

SugarBPM's email template design interface is an easy-to-use WYSIWYG editor. The two elements available in the design view that cannot be accessed from record view are the design toolbar and the message body. The following sections cover how to use these elements to craft an email message template.
710-body-toolbar

At any time during the design of a template, you may click the Save button to preserve your work. After completing the content of the message, expand the record's Actions Menu to reveal "Save & Exit". Click on this menu item to return to the Process Email Templates list view and continue working in Sugar.
save-exit-77

The Design Toolbar

The toolbar is powered by the TinyMCE rich-text editor framework and presents familiar formatting options:

Element Button(s) Function
Edit HTML Source 710-icon-html Bypass the rich-text editor options and insert your own HTML code, or view the HTML code of an existing template to make advanced changes.
Bold; Italic; Underline; Strikethrough 710-icon-BIUS Use these basic font formatting options to easily add common styles to text in the message body.
Insert/Remove Bulleted List; Insert/Remove Numbered List 710-icon-lists Transform paragraphs in the message body into a formatted list.
Align Left; Align Center; Align Right; Justified 710-icon-alignments Set paragraph alignment.
Text Color; Background Color 710-icon-colors Choose a custom font color or highlight text with a background font color.
Font Size 710-icon-sizes Make text larger or smaller.
Fields Selector 710-icon-field-selector Look up and insert Sugar module field variables. For more information, see the Fields Selector section below.
Record Link Selector 710-icon-record-selector Look up and insert a hyperlink to a Sugar record related to the process's target record. For more information, see the Record Link Selector section below.
Insert/Edit Link 710-icon-link Insert or edit a link to a web page, hosted file, or other location on the web. 

Using the Fields Selector Tool

Process email templates can be customized using data pulled directly from your Sugar database. For example, an email template triggered by the Cases module could contain critical case details such as the support agent's name or the phone number of the contact related to the case. Related-module fields can be referenced from modules that have a one-to-one or one-to-many relationship with the target module. If a field has been updated, both its old and current values can be included. 

Note: Before using old values in your message's template, be sure to refer to the Understanding Current and Old Values section for important usage information regarding your process definition's design.

Common use cases for the Fields Selector tool include using the recipient's name and mentioning the old and new values of a changed field such as "Status" in the message body. To insert custom values using the Fields Selector tool, follow these steps:

  1. From the process email template's design view, place the cursor in the message body where the custom name variable should appear. Click on the Fields Selector icon in the design toolbar.
    Step1
  2. The Fields Selector drawer will open over the current screen. By default, it displays all fields in the template's target module. To find a variable from a related module, click the word "Module" to the left of the search bar and select the desired module.
    Step2
  3. The list of field variables will update automatically. Open the dropdown adjacent to the field or fields that you would like to insert and choose "Current Value". In this example, we are choosing to add the current value of the recipient's first and last name. Click "Done" to insert the field variables into the email template.
    Step3
  4. The template's design view will once again be visible and the selected variables will appear where your cursor was positioned before clicking the Fields Selector icon. The variables are wrapped in curly braces and must retain their special formatting to be detected in the sent message.
    Step4.1
    If necessary, use the text editor to move the variables or insert additional characters. In this example, we will move the first name variable {::assigned_user_link::first_name::} into position before the last name variable and insert a space character in between the two:
    Step4.2
  5. Next, place the cursor where you would like to insert the old and new values of the case's Status field then open the Fields Selector drawer again.
    Step5
  6. In the drawer, open the dropdown adjacent to the Status field and select "Current and Old Values" then click "Done". Both variables will be inserted into the message.
    Note: Before using current and old values in your message's template, be sure to refer to the Understanding Current and Old Values section for important usage information regarding your process definition's design.
    Step6
  7. If necessary, reorganize the text to place the current and old variables where desired. In this example, we will put the old value before the current one and complete the sentence:
    Step7
  8. Continue editing the template as needed and save.

The final product may look similar to this:
Final

For information about using process email templates in process definitions, refer to the Send Message Events section of the Process Definitions documentation.

Understanding Current and Old Values

When utilizing the Fields Selector tool to insert the current or old value of a field, it is important to strategically position the Send Message event within your process definition's design. Keep in mind the following guidelines:

  • If the value of a field did not change during the action that triggers the Send Message event, both the Old Value and Current Value variables will display the current value. Therefore, only use the Old Value variable when a specific field is expected to change during the triggering event.
  • If the value of a field changes more than once in a process, then its old and current values will be determined by the event that most closely precedes the Send Message event. 
  • If your process definition contains a Wait event, be sure that the Wait event does not occur between the action that changes the field and the Send Message event. This would prevent the old value from being communicated to the Send Message event.
  • Old values of related-module fields are only preserved if they are changed within the same save, such as a Change Field event in the process or a logic hook that is triggered during the process.

For information about using process email templates in process definitions, refer to the Send Message Events section of the Process Definitions documentation.

If desired, you may insert a URL in the message content that links to the target record or a record from a related module. For example, an email template triggered from the Cases module could contain a link to the related case record in Sugar. If you wish to send an email to a user when a process is assigned to them via an Activity element in the process definition, you can also insert a link to the process awaiting the user's action.

Note: Related-module links will only be available for modules that have a one-to-many relationship with the target module. 

To insert a link using the Record Link Selector tool, follow these steps:

  1. From the Process Email Template's design view, place the cursor in the message body where you want to insert a record link. Click on the Record Link Selector icon in the design toolbar.
    710-compose-recordselector
  2. The Record Link Selector drawer will open over the current screen, displaying the name of the target module on the first line followed by the names of modules that have a one-to-many relationship with the target module. Click on the radio button next to the module that contains the record you want to link to and then click "Select".
    related-link-drawer-77
  3. The template's design view will once again be visible and a variable representing the selected URL will appear where your cursor was positioned before clicking on the Record Link Selector icon.
    710-selected-record
    Note: In the recipient's inbox, the message will contain an unformatted URL (e.g., https://instancename.com/#Cases/1234-abcd-5678-efgh) that links to the related record. To instead display a word or phrase hyperlinked to the record, you can click on the Edit HTML Source button in the design toolbar and place the link variable in an HTML anchor tag:
    html-link-77
  4. After completing the content of the message, click "Save & Exit".
    710-save-exit

For information about using process email templates in process definitions, refer to the Send Message Events section of the Process Definitions documentation.

Linking to Processes

If you wish to send an email to a user when a process is assigned to them via an Activity element in the process definition, you can insert a link directly to the process record awaiting their action. To do this, simply choose the Processes module in the Record Link Selector. When clicked in the email, this link will open the record view of the active process, allowing the assigned user to execute (e.g., approve or route) the process. See the Processes page in the Application Guide for more information on how users can work with processes.

Email templates containing process links should only be used in Activity elements, not Send Message events. Outside the context of an activity, there is no viewable active process awaiting action by a user, and therefore such links are invalid. If you use an email template containing a process link in a Send Message event, the link will simply appear blank in the email.

It is also possible for a process link in an email to become out of date if the user clicks the link after they have already executed the process. Once executed, the process is no longer available to be viewed and the user will see a warning in Sugar that the process is now closed.

Working With Sugar Modules

The Process Definitions module uses Sugar's Sidecar user interface. The following sections detail menus, views, and actions common to Sidecar modules and contain links to additional information within the page or links to the User Interface documentation.

The following sections describe the various menu options in the Process Email Templates module with links to more information about each option in the User Interface documentation or, for template-specific functionality, within this page.

Module Tab Menus

Click the Process Email Templates module tab in the navigation bar to access the Process Email Templates list view. You may also click the three-dots menu in the Process Email Templates tab to display the Actions, Recently Viewed, and Favorites menus. The Actions menu allows you to perform important actions within the module. The Recently Viewed menu displays the list of templates you last viewed in the module. The Favorites menu displays the list of templates you most recently marked as favorites in the module.
processemailtemplatemenu

The Actions menu allows you to perform the following operations:

Menu Item Description
Create Process Email Template Opens the record view layout to create a new email template.
View Process Email Templates Opens the list view layout to search and display email templates.
Import Process Email Templates Opens the import wizard to enable import of .pet files.

To access the Process Email Templates module or module tab, you must also be a System Administrator user or a regular user with a role that provides developer access to one or more modules. For more information on module tab menus including other reasons a module may not be included in the menu, see the User Interface documentation.

List View Record Actions Menu

The Record Actions menu to the far right of each record's row allows you to perform actions on the individual process email template record directly from the list view.
list-actions-77

The list view's Record Actions menu allows you to perform the following operations:

Menu Item Description
Preview Preview this email template in the intelligence pane.
Design Navigate directly to the template's design view, where you can create and edit the message's content.
Edit Edit this process email template.
Export Download a copy of this template to your computer as a .pet file.
Delete Delete this process email template.

Record View Actions Menu

The template's record view displays the fields relevant to the Process Email Templates module. To access a template's record view, simply click a hyperlinked template name from the Process Email Templates list view. The record view's Actions menu appears on the top right of the page and allows you to perform various operations on the current record.
PE RVActionsMenu

The Actions menu allows you to perform the following operations: 

Menu Item Description
Edit Edit this process email template.
Design Navigate directly to the template's design view, where you can create and edit the message's content.
Export Download a copy of this template to your computer as a .pet file.
Share Share a link to this template in Sugar via email.
Copy Duplicate this record to make a new process email template.
Delete Delete this process email template.
Doc Merge Select or create a DOCX, XLSX, or PPTX template to merge record data into documents that will be accessible in the Doc Merge widget.
Doc Merge to PDF Select or create a DOCX, XLSX, or PPTX template to merge record data into PDF documents that will be accessible in the Doc Merge widget.

Common Views and Actions

The following links will open specific sections of the User Interface documentation where you can read about views and actions that are common across most Sidecar modules.

Content Link Description
Viewing Process Email Templates
    Viewing via List View
    Viewing via Record View
    Viewing via Recently Viewed

The Viewing Records section describes various methods of viewing process email template records, including via the Process Email Templates list view and record view and the Recently Viewed menu in the Process Email Templates module tab.

For information on viewing the content of a template's message, please refer to the Designing Process Email Templates section below.

Searching for Process Email Templates
    List View Search
        Creating a Filter
The Searching for Records section provides an introduction to list view search, which searches and filters within the Process Email Templates module.
Process Email Templates List View
    Total Record Count
    Create Button
    List View Search
    Favorite Designation
    Column Reordering
    Column Resizing
    Column Sorting
    Column Selection
    Preview
    Record Actions Menu
    Pagination
    Intelligence Pane
The List View section walks through the many elements of the Process Email Templates List View layout which contains a filterable list of all process email template records in Sugar. While the generic menu options are described in the User Interface sections linked to the left, the options specifically available in the Process Email Templates list view are described in the List View Record Actions Menu section of this page.
Process Email Templates Record View
    Favorite Designation
    Next or Previous Record
    Actions Menu
    Show More
    Intelligence Pane
The Record View section walks through the many elements of the Process Email Templates Record View layout, which contains detailed information about a single process email template record. While the generic menu options are described in the User Interface sections linked to the left, the options specifically available in the Process Email Templates record view are described in the Record View Actions Menu section of this page.  
Editing Process Email Templates
    Editing Inline via Record View
    Editing via Record View
    Editing Inline via List View

The Editing Records section describes the methods of editing existing process email template record fields: inline via the Process Email Templates record view, in full edit mode on the record view, and inline via the Process Email Templates list view.

For information on editing the content of a template's message, please refer to the Designing Process Email Templates section below.

Deleting Process Email Templates
    Deleting via Record View
    Deleting via List View
The Deleting Records section describes two ways to delete process email templates: via the Process Email Templates record view and via an individual record's Actions menu on the list view.
Favoriting Process Email Templates
    Favoriting via List View
    Favoriting via Record View
The Favoriting Records section describes the various methods of marking process email templates as favorites, including via the Process Email Templates list view and Process Email Templates record view. Favoriting a process email template record allows you to easily access it from list views and the Process Email Templates module tab.
Sharing Process Email Templates The Sharing Records section provides instructions for the Share option in record view, which composes an email with a link to the process email template record. If the recipient is logged into Sugar, clicking the link will bring them directly to the record view.