Workflow and ServiceDesk Community

 View Only

Configuring SD.Email.Monitor for Notification of New Incident Emails in Servicedesk 7.1 Sp2 

Apr 05, 2013 04:20 PM

Introduction

One of the things that many Servicedesk technicians would like is an email notification when emails are sent to the tickets for which they have task assignments. The changes to the SD.Email.Monitor process outlined below provide this functionality, and also include a Process Message, added to the history of the ticket, stating that emails have been sent.

The process outlined in this article pertains primarily to ServiceDesk 7.1 Sp2. In a separate article on Connect, a procedure was defined to notify users when comments are added to a ticket or process. The URL for the article is Send Incident to Workflow: An Automation Rule Example Notifying Users of a Comment Added This provides a good example of how using a different technique, the same type of requirement can also be met. With some modification, the process listed in the URL article could perform the same function as what is defined in this article for Servicedesk 7.5.

Since the SD.Email.Monitor package is publicly editable, it is possible to use the same concepts contained in this article below, for Servicedesk 7.5, but the variables used would be slightly different. That may become available in a future article.

To note, you should review the contents of the “Add Response to History” component and the two “Send Email” components to assure that they are configured for your mail servers and with appropriate messages and history data to meet your specific requirements.

The first graphic also represents how the final flow changes should look.

Procedures:

Begin by opening the SD.Email.Monitor project, and then open the ProcessMessage model.

1. Find the ‘Is Email a Task Response?’ component, and, following the ‘Yes’ path, after the ‘Create Log Entry’ component, add a ‘GetTaskAssignmentsForProcess’ component. You can disconnect all of the other components following this line back to the ‘Add Response to History’ component, and move them to the right. You will reuse a few of these existing components. See the graphic below for the new component position.

Configuration of the ‘GetTaskAssignmentsForProcess’ component.

Uncheck From Current Process:
Execution Context ID: - Select Process Variables and add “GUIDValid”
All other settings leave at default.

image001_0.png

2. Add a ‘GetIncidentByTrackingID’ component after the ‘GetTaskAssignmentsForProcess’ component. Information from this component will be used to populate the Send Email subject/body. Copy the ‘Send Email’ component and place the new copy slightly below and to the right of the new ‘GetTaskAssignmentsForProcess’ component. Connect the ‘Not Found’ path to this new ‘Send Email’ Component.

Configuration of the ‘GetIncidentByTrackingID’ component:

Input Tab:

Exchange Connection String: - Select Process Variables and add
[ProfileProperties].service_desk_settings_service_desk_exchange
Tracking ID: - Select Process Variables and add ‘GUIDValid’

Output Tab:
Result Variable: Type in ‘Incident’

All other settings leave at default.

image003_1.png

3. Add an ‘Add New Data Element’ component after the ‘GetIncidentByTrackingID’ component, on the “Not Found” line, before the ‘Send Email’ component. Name this component – ‘Creating Task Assignee List Variable for Not Found’

Configuration of the ‘Add New Data Element’ component

Data Type: Text
Check the Is Array box
Output Variable Name: ‘AssigneeEmailListNotFound’
All other settings leave at default.

4. Connect the ‘Send Email’ component to the ‘Add Response to History’ component. Configure the ‘Send Email’ component as shown below

Configuration of the ‘Send Email’ component

Contents:

ToAddresses: Select ellipsis to chose process variables, and find and add ‘AssigneeEmailListNotFound’

You will want to customize the Contents Section to meet your specific requirements.

On Email Settings tab, SMTPServer Name: - Select Process Variables and add
[ProfileProperties].service_desk_settings_smtpmail_server

image005.png

This completes the “not found” path configuration.

5. Add an ‘Add New Data Element’ component, following the “Found” path after the ‘GetIncidentByTrackingID’ component. Name this component – ‘Creating Task Assignee List Variable for Found’.

Configuration of the ‘Add New Data Element’ component

Data Type: Text
Check the Is Array box
Output Variable Name: ‘AssigneeEmailList’
All other settings leave at default.

6. Add a ‘For Each Element in Collection’ component after the ‘Add New Data Element’ component.

