When someone is assigned an SAP workflow task, Duet Enterprise for Microsoft SharePoint and SAP automatically sends an email with a task notification to the person or group who was assigned. You can customize the contents of the email notification message that Duet Enterprise sends. For example, you might add links to related information or add more information about the task.
The notification message is part of the internal definition of a particular workflow. That is, all the individual tasks of a specific workflow have the same associated email notification message. To modify the notification message, in effect, you must modify the workflow for the task type.
Important:Â You must have Site owner permissions to perform the procedures in this article
In this article
Step 1 - Access the email task notification template
Open the workflow site in SharePoint Designer
You can customize an email task notification. The notification message is part of the workflow definition. To modify the notification message, open the workflow site in Microsoft SharePoint Designer 2010.
-
From the Windows Start menu, click to launch SharePoint Designer 2010, and then click Open Site.
-
In the Site URL box of the Open Site dialog box, enter the URL for the workflow that you want to work with. This opens the Site Information page for the workflow.
-
In the Navigation panel, click Workflows to open a page where you can manage workflow settings.
-
In the Workflows panel, locate the List Workflow section and the name of the task type for the notification message. For example, the following illustration shows this page for the TestTask task type.
Access the settings for the notification message
Duet Enterprise sends a notification message for each individual task. To change the message, you have to change the way the workflow handles each single task.
To change the message for each task:
-
Double-click the name of the task type.to open the page for the workflow that allows you to view and manage settings.
-
On the Workflow Settings page, click Edit Workflow to open the workflow editor.
-
In the editor pane, locate Step 1, and then click Approval.
-
In the Approval page, click Change the behavior of a single task to open the Task Behaviors page.
-
On the Task Behaviors page, in the When a Task is Pending pane, click Current Task:Assigned To.
In the following illustration, the actions direct Duet Enterprise to log the task in the workflow history list, and then send an email task notification to the user who is assigned the task.
Step 2 - Modify the contents of a task notification
You can use options in the Define Email Message window to modify the contents of an email task notification. The contents of the message can include both static information (ordinary text and hyperlinks) and dynamic (variable) information. Duet Enterprise retrieves the dynamic information each time that it composes a specific message.
This illustration, for example uses the following static information: a numbered list, text that uses a bold font, and two hyperlinks, reassign this task and detailed information. In addition, the illustration shows several examples of variables that hold dynamic information: CurrentTask:Assigned To, %Variable:MailSubject%, %Variable:WFInitiatorUser%, and so on.
Specify recipients of the task notification
By default, Duet Enterprise uses a dynamic form of email address for the task notification message, a variable called Current Task: Assigned to. When it sends the task notification, Duet Enterprise looks up the correct person or SAP role, and then sends the notification to that address.
To modify the recipient address:
-
In the To: line of the Define email message window, click the Address Book button.
-
In the Select Users dialog box, enter a name in the Type a Name or E-mail Address box or select a recipient from the available list, and then click Add>>.
Important:Â If you supply a static address, then any time that you need to change the address, you must open the workflow in SharePoint Designer 2010 and change the recipient manually.
-
To remove a name from the recipient list, in the Selected Users: box, select the name of the recipient that you want to remove, and then click Remove<<.
-
When you finish selecting users, click OK to return to the Define email message window.
Change static text in the message
You can include static information in the message: every time the workflow creates an instance of the email task notification, this text will be the same.
To include static information:
-
In the Define email message window, position the cursor where you want the text to appear. Then, type the information directly in the message body or subject line.
Add a hyperlink to the message
You can include a static hyperlink— that is, one that always links to the same address or location — in the body of your workflow task notification message. To add a hyperlink, use the HTML anchor tag (<a> and </a>) with the href attribute, and specify the target address as the value of the href attribute.
For example, you can add a link to a task detail by using the following text and hyperlink.
You can find <a href="http://MyWorkflowURL.com/">detailed information </a> about this task in SharePoint.
In the resulting message, the text between the anchor tags appears as a hyperlink to the specified address.
Add dynamic content to the message
It is often helpful to use dynamically changing information in a task notification. For example, you might want to include comments from other people in the workflow, or the client ID so the user can be certain about a specific reference. Typically, when you add dynamic content, you use the value of a field in the current item (the current task in the workflow).
To add dynamic content to an email task notification:
-
In the Define email message dialog box, click Add or Change Lookup to open the Lookup for String dialog box.
In SharePoint Designer 2010, a lookup is a feature that retrieves data from a data source at the workflow run time. The workflow can then use the data to perform some other workflow action.
-
In the Data Source drop down list, select the data source for the dynamic information that you want to add to the notification. Frequently, workflows use dynamic content from a Current Item data source, or a Workflow Variables and Parameters data source. If you do not know which data source to select, contact your workflow administrator.
-
In the Field from source drop-down, select the field that you want to use.
The options that appear in the Field from source list depend on which Data Source you selected, and depend on whether the workflow site designer created any Extended business properties for the workflow.
The following list provides additional information about pre-defined fields in the Current Item data source and in the Workflow Variables and Parameters data source. To see more information about fields from these data sources, expand one or more of the items on this list.
Fields for Data Source = Current Item.
The Current Item data source refers to the current task in the workflow. Choosing this option enables you to select a value from that task. For example, the Current Item data source includes fields such as Approval Status, Check-in Comment, and other values that provide information about a specific active task in the workflow. In addition, the list of valid fields for Current Item will include all properties configured as Extended business properties.
The Current Item data source has too many fields to list here. However, the following list shows some of the most common fields.
-
Approval Status
-
Approver Comments
-
Check-In Comments
-
Client ID
-
Created By
-
ID
-
Name
-
Path
-
Template Link
-
URL Path
Fields for Data Source = Workflow Variables and Parameters
The following table shows the values that you can use from the Field from source drop down list when you select Workflow Variables and Parameters.
Field name
Description
Variable: Comments
This variable contains comments, if any, from the SAP task originator.
Variable: DueDateForAllTasks
This variable contains the completion deadline for all tasks in the workflow.
Variable: MailSubject
This variable contains the subject line for the task notification email.
Variable: NotificationMessage
This variable contains a notification message from the SAP task originator.
Variable: StartDeadline
This variable contains the date by which all tasks must start.
Variable: TaskPriority
This variable contains the priority for the task.
Variable: TaskTypeName
This variable contains the type name for the task.
Variable:WFInitiatorUser
This variable contains the name of the workflow initiator.
.
-
-
Click OK to accept the lookup value and return to the Define E-mail Message dialog box.
-
Click OK to accept changes to the email task notification.
Step 3 - Publish the changes.
On the ribbon in the task settings page, click Publish. The resultant email will include the changes you made for all future tasks.