Triggering Email Templates from Tasks
System administrators can trigger email templates from saved tasks. This functionality enables system admins to control the conditions by tailoring the task email templates. For example, you might configure an email template for any updates to a Task and a separate email template for when a Task is marked as closed.
When you set Triggering Form to Task:
• | Task and associated fields are available for field replacement in Step 2 Content. |
• | Task and associated fields are available from Step 4 Conditions for use as triggering conditions. |
Step 1 Initial
This is the detail information of your email template. When the Triggering Form for an Email Template is Task, ClientSpace does not expose the Include as Activity option in Step 1 because you cannot add Activities to Tasks.
To trigger an email from a Task:
1. | Complete the form fields: |
Type |
For Email notifications:
|
Triggering Form |
Select Task. Your selection in the Triggering Form field is the dataform or table where the trigger resides (a field change, a value change). The change to the dataform or table is what triggers the email. Triggering Form is used synonymously with a database table or a dataform. When you set Triggering Form to Task, this action makes any associated Task fields available on Step 4 Conditions for use as triggering conditions. Task and associated fields are also available for field replacement. |
Template Code |
Must be unique and should be related to the purpose of the email template. |
Template Name | Provide a short, descriptive name for your template. Displays in the email template list. |
Description | Provide a useful description of the email template. |
Execute On | Will this email be sent the first time the form is saved (Insert), only when the form is changed (Update), or every time (Insert or Update)? When there are changes to the dataform that you selected in Triggering Form, the Execute On value controls triggering for Insert, Update, or both Insert and Update. |
Merge Procedure | Select an optional Merge Procedure here to provide additional system information for field replacement. The procedure can be selected from any stored procedure in the system with a name containing emailtemplate_merge_proc. Merge Procedure also determines the fields that are available to use in field replacement. |
Execution Pipeline |
Email templates can support multiple pipelines using a multi-select. This allows you to create a single email template that can apply to multiple execution pipelines. Select the pipelines on which the email triggering is to occur. Note: If you are using the Pipeline Linking table to manage Pipeline Behaviors and you are configuring a new email template, pipelines assigned a behavior of Default will auto-fill the Execution Pipeline field. If you are editing an existing email template, Execution Pipeline entries remain intact until edited. Changed entries are validated against the Pipeline Linking table. For instance, if a pipeline has been assigned a behavior of Allow or Default and you remove it, you will still be able to select it from the Execution Pipeline list. If the same pipeline is assigned a behavior of Disallow, you will not be able to add it again. |
Workspace Templates | Select the Workspace Templates to receive this email. |
2. | Click Next to proceed to Step 2 Content. |
Step 2 Content
This is the content of the email template. To include contextual field information from a Task, (your Triggering Form in Step 1), you can use replacement fields.
To configure the content of the email:
1. | Provide a Subject line of the email to be generated. |
2. | Provide the email message in the Body. |
This field uses a rich text editor and supports font styling, embedded images, hyperlinks, and so on.
3. | Click See Replace Fields to select items to copy to the clipboard. |
You can paste items in Subject and Body as applicable. See Replacement Fields.
Field replacement includes:
• | When you select Task as the Triggering Form in Step 1 Initial, Task fields are available for field replacement |
• | The active fields from the related Organization and Org Other Info |
• | Any fields returned by the Server Data Procs related to the triggering dataform |
4. | Click Next to proceed to Step 3 Addresses. |
Step 3 Addresses
In this step you define who the email is from, who it will be sent to, and any CC recipients. The available options on this step are controlled by the Triggering Form. When the Triggering Form is Task (Step 1 Initial), then Source options are Adhoc Email Address and Task. Anyone who is currently marked as a Notification user on the triggering Task, is included as a subscriber.
To configure Addresses:
1. | Complete the form fields: |
From Address |
This field is set to Current User. For Task, only the person performing the action displays as the task From Address. |
Include Task Subscribers as CC Recipients |
When this option is selected, it includes anyone who is currently marked as a Notification user on the triggering Task. |
2. | To add Addresses, click Add. |
A row opens to add recipients to the notification.
Source |
The Source list includes:
Note: If you select the AdHoc email address option and enter a ClientSpace user's email address as a recipient, if the Enable Email for this account field on their user profile is unchecked, they cannot receive emails from ClientSpace and will therefore not receive the email generated from this template. Note that only a Global Administrator can change this setting. Also see Personalizing Your User Profile.
|
||||||
Type |
What kind of email recipient type are you setting? Options are To or CC. |
||||||
Address |
Use this field to manually type an email address to use every time. |
3. | Click Next to proceed to Step 4 Conditions. |
Step 4 Conditions
In this step you can specify Task fields in the Field column. When Task is the Triggering Form (from Step 1 Initial), Source is set to Task. Available options for Field are any of the Task fields.
To add conditions:
1. | Complete the form fields: |
No Primary Trigger | When selected, no single condition must be met to trigger the email template. If this field is selected, the Primary Trigger Field is disabled. | ||||||||||||||
Primary Trigger Field |
Optional field (from the Triggering Form selected in Step 1), which, when changed triggers the event. The following statements refer to the condition entries in the Add area. Condition entries are identified with a Label (the last column).
Primary Trigger Field options for tasks include:
|
||||||||||||||
Condition Expression |
Condition Expressions use Labels from the display conditions along with AND, OR, and NOT operators to control precedence and sequence. The Add section is where you can add more granular triggering conditions. Entries in this section are called display conditions. If the Condition Expression field is empty, then the entries under Add are treated as OR conditions. Allows for AND, OR, and NOT conditions using the display conditions (Label) from the Add section. Using the Label field that corresponds to the entries in the Add section, you can combine the conditions into more complex expressions. The Condition Expression field could state, for example (Condition1 AND Condition2) OR (Condition3 AND Condition4) OR Condition5. Condition Expressions adhere to AND/OR/NOT across tabbed dataform conditions. For a detailed explanation about conditions, see Condition expressions. |
||||||||||||||
Source |
When you select Task as the Triggering Form in Step 1 Initial, Source is set to Task. |
||||||||||||||
Field |
When you select Task as the Triggering Form in Step 1 Initial, the options for Field include all task fields. Note: When the Primary Trigger Field is HdrAction, select HdrAction instead of a field name here. You can select the name of the HdrAction link in the Value field as shown in the example below. |
||||||||||||||
Operator | Choose the type of comparison. Each value from a multi-lookup Field can be added as a separate "=" condition. This supports complex AND, OR, and NOT conditions as well. | ||||||||||||||
Value | The criteria against which the trigger field is compared. The Value corresponds to the Field of the Task. For example, if you select Assigned To for Field, then select a user for the Value. | ||||||||||||||
Label | The label to use when constructing Condition Expressions for triggering. Make this label short and representative of the Field. Labels are used in the Condition Expression field. |
2. | Click Next to proceed to the next step. |
Step 5 Attachments
You can add attachments at this step to be included with each copy of the email sent. Static attachments can be included through the Attachments panel. Recipients receive any attachments added from the Attachment panel when the template is triggered.
To complete the Attachments step:
1. | Click Add to begin adding the attachments. |
2. | Select the Dataform from which the attachment will be copied. |
3. | Select the Field from the dataform selected previously that holds the dataform to be copied. |
A panel displays on the right for adding attachments.
4. | To add static attachments, click Attachments and ![]() |
The Upload File dialog box opens.
5. | Click Choose File to locate the file. |
6. | Click Save. |
7. | Click Finish to complete your email template configuration. |