SCSM Email Integration Part 2.1.1 – New Work Items – SCSM Configuration

Navigation:

Introduction

Note: Edited to add SMLets step.

Alright! Here’s how to get System Center Service Manager to email an end-user when a new work item is created. We will be using System Center Orchestrator to extend SCSM’s built-in notifications functionality in order to obtain the level of customization desired.

The Design

OK, this will seem like a bit of a mousetrap, but it works well for the scale at which I need. Don’t judge too harshly! There are much better ways of doing this, but they are harder for a first-pass or proof-of-concept (example: use an orchestrator runtime database for triggers, or use orchestrator sql query activities to access the scsm db directly and bypass the SCSM ‘notifications’ dependency, etc.).

  1. When a ticket is created, we will use SCSM’s built-in notification capability to send a trigger email to the helpdesk mail account.
  2. Orchestrator will periodically check the helpdesk’s mail account, detect the trigger email, and pass fire off a runbook.
  3. The Runbook will gather information, generate an email message, and send the message.

The Process:

  1. Configure an email account and mailbox for SCSM.
  2. Configure the SMTP service on the SCSM server.
  3. Configure the SCSM Active Directory connector.
  4. Configure SCSM Notifications:
    1. Channels
    2. Templates
    3. Subscriptions
  5. Install SMLets
  6. Create and Configure SCORCH Runbooks:
    1. Process email – General Routing
    2. Process email – Process New Work Item Notifications
    3. Process email – Send New Work Item Notifications

Step 1 – Configure Email Account

Alright, we need an email account for SCSM to send from/to, for example: helpdesk@company.com. We will be configuring SCSM to send email as this account, and configuring SCORCH to check email at this account, so it must actually have a mailbox.

This guide will assume you’ve made an exchange account, but it’s not necessary that the account be in the same domain as the SCSM server, or even a trusted domain.

One important note is that this mail account must have a corresponding active directory account. Service Manager notifications can only send to user contacts in its CI database, which is populated by AD.

To recap:

  1. Create an email account with mailbox on your email server.
  2. Create an AD account to represent this mailbox to SCSM (if not already done by step 1).
  3. Make sure the AD account has the email address attribute filled out.

In addition to the email account, you must make the following subfolders in the mailbox:

  • processing-complete
  • processing-failed
  • create-new-service-request (to be used later)
  • create-new-incident (to be used later)

Step 2 – Configure SMTP Service on SCSM Server

You can skip this step if desired, but I like my servers to send email directly. I’m sure this is vestigial.

  1. In PowerShell as Admin:
    Install-WindowsFeature smtp-server -IncludeAllSubFeature -IncludeManagementTools
  2. Launch IIS 6.0 Manager and expand the tree.
  3. Right-click SMTP Virtual Server #1 and choose ‘Properties’.
  4. On the ‘General’ tab, ensure that logging is enabled.
  5. On the ‘Access’ tab click the button labeled ‘Relay…’
  6. On the ‘Relay Restrictions’ screen, click the radio button labeled ‘only the list below’.
  7. Still on the ‘Relay Restrictions’ screen, click the button labeled ‘Add’, then the radio button ‘Domain’, then enter the computer’s FQDN into the text box.
  8. Click ‘OK’ three times and close IIS 6.0 manager.
  9. Open the ‘Services’ mmc snap-in and find the service ‘Simple Mail Transfer Protocol (SMTP)’.
  10. Right-click the service ‘Simple Mail Transfer Protocol (SMTP)’ and choose ‘Properties’.
  11. Change the ‘startup type’ to ‘Automatic’.

Great! Now we can send mail locally.

Step 3 – Configure SCSM ADDS Connector

In order to send mail, we need to know who we’re sending to. We’ll use ADDS to populate SCSM’s ‘Configuration Items’ database with user objects who have SMTP notification addresses.

  1. Create an account in active directory to use for the SCSM ADDS Connector. I recommend a name such as ‘scsm-con-adds’.
  2. Give this new account local admin rights on the SCSM server.
  3. Open SCSM Console -> Administration -> Connectors.
  4. Click ‘Create Connector’ -> ‘Active Directory Connector’
  5. On the ‘General’ screen enter a name such as ‘SCSM ADDS Connector’, then click ‘Next’.
  6. On the ‘Domain/OU’ screen, choose your domain and add the SCSM ADDS Connector account created in a previous step.
  7. On the ‘Select Objects’ screen, check ‘All computers, printers, users, and groups’, then click ‘Next’.
  8. Continue until the wizard is completed.
  9. In SCSM Console -> Administration -> Connectors, ensure that the new connector is enabled, then select it and click ‘Synchronize Now’ from the actions bar.

Congrats! You should now have users under SCSM Console -> Configuration Items -> Users.

Step 4 – Configure SCSM Notifications

This part is pretty tricky and has 3 subsections.

Part A – Configure SCSM Notification Channels

  1. Open SCSM Console -> Administration -> Notifications -> Channels
  2. Select ‘E-Mail Notification Channel’ and choose ‘Properties’ from the action bar.
  3. On the ‘Configure E-Mail Notification Channel’ screen, check the checkbox next to ‘Enable e-mail notifications’.
  4. Still on the ‘Configure E-Mail Notification Channel’ screen, click ‘Add’.
  5. On the ‘Add SMTP Server’ screen, enter the FQDN of the SCSM server, then click ‘OK’.
  6. Back on the ‘Configure E-Mail Notification Channel’ screen, enter your helpdesk’s email address under ‘Return e-mail address’.

Part B – Configure SCSM Notification Templates

We will need to configure two notification templates, one for Service Requests, and one for Incidents.

Subpart i – Notification Template for Incidents

  1. Open SCSM Console -> Administration -> Notifications -> Templates
  2. Choose ‘Create E-Mail Notification Template’ from the action bar.
  3. On the ‘Create E-Mail Notification Template’ -> ‘General’ screen, enter the name ‘Notify Orchestrator to Send Initial Email – IR’.
  4. Still on the ‘General’ screen, click the button labeled ‘Browse’ next to ‘Targeted class:’ and chose ‘Incident’.
  5. Still on the ‘General’ screen, click the button labeled ‘New’ next to ‘Management Pack’. Create a new management pack to store this template with a name such as ‘SCSM Email Customizations’.
  6. Click ‘Next’ to proceed to the ‘Template Design’ screen.
  7. On the ‘Template Design’ screen, ensure that the message will be sent in plain-text format by clearing the checkbox named ‘Send as HTML’. This checkbox should not be checked.
  8. Still on the ‘Template Design’ screen, enter the following text for both ‘Message Subject’ and ‘Message Body’:
    SCSM_Trigger_InitialEmail for $Context/Property[Type=’WorkItem!System.WorkItem’]/Id$

Subpart ii – Notification Template for Service Requests

  1. Open SCSM Console -> Administration -> Notifications -> Templates
  2. Choose ‘Create E-Mail Notification Template’ from the action bar.
  3. On the ‘Create E-Mail Notification Template’ -> ‘General’ screen, enter the name ‘Notify Orchestrator to Send Initial Email – SR’.
  4. Still on the ‘General’ screen, click the button labeled ‘Browse’ next to ‘Targeted class:’ and chose ‘Service Request’
  5. Still on the ‘General’ screen, choose the Management Pack created in the previous section.
  6. Click ‘Next’ to proceed to the ‘Template Design’ screen.
  7. On the ‘Template Design’ screen, ensure that the message will be sent in plain-text format by clearing the checkbox named ‘Send as HTML’. This checkbox should not be checked.
  8. Still on the ‘Template Design’ screen, enter the following text for both ‘Message Subject’ and ‘Message Body’. Note that this text is slightly different than the text for the incident.
    SCSM_Trigger_InitialEmail for $Context/Property[Type=’WorkItem2!System.WorkItem’]/Id$

PART C – CONFIGURE SCSM NOTIFICATION Subscriptions

We will again need two, one for Service Requests, and one for Incidents.

Subpart i – Subscription for Incidents

  1. Open SCSM Console ->  -> Administration -> Notifications -> Subscriptions
  2. Choose ‘Create Subscription’ from the Action Bar.
  3. On the ‘Create E-Mail Notification Subscription’ -> ‘General’ Screen, enter a name such as ‘Notify on New Incident’.
  4. Still on the ‘General’ screen, under the section ‘When to notify’, choose ‘When an object of the selected class is created’.
  5. Still on the ‘General’ screen, under the section ‘Targeted class:’, choose ‘Incident’.
  6. Still on the ‘General’ screen, under the section ‘Management pack’, choose the management pack created in a previous step.
  7. Click ‘Next’ to proceed to the ‘Additional Criteria’ screen.
  8. Make no changes on the ‘Additional Criteria’ screen, then click ‘Next’ to proceed to the ‘Template’ screen.
  9. On the ‘Template’ screen, choose the E-Mail template created in a previous step, then click ‘Next’.
  10. On the ‘Recipient’ screen, select the AD user which represents the helpdesk email account which we will configure Orchestrator to check. This AD user should have been created in the first step of this guide.
  11. Click ‘Next’ to proceed to the ‘Related Recipients’ screen.
  12. Complete the wizard with no other customization.

Subpart ii – Subscription for Service Requests

  1. Open SCSM Console ->  -> Administration -> Notifications -> Subscriptions
  2. Choose ‘Create Subscription’ from the Action Bar.
  3. On the ‘Create E-Mail Notification Subscription’ -> ‘General’ Screen, enter a name such as ‘Notify on New Service Request’.
  4. Still on the ‘General’ screen, under the section ‘When to notify’, choose ‘When an object of the selected class is created’.
  5. Still on the ‘General’ screen, under the section ‘Targeted class:’, choose ‘Service Request’.
  6. Still on the ‘General’ screen, under the section ‘Management pack’, choose the management pack created in a previous step.
  7. Click ‘Next’ to proceed to the ‘Additional Criteria’ screen.
  8. Make no changes on the ‘Additional Criteria’ screen, then click ‘Next’ to proceed to the ‘Template’ screen.
  9. On the ‘Template’ screen, choose the E-Mail template created in a previous step, then click ‘Next’.
  10. On the ‘Recipient’ screen, select the AD user which represents the helpdesk email account which we will configure Orchestrator to check. This AD user should have been created in the first step of this guide.
  11. Click ‘Next’ to proceed to the ‘Related Recipients’ screen.
  12. Complete the wizard with no other customization.

Step 5 – Install SMLets

SMLets are community-developed PowerShell cmdlets for Service Manger. Orchestrator will use SMLets on the SCSM server via PowerShell remoting.

  1. Obtain SMLets from the SMLets Codeplex Page.
  2. Install SMLets on the SCSM Server via the MSI.

Step 6 – SCORCH Runbooks

This will be covered in a blog post named ‘How I Handle SCSM Email Integration – Part 2.2.1 – End-User notification upon ticket creation’.

Advertisements

6 thoughts on “SCSM Email Integration Part 2.1.1 – New Work Items – SCSM Configuration

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

  2. Pingback: SCSM Email Integration Part 2.2.1 – New Work Items – Scorch Configuration | windowsmasher

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

  4. Pingback: SCSM Email Integration Part 2.2.3 – Runbook Design – “Process Email – SCSM Trigger Emails” | windowsmasher

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

  6. 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