SCSM Email Integration Part 2.2.4 – Runbook Design – SMMail_Send-InitialWiEmail

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. Takes in a single parameter – “Work Item ID”. This will look something like ‘IR123’ or ‘SR123’.
  2. Generates an email message according to a template.
  3. Sends out the email message.

Runbook Name: SMMail_Send-InitialWiEmail

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

  1. Initialize Data
  2. Get the Work Item
  3. Get the Work Item’s Affected User’s Email Address
  4. Generate a subject line.
  5. Generate an email message
  6. Send the email
  7. Return the result

This runbook will require two branches: one branch for service requests, and a second branch for incidents.

Branch Layout:

  • Main
    • Branch 1 – Incidents
    • Branch 2 – Service Requests

Global Variables Required:

  1. SCSM Scripts Account Username
    1. Username of AD account which can run SCSM SMLets on your SCSM server. It should have local admin rights on the SCSM server.
  2. SCSM Scripts Account Password
    1. Password to the account username given in the global variable ‘SCSM Scripts Account Username’.
    2. Make sure to check the ‘Encrypted Variable’ checkbox.
  3. SCSM Email Notification BCC Addresses
    1. semi-colon delimited list of email address to bcc all messages to.

Activities:

Main:

  1. Initialize Data
    Type: Initialize Data
    Parameter 1: workitemID (as string)

Branch 1 – Incidents

  1. Smart-Link from Initialize Data
    Include: workitemID from Initialize Data starts with IR
  2. Get IR
    Type: SC 2012 Service Manager -> Get Object
    Class: Incident
    Filter: ID equals workitemID from Initialize Data
  3. (IR) Get WorkItem Affected User Email
    Type: System -> Run .Net Script
    Language: PowerShell
    Script Body: <See Section ‘Scripts: (IR) Get WorkItem Affected User Email’ below>
    Returned Data Parameter 1 Name: affectedUserEmailAddr
    Returned Data Parameter 1 Variable: retval
    Looping: Enabled
    Delay Between Attempts: 10
    Exit: affectedUserEmailAddr does not match pattern ^$ or number of attempts is greater than 6.
  4. (IR) Generate Email Subject Line
    Type: System -> Run .Net Script
    Script Language: Powershell
    Script Body: $subject = “IT Support [” + “{ID from Get IR}” + “]: ” + “{Title from Get IR}”
    Returned Data Parameter 1 Name: subject
    Returned Data Parameter 1 Variable: subject
  5. (IR) Generate Email Message
    Type: System -> Run .Net Script
    Script Language: PowerShell
    Script Body:  <See Section ‘Scripts: (IR) Generate Email Message’ below>
    Returned Data Parameter 1 Name: htmlEmailBody
    Returned Data Parameter 1 Variable: retval
  6. Name: (IR) Create and Send E-Mail
    Type: Exchange User -> Create and Send E-Mail
    Configuration: helpdesk connector
    To: affectedUserEmailAddr from (IR) Get WorkItem Affected User Email
    Subject: subject from (IR) Generate Email Subject Line
    Body: htmlBody from (IR) Generate Email Message
    Body Type: HTML
    BCC: {SCSM Email Notification BCC Addresses}
  7. Return Data
    Type: Runbook Control -> Return Data
    Parameter 1 Name: result
    Parameter 1 Value: Activity Result from (IR) Create and Send E-Mail

I typically add another branch from ‘(IR) Create and Send E-Mail’ like this:

  1. Smart-Link from (IR) Create and Send E-Mail
    Include: (IR) Create and Send E-Mail returns Warning,Failed
  2. (IR) Send Failure Notice to Admins
    Type: Exchange User -> Create and Send E-Mail
    To: {SCSM Email Notification BCC Addresses}
    Subject: [SCORCH Email Failure] for Work Item {ID from Get IR}
    Body: The following message failed to send with error {Error Summary Text from  (IR) Create and Send E-Mail}.

Branch 2 – Service Requests

Identical to the IR branch, except with IR replaced by SR.

Scripts:

(IR) Get WorkItem Affected User Email