Configuration of the ‘For Each Element in Collection’ component.

Array Variable Type: - LogicBase.Core.Ensemble.WorkflowTasks.TaskAssignment
Array Variable Name: - Click the ellipsis and select ‘resultTaskAssignments’
Item Output Variable Name: - type in ‘EachAssignment’

7. Add a ‘Add Items To Collection’ component to the next element output on the ‘For Each Element in Collection’ component. Connect the ‘Add Items to Collection’ output back to the ‘For Each Element in Collection’ component.

Configuration of the ‘Add Items to Collection’ component.

Data Type: Text
Array Variable Name: ‘AssigneeEmailList’
Items to Add: Click the ellipsis and check the Dynamic Model box. Click the Edit button to create the Dynamic Model.

Configuration of Dynamic Model.

a. Add an ‘Text Contains Rule’ component.
Configuration of 'Text Contains Rule' component.

Leave Case Insensitive checked. Contains: Enter a constant value of Group Variable Name: Choose process variable of EachAssignment.ReferenceType.

b. Add a ‘GetUsersInGroup’ component. Connect the contains output from the ‘Text Contains Rule’ component to the GetUsersinGroup’ component. Connect the ‘GetUsersinGroup’ to the End component.

Configuration of the ‘GetUsersinGroup’ component.

Inputs Tab:

Leave the Service URL Source at Use Default.
Group ID: Use process variable of EachAssignment.ReferenceID

Outputs Tab:

Type in ‘selectedassignees’ as the Result: value.

c. Add a ‘Add Items to Collection’ component. Connect the ‘does not contain’ output from the ‘Text Contains Rule’ component to the ‘Add Items to Collection’ component. Connect the ‘Add Items to Collection’ component to the ‘End’ component.

Configuration of the ‘Add Items to Collection’ component.

Data Type: Text
Array Variable Name: type in ‘selectedassignees’
Items to Add: Use process variable of ‘EachAssignment.ReferenceName’

d. To pass the assignee information out of the dynamic model, the ‘End’ component needs to be configured. Double click on the ‘End’ component.

Click the ellipsis after Mapping:
Select ‘Value From Data’, and click the ellipsis button and use ‘selectedassignees’ as the variable.
Click OK until you are back to the ProcessMessage model.

8. Add a ‘Configurable Collection Filter’ component to the model and connect to the finished output of the ‘For Each Element in Collection’ component added earlier.

Configuration of the ‘Configurable Collection Filter’ component.

Data Type: Text
Array Variable Name: AssigneeEmailList
Filter Model: Click the ellipsis button. In the Filter Model add a ‘Email Verification Component’ component. On the Setup tab, click on the elipsis and choose the Process Variable 'Element'. Connect the invalid email output to Filter Out Value and the valid email output to Keep Value.
Click OK until back at the ProcessMessage model.

9. Now connect the original ‘Send Email’ component to the just added ‘Configurable Collection Filter’ component. Connect the new ‘Send Email’ component to the original ‘Add Response to History’ component previously referenced.

Configuration of the ‘Send Email’ component.

From Address: - Select Process Variables and add [ProfileProperties].service_desk_settings_mail_from_address
To Addresses: - Select Process Variables and add AssigneeEmailList
Subject: - add what you wish, you can add variables from the Incident data such as Incident.ProcessID, Incident.Name, Incident.Description, etc to provide detail as to what exactly was updated.
Html Content – add what you wish, you can add variables from the Incident data such as Incident.ProcessID, Incident.Name, Incident.Description, etc to provide detail as to what exactly was updated.
Email Settings tab:

SMTPServer Name: - Select Process Variables and add [ProfileProperties].service_desk_settings_smtpmail_server

Attached is a package file of the project for review as well.

Statistics
0 Favorited
2 Views
2 Files
0 Shares
4 Downloads
Attachment(s)
docx file
Configuring SD.Email_.Monitor for Notification of New Inc....docx   242 KB   1 version
Uploaded - Feb 25, 2020
package file
SD.Email_.Monitor.package   3.22 MB   1 version
Uploaded - Mar 11, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.