SCSM Email Integration Part 2.2.3 – Runbook Design – SMMail_ProcTriggers

Navigation:

Introduction

This is a continuation of the SCSM Email Integration series.

Our goal for this post is to create a runbook which does the following:

  1. Checks an email inbox.
  2. Routes trigger emails to an appropriate child runbook.

Runbook Name: SMMail_ProcTriggers

Here is an overview of the data-flow for our runbook:

  1. Get Items from Inbox
  2. Use smart links to filter email messages according to the subject line.
  3. Sanitize the subject line.
  4. Parse the Work Item ID from the subject line.
  5. Invoke a child runbook.
  6. Move the email object to a subfolder once processed.

This runbook will eventually have two main branches: one branch for work item initial email triggers, and a second branch for work item comment update triggers. For now, we’re working only on initial triggers.

Each main branch will have two sub-branches, one for Incidents and one for Service Requests.

Branch Layout:

  • Main
    • Branch 1 – Initial Emails
      • Branch 1.1 – Incidents
      • Branch 1.2 – Service Requests
    • Branch 2 – Comment Updates
      • Branch 2.1 – Incidents
      • Branch 2.2 – Service Requests

Note: we will be skipping branch 2 since it will be covered in a later post.

Activities

Here is how to define the activities. Assume a link is normal unless it is defined.

Main Branch:

  1. Initialize Data
    Type: Initialize Data
  2. Check Inbox
    Type: Exchange User Get Item
    Configuration: helpdesk mailbox

Branch 1 – Initial Emails

  1. Smart Link from Main Branch
    Include: Subject from Check Inbox Starts With SCSM_Trigger_InitialEmail
  2. Sanitize Subject
    Type: Data Manipulation Replace Text
    Input String: Subject from ‘Check Inbox’
    Pattern: ” (double-quote character)
    Replacement Text: (blank)

Branch 1.1 – Initial Emails – Incidents

  1. Link from ‘Sanitize subject’
  2. (New WI) (IR) Get ID from Email Subject
    Type: Data Manipulation Match Pattern
    Input String: Output String from ‘Sanitize subject’.
    Pattern: IR[0-9]+
  3. Smart Link from Data Manipulation Match Pattern
    Include: Matches Found from ‘(New WI) (IR) Get ID from Email Subject’ is greater than 0.
  4. (New WI) (IR) Invoke Runbook to Send Email
    Type: Invoke Runbook
    Invoke By Path: True
    Wait for Completion: True
    Parameter 1 Name: WorkItemID
    Parameter 1 Value: Match String from ‘(New WI) (IR) Get ID from Email Subject’.
  5. Smart Link from (New WI) (IR) Invoke Runbook to Send Email
    Include: Child Runbook Status equals success
  6. (New WI) (IR) Move to Processing Complete
    Type: Exchange User Move or Copy Item
    Configuration: helpdesk connector
    ID: ID from ‘Check Inbox’
    Destination Folder: processing-complete

Branch 1.2 – Initial Emails – Service Requests

  1. Link from ‘Sanitize subject’
  2. (New WI) (SR) Get ID from Email Subject
    Type: Data Manipulation Match Pattern
    Input String: Output String from ‘Sanitize subject’.
    Pattern: SR[0-9]+
  3. Smart Link from Data Manipulation Match Pattern
    Include: Matches Found from ‘(New WI) (SR) Get ID from Email Subject’ is greater than 0.
  4. (New WI) (SR) Invoke Runbook to Send Email
    Type: Invoke Runbook
    Invoke By Path: True
    Wait for Completion: True
    Parameter 1 Name: WorkItemID
    Parameter 1 Value: Match String from ‘(New WI) (SR) Get ID from Email Subject’.
  5. Smart Link from (New WI) (SR) Invoke Runbook to Send Email
    Include: Child Runbook Status equals success
  6. (New WI) (SR) Move to Processing Complete
    Type: Exchange User Move or Copy Item
    Configuration: helpdesk connector
    ID: ID from ‘Check Inbox’
    Destination Folder: processing-complete

Note that the Invoke-Runbook doesn’t yet have a target or any parameters. That’s because we haven’t created the child runbook yet.

Here’s a screen shot. Note that it includes branch 2.

2.2.3-1

The exported runbook will be available upon completion of the series.

Advertisements

11 thoughts on “SCSM Email Integration Part 2.2.3 – Runbook Design – SMMail_ProcTriggers

  1. Pingback: How I Handle SCSM Email Integration – Part 2.2.1 – End-User notification upon ticket creation | windowsmasher

  2. Pingback: How I Handle SCSM Email Integration – Part 1 | windowsmasher

  3. Pingback: SCSM Email Integration Part 2.1.1 – New Work Items – SCSM Configuration | windowsmasher

  4. Pingback: SCSM Email Integration Part 2.2.2 – Runbook Design – “Process Email – General Routing” | windowsmasher

  5. Pingback: SCSM Email Integration Part 2.2.4 – Runbook Design – “Process Email – SCSM Trigger – Send Initial WI Email” | windowsmasher

  6. Pingback: Part 3.1.1 – New Comments – SCSM Configuration | windowsmasher

  7. Pingback: SCSM Email Integration Part 3.2.1 – New Comments – Scorch Configuration | windowsmasher

  8. Pingback: Part 3.2.2 – Runbook Design – ‘Process Email – SCSM Trigger Emails’ – Rev2 | windowsmasher

  9. Pingback: SCSM Email Integration Part 3.2.3 – Runbook Design – ‘Process Email – SCSM Trigger – Send WI Comment Email’ | windowsmasher

  10. Pingback: SCSM Email Integration Part 4.1.1 – Receiving Comments | windowsmasher

  11. Pingback: How I Handle SCSM Email Integration – Navigation | windowsmasher

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s