$ErrorActionPreference = &amp;amp;amp;quot;Stop&amp;amp;amp;quot;
try
{
    $username = &amp;amp;amp;quot;SCSM Scripts Account Username&amp;amp;amp;quot;
    $password = &amp;amp;amp;quot;SCSM Scripts Account Password&amp;amp;amp;quot;
    $scObjGuid = &amp;amp;amp;quot;scObjGuid from Get IR&amp;amp;amp;quot;
    $scObjType = &amp;amp;amp;quot;incident&amp;amp;amp;quot;
    $targetServer = &amp;amp;amp;quot;your target server&amp;amp;amp;quot;
    $securePassword = $password | ConvertTo-SecureString -AsPlainText -Force
    $creds = New-Object System.Management.Automation.PSCredential -ArgumentList $username,$securePassword
    $retval = Invoke-Command -Credential $creds -ComputerName $targetServer  -ScriptBlock { 
        $scObjGuid = $args[0]
        $scObjType = $args[1]
        &amp;amp;amp;amp; C:\Scripts\Get-ScsmWiAffectedUserEmailAddr.ps1 &amp;amp;amp;quot;$scObjGuid&amp;amp;amp;quot; &amp;amp;amp;quot;$scObjType&amp;amp;amp;quot;
    } -ArgumentList $scObjGuid, $scObjType
}
Catch
{
    Throw $_.Exception
}

Get-ScsmWiAffectedUserEmailAddr.ps1

Import-Module SMLets
$scObjGuid = $args[0]
$scObjType = $args[1]

Switch($scObjType) {
	&amp;amp;amp;quot;incident&amp;amp;amp;quot; {
		$wiClassName = &amp;amp;amp;quot;System.WorkItem.Incident$&amp;amp;amp;quot;
		$relationshipClassName = &amp;amp;amp;quot;System.WorkItemAffectedUser$&amp;amp;amp;quot;
	}
	&amp;amp;amp;quot;service request&amp;amp;amp;quot; {
		$wiClassName = &amp;amp;amp;quot;System.WorkItem.ServiceRequest$&amp;amp;amp;quot;
		$relationshipClassName = &amp;amp;amp;quot;System.WorkItemAffectedUser$&amp;amp;amp;quot;
	}
}

If($wiClassName -ne $null) {
	$wiClass = Get-SCSMClass $wiClassName
	$relationshipClass = Get-SCSMRelationshipClass $relationshipClassName
}

If($wiClass -ne $null -and $relationshipClassName -ne $null) {
	$wiFilter = &amp;amp;amp;quot;Id -eq '&amp;amp;amp;quot; + $scObjGuid + &amp;amp;amp;quot;'&amp;amp;amp;quot;
	$scObj = Get-SCSMObject -Class $wiClass -filter $wiFilter
	If ($scObj -ne $null) {
		$affectedUser = Get-SCSMRelatedObject -SMObject $scObj -Relationship $relationshipClass
	}
}

$emailAddr = &amp;amp;amp;quot;&amp;amp;amp;quot;
#ref: http://blogs.litware.se/?p=796
If($affectedUser -ne $null) {
	$userGUID = $affectedUser.Get_ID()
	$userPref = Get-SCSMRelationshipClass &amp;amp;amp;quot;System.UserHasPreference$&amp;amp;amp;quot;
	$endPoint = Get-SCSMRelatedObject -SMObject $affectedUser -Relationship $userPref|?{$_.DisplayName -like &amp;amp;amp;quot;*SMTP&amp;amp;amp;quot;}
	$readEmailaddr = $endPoint.TargetAddress
	If($readEmailaddr.length -ge 0) {
		$emailAddr = $readEmailAddr
	}
	Else {}
}

$emailAddr

(IR) Generate Email Message

$ErrorActionPreference = &amp;amp;amp;quot;Stop&amp;amp;amp;quot;
try
{
    $username = &amp;amp;amp;quot;SCSM Scripts Account Username&amp;amp;amp;quot;
    $password = &amp;amp;amp;quot;SCSM Scripts Account Password&amp;amp;amp;quot;
    $scObjGuid = &amp;amp;amp;quot;scObjGuid from Get IR&amp;amp;amp;quot;
    $scObjType = &amp;amp;amp;quot;incident&amp;amp;amp;quot;
    $targetServer = &amp;amp;amp;quot;your target server&amp;amp;amp;quot;
    $securePassword = $password | ConvertTo-SecureString -AsPlainText -Force
    $creds = New-Object System.Management.Automation.PSCredential -ArgumentList $username,$securePassword
    $retval = Invoke-Command -Credential $creds -ComputerName $targetServer -ScriptBlock { 
        $scObjGuid = $args[0]
        $scObjType = $args[1]
        &amp;amp;amp;amp; C:\Scripts\generate-NewWorkItemNotification.ps1 &amp;amp;amp;quot;$scObjGuid&amp;amp;amp;quot; &amp;amp;amp;quot;$scObjType&amp;amp;amp;quot;
    } -ArgumentList $scObjGuid, $scObjType
}
Catch
{
    Throw $_.Exception
}

generate-NewWorkItemNotification.ps1

Note, you will need to heavily modify this script to suit your needs, and to strip out my information. I’ll have a templated version up as soon as I can, but am providing this in the meantime.

Here is what the final output looks like. I created the template in MS Word, then saved it as HTML, changed the formatting, and inserted it into the PowerShell script below. I got the idea for the template from another blog post which I cannot find. I try to always credit folks, so if you notice something familiar please let me know. Cross-linking and credit benefits everyone!

2.2.4-2

$scObjGuid = $args[0]
$scObjType = $args[1]
$emailBodyText = &amp;amp;amp;quot;&amp;amp;amp;quot;

Import-Module SMLets

#get the classes all lined up
Switch($scObjType) {
	&amp;amp;amp;quot;incident&amp;amp;amp;quot; {
		$wiClassName = &amp;amp;amp;quot;System.WorkItem.Incident$&amp;amp;amp;quot;
		$commentRelationshipClass = &amp;amp;amp;quot;System.WorkItem.TroubleTicketHasAnalystComment$&amp;amp;amp;quot;
		$queueProperty = &amp;amp;amp;quot;Impact&amp;amp;amp;quot;
	}
	&amp;amp;amp;quot;service request&amp;amp;amp;quot; {
		$wiClassName = &amp;amp;amp;quot;System.WorkItem.ServiceRequest$&amp;amp;amp;quot;
		$commentRelationshipClass = &amp;amp;amp;quot;System.WorkItemHasCommentLog$&amp;amp;amp;quot;
		$queueProperty = &amp;amp;amp;quot;Priority&amp;amp;amp;quot;
	}
}

#get the scsm work item (wi) object
If($wiClassName -ne $null) {
	$wiClass = Get-SCSMClass $wiClassName
	$wiFilter = &amp;amp;amp;quot;ID -eq '&amp;amp;amp;quot; + $scObjGuid + &amp;amp;amp;quot;'&amp;amp;amp;quot;
	$scObj = Get-SCSMObject -Class $wiClass -Filter $wiFilter
}

#get the WI info and body text
If($scObj -ne $null) {	
	$commentRelationship = get-scsmrelationshipclass $commentRelationshipClass
	$commentObj = Get-SCSMRelatedObject -SMObject $scObj -Relationship $commentRelationship
	$commentStr = $commentObj.Comment
	$emailBodyText = $null
	If($commentStr -ne $null -and $commentStr -ne &amp;amp;amp;quot;&amp;amp;amp;quot;) {
		#sanitize a little
		While($commentStr -like &amp;amp;amp;quot;*&amp;amp;amp;gt;*&amp;amp;amp;quot;) {$commentStr = $commentStr.Replace(&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;quot;,&amp;amp;amp;quot;&amp;amp;amp;quot;)}
		While($commentStr -like &amp;amp;amp;quot;*&amp;amp;amp;lt;*&amp;amp;amp;quot;) {$commentStr = $commentStr.Replace(&amp;amp;amp;quot;&amp;amp;amp;lt;&amp;amp;amp;quot;,&amp;amp;amp;quot;&amp;amp;amp;quot;)}
		While($commentStr -like &amp;amp;amp;quot;*&amp;amp;amp;quot;&amp;amp;amp;quot;*&amp;amp;amp;quot;) {$commentStr = $commentStr.Replace(&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;quot;,&amp;amp;amp;quot;&amp;amp;amp;quot;)}
		While($commentStr -like &amp;amp;amp;quot;*'*&amp;amp;amp;quot;) {$commentStr = $commentStr.Replace(&amp;amp;amp;quot;'&amp;amp;amp;quot;,&amp;amp;amp;quot;&amp;amp;amp;quot;)}
		$commentStr = $commentStr.Replace(&amp;amp;amp;quot;`n&amp;amp;amp;quot;,&amp;amp;amp;quot;&amp;amp;amp;lt;br&amp;amp;amp;gt;&amp;amp;amp;quot;)
		$emailBodyText = $commentStr
	}
	$wiTitle = $scObj.Title
	$wiUrgency = $scObj.Urgency.DisplayName
	$wiQueue = $scObj.$queueProperty.DisplayName
	$wiStatus = $scObj.Status.DisplayName
	$wiId = $scObj.ID
	$wiCreatedDate = $scObj.CreatedDate
	
	#$affectedUserClassName = &amp;amp;amp;quot;System.Domain.User$&amp;amp;amp;quot;
	#$affectedUserClassObj = Get-SCSMClass $affectedUserClassName
	$affectedUserRelationshipClassName = &amp;amp;amp;quot;System.WorkItemAffectedUser$&amp;amp;amp;quot;
	$affectedUserRelationshipClassObj = Get-SCSMRelationshipClass $affectedUserRelationshipClassName
	$affectedUserObj = Get-SCSMRelatedObject -SMObject $scObj -Relationship $affectedUserRelationshipClassObj
	If($affectedUserObj -ne $null) {
		$affectedUserDisplayName = $affectedUserObj.DisplayName
	}
	Else {
		$affectedUserDisplayName = &amp;amp;amp;quot;ESL Member&amp;amp;amp;quot;
	}
}

$htmlBody = &amp;amp;amp;quot;&amp;amp;amp;quot;
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;html&amp;amp;amp;gt;

&amp;amp;amp;lt;head&amp;amp;amp;gt;
&amp;amp;amp;lt;meta http-equiv=Content-Type content=&amp;amp;amp;quot;&amp;amp;amp;quot;text/html; charset=windows-1252&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;gt;
&amp;amp;amp;lt;meta name=Generator content=&amp;amp;amp;quot;&amp;amp;amp;quot;Microsoft Word 15 (filtered)&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;gt;
&amp;amp;amp;lt;style&amp;amp;amp;gt;
&amp;amp;amp;lt;!--
 /* Font Definitions */
 @font-face
	{font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Cambria Math&amp;amp;amp;quot;&amp;amp;amp;quot;;
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:8.0pt;
	margin-left:0in;
	line-height:105%;
	font-size:11.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
a:link, span.MsoHyperlink
	{color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:#954F72;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:8.0pt;
	margin-left:.5in;
	line-height:105%;
	font-size:11.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
p.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparagraphcxspfirst
	{mso-style-name:msolistparagraphcxspfirst;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	line-height:105%;
	font-size:11.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
p.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistparagraphcxspmiddle
	{mso-style-name:msolistparagraphcxspmiddle;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	line-height:105%;
	font-size:11.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
p.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagraphcxsplast
	{mso-style-name:msolistparagraphcxsplast;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:8.0pt;
	margin-left:.5in;
	line-height:105%;
	font-size:11.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
	{mso-style-name:msochpdefault;
	margin-right:0in;
	margin-left:0in;
	font-size:12.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
p.msopapdefault, li.msopapdefault, div.msopapdefault
	{mso-style-name:msopapdefault;
	margin-right:0in;
	margin-bottom:8.0pt;
	margin-left:0in;
	line-height:105%;
	font-size:12.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Times New Roman&amp;amp;amp;quot;&amp;amp;amp;quot;,serif;}
span.apple-converted-space
	{mso-style-name:apple-converted-space;}
.MsoChpDefault
	{font-size:10.0pt;
	font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Calibri&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--&amp;amp;amp;gt;
&amp;amp;amp;lt;/style&amp;amp;amp;gt;

&amp;amp;amp;lt;/head&amp;amp;amp;gt;

&amp;amp;amp;lt;body lang=EN-US link=&amp;amp;amp;quot;&amp;amp;amp;quot;#0563C1&amp;amp;amp;quot;&amp;amp;amp;quot; vlink=&amp;amp;amp;quot;&amp;amp;amp;quot;#954F72&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;gt;

&amp;amp;amp;lt;div class=WordSection1&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;Dear &amp;amp;amp;quot;

$htmlBody += $affectedUserDisplayName
$htmlbody += &amp;amp;amp;quot;,&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;The following ESL IT Support work item has been created for
you. Please feel free to reply to this message; it will be immediately
forwarded to the ESL IT support team.&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;Body Text Reads:&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
 style='border-collapse:collapse;border:none'&amp;amp;amp;gt;
 &amp;amp;amp;lt;tr&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=935 valign=top style='width:467.5pt;border:solid windowtext 1.0pt;
  padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='color:#0070C0'&amp;amp;amp;gt;&amp;amp;amp;quot;

$htmlBody += $emailBodyText
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
 &amp;amp;amp;lt;/tr&amp;amp;amp;gt;
&amp;amp;amp;lt;/table&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;Quick Notes:&amp;amp;amp;lt;/p&amp;amp;amp;gt;


&amp;amp;amp;lt;p class=MsoListParagraph style='margin-bottom:0in;margin-bottom:.0001pt;
text-indent:-.25in;line-height:106%'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-family:Symbol'&amp;amp;amp;gt;·&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span
style='font-size:7.0pt;line-height:106%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Times New Roman&amp;amp;amp;quot;&amp;amp;amp;quot;,serif'&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;
&amp;amp;amp;lt;/span&amp;amp;amp;gt;You can track the status of this work item at the &amp;amp;amp;lt;a
href=&amp;amp;amp;quot;&amp;amp;amp;quot;https://scsm-esl-wc1.osuesl.net/SMPortal/SitePages/My%20Requests.aspx&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;gt;ESL
Service Manager Self-Service Web Portal&amp;amp;amp;lt;/a&amp;amp;amp;gt;. (Note: requires Internet Explorer and an ESL LAN or VPN connection).&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoListParagraph style='margin-bottom:0in;margin-bottom:.0001pt;
text-indent:-.25in;line-height:106%'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-family:Symbol'&amp;amp;amp;gt;·&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span
style='font-size:7.0pt;line-height:106%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Times New Roman&amp;amp;amp;quot;&amp;amp;amp;quot;,serif'&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;
&amp;amp;amp;lt;/span&amp;amp;amp;gt;The full work list of the ESL IT Support Team is available on the &amp;amp;amp;lt;a
href=&amp;amp;amp;quot;&amp;amp;amp;quot;http://sharepoint.osuesl.net&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;gt;ESL SharePoint Helpdesk Website&amp;amp;amp;lt;/a&amp;amp;amp;gt;. Choose 'IT Request Billboard' 
from the left navigation list. (Note: requires ESL LAN or VPN connection).&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoListParagraph style='margin-bottom:0in;margin-bottom:.0001pt;
text-indent:-.25in;line-height:106%'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-family:Symbol'&amp;amp;amp;gt;·&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span
style='font-size:7.0pt;line-height:106%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Times New Roman&amp;amp;amp;quot;&amp;amp;amp;quot;,serif'&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;
&amp;amp;amp;lt;/span&amp;amp;amp;gt;Make sure to place all new text for a reply at the top of the message
or it will not be read.&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;More Information on the Work Item:&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;table class=MsoTable15List1LightAccent1 border=0 cellspacing=0 cellpadding=0
 style='border-collapse:collapse'&amp;amp;amp;gt;
 &amp;amp;amp;lt;tr&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=189 valign=top style='width:94.25pt;border:none;border-bottom:solid #9CC2E5 1.0pt;
  padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;Title &amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=585 valign=top style='width:292.5pt;border:none;border-bottom:solid #9CC2E5 1.0pt;
  padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;&amp;amp;amp;quot;
$htmlBody += $wiTitle
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
 &amp;amp;amp;lt;/tr&amp;amp;amp;gt;
 &amp;amp;amp;lt;tr&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=189 valign=top style='width:94.25pt;background:#DEEAF6;padding:
  0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;ID&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=585 valign=top style='width:292.5pt;background:#DEEAF6;padding:
  0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;quot;
$htmlBody += $wiID
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
 &amp;amp;amp;lt;/tr&amp;amp;amp;gt;
 &amp;amp;amp;lt;tr&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=189 valign=top style='width:94.25pt;padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;Status&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=585 valign=top style='width:292.5pt;padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;quot;
$htmlBody += $wiStatus
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
 &amp;amp;amp;lt;/tr&amp;amp;amp;gt;
 &amp;amp;amp;lt;tr&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=189 valign=top style='width:94.25pt;background:#DEEAF6;padding:
  0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;Urgency&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=585 valign=top style='width:292.5pt;background:#DEEAF6;padding:
  0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;quot;
$htmlBody += $wiUrgency
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
 &amp;amp;amp;lt;/tr&amp;amp;amp;gt;
 &amp;amp;amp;lt;tr&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=189 valign=top style='width:94.25pt;padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;Created Date&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
  &amp;amp;amp;lt;td width=585 valign=top style='width:292.5pt;padding:0in 5.4pt 0in 5.4pt'&amp;amp;amp;gt;
  &amp;amp;amp;lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal'&amp;amp;amp;gt;&amp;amp;amp;quot;
$htmlBody += $wiCreatedDate
$htmlBody += &amp;amp;amp;quot;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
  &amp;amp;amp;lt;/td&amp;amp;amp;gt;
 &amp;amp;amp;lt;/tr&amp;amp;amp;gt;
&amp;amp;amp;lt;/table&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;Thank you,&amp;amp;amp;lt;/p&amp;amp;amp;gt;

&amp;amp;amp;lt;p class=MsoNormal&amp;amp;amp;gt;&amp;amp;amp;lt;img border=0 width=336 height=67 id=&amp;amp;amp;quot;&amp;amp;amp;quot;Picture 1&amp;amp;amp;quot;&amp;amp;amp;quot;
src=&amp;amp;amp;quot;&amp;amp;amp;quot;http://osu.edu/assets/site/images/logos/osu-emailsig.png&amp;amp;amp;quot;&amp;amp;amp;quot;
alt=&amp;amp;amp;quot;&amp;amp;amp;quot;The Ohio State University&amp;amp;amp;quot;&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;
font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;color:#333333'&amp;amp;amp;gt;&amp;amp;amp;lt;br&amp;amp;amp;gt;
&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;b&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;
color:#BB0000;background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;John Puskar, MCP&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/b&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:
9.0pt;line-height:107%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;color:#333333'&amp;amp;amp;gt;&amp;amp;amp;lt;br
style='-webkit-user-select: none;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'&amp;amp;amp;gt;
&amp;amp;amp;lt;span style='background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='orphans: auto;text-align:start;
widows: auto;-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'&amp;amp;amp;gt;Sr.
Systems Manager&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;br style='-webkit-user-select: none;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'&amp;amp;amp;gt;
&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;
color:#BB0000;background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;College of Engineering&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span
class=apple-converted-space&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;
font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;color:#333333;background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span
style='orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;
line-height:107%;font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;color:#333333;background:white'&amp;amp;amp;gt;Electroscience
Lab&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;font-family:
&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;color:#333333'&amp;amp;amp;gt;&amp;amp;amp;lt;br style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;
&amp;amp;amp;lt;span style='background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='orphans: auto;text-align:start;
widows: auto;-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'&amp;amp;amp;gt;Room
240, 1330 Kinnear Road, Columbus, OH 43212&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;br style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;
&amp;amp;amp;lt;span style='background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='orphans: auto;text-align:start;
widows: auto;-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'&amp;amp;amp;gt;614-292-5545
Office / 614-769-1231 Mobile&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;br style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;
&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;&amp;amp;amp;quot;mailto:puskar.4nokspam@osu.edu&amp;amp;amp;quot;&amp;amp;amp;quot; style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;font-family:
&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;background:white'&amp;amp;amp;gt;puskar.4nokspam@osu.edu&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;span
class=apple-converted-space&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;
font-family:&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;color:#333333;background:white'&amp;amp;amp;gt;&amp;amp;amp;lt;span
style='orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'&amp;amp;amp;gt;&amp;amp;amp;amp;nbsp;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;a
href=&amp;amp;amp;quot;&amp;amp;amp;quot;http://electroscience.osu.edu/&amp;amp;amp;quot;&amp;amp;amp;quot; style='-webkit-user-select: none;
orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'&amp;amp;amp;gt;&amp;amp;amp;lt;span style='font-size:9.0pt;line-height:107%;font-family:
&amp;amp;amp;quot;&amp;amp;amp;quot;Arial&amp;amp;amp;quot;&amp;amp;amp;quot;,sans-serif;background:white'&amp;amp;amp;gt;electroscience.osu.edu&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;
&amp;amp;amp;lt;/div&amp;amp;amp;gt;

&amp;amp;amp;lt;/body&amp;amp;amp;gt;

&amp;amp;amp;lt;/html&amp;amp;amp;gt;&amp;amp;amp;quot;

$htmlBody

Here’s a screen shot of the final runbook:

2.2.4-1

The exported runbooks will be available upon completion of this series.

Advertisements

11 thoughts on “SCSM Email Integration Part 2.2.4 – Runbook Design – SMMail_Send-InitialWiEmail

  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.3 – Runbook Design – “Process Email – SCSM Trigger Emails” | 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