ServiceNow Incident Resolution

To integrate with ServiceNow may depend on the version of ServiceNow in which they are running due to the features that are available. For calling the Polly API, the outbound REST service will need to be utilized to call out to the Polly API with a well-formatted JSON message.

There are a few ways to make an external API call to Polly when the incident state changes such as using business rules, flow, or workflows.

Create a workflow with an API trigger

  1. Create a new workflow
  2. Set the trigger to be API
  3. Add 2 Parameters to represent the audience for who the survey will go to, and the Incident number that triggered the workflow
  4. Select "audience" for the value of "Send Survey To"
ServiceNow

Configure ServiceNow

  1. Create or open a developer instance at https://developer.servicenow.com/app.do#!/instance
  2. Import this update set: Polly workflow business rule scenario.xml
    1. ServiceNow > Retrieved Update Sets
    2. Import update Set from XML
    3. Upload File
    4. Select the Polly update set you just imported
    5. Preview Update Set
    6. Commit
  3. Navigate to ServiceNow > Rest Message
    1. Select Polly API
    2. HTTP Request Tab
    3. Set x-api-token to your Polly API Token value and Update
    4. HTTP Methods
    5. Change workflows.triggers endpoint to desired environment
  4. Set your workflow ID property in ServiceNow
    1. search for "sys_properties.list " in the navigation bar of ServiceNow and hit enter to open system properties
    2. Filter the name column to "polly" and find system property called polly.incidentresolution.workflow.id
    3. Edit the value to your Polly workflow that you want to trigger and save/update
  5. Create a ServiceNow user with an email address that matches their Slack email address
  6. Create an Incident or open an existing one and set the caller to the user created/updated in step 4
  7. Resolve the incident to trigger workflow
    1. "Resolve" button to right of incident form and populate the required resolution fields

Trigger the workflow from ServiceNow

To trigger the workflow from ServiceNow, navigate to an incident and set the "Caller" field to the user you configured earlier that contains the email address matching the slack user to receive the survey.

Select "Resolve" on the top left of the incident form and populate the required fields, then select Resolve again.

Should receive a confirmation or an error about the workflow being triggered.