Incident Management with ITSM (ServiceNow)

This scenario is applicable when the ITSM tools are available in the client environment and both event management & iAutomate are integrated with the ITSM, which acts as a system of record. The event data flows from event management tool to the ITSM leading to a ticket, based on the probable root cause. Upon ticket creation, iAutomate picks the ticket from the ITSM tool and performs the appropriate action for resolution.

The user has the option to view the tickets and trigger the resolutions via Moogsoft as well as iAutomate console.

To create a data source, perform the following steps:

  1. On the left menu bar, click Configuration 🡪 Manage Data Sources.
  2. The Create Data Source page appears with the following tabs:
    1. Organization
    2. Fetch Data
    3. Release Rules
    4. Close Rules (Optional – applicable only when the ticket closure status update is managed by iAutomate directly instead of RBA tool)
    5. InProgress Rules (Optional – applicable only when the tickets in progress status updates is managed by iAutomate directly instead of RBA tool)
    Figure 1. Create Data Source
    Note:
    Release Rules are only applicable for the following Module types- Incident Management, Change Request Task and Service Request Task. This tab will not be activated for other module types.
  3. On the Organization tab,
    1. Select the Module as Event Management, since we are configuring this data source for pulling the event data.
    2. Select the Service as Moogsoft Tool as we are configuring the data source for Moogsoft
    3. Select the Integration Type as REST, since we will be integrating through REST APIs.
    4. Check Is ticket Closure Managed by iAutomate job if you want iAutomate to manage the ticket closure updates instead of the RBA tool. In this scenario, an additional tab Close Rules Configuration will be activated to provide further details, steps for which are mentioned later.
    5. Check “Is ticket InProgress Managed by iAutomate job” if you want iAutomate to manage the tickets in progress status updates instead of the RBA tool. In this scenario, an additional tab “InProgress Rules Configuration” will be activated for providing further details, steps for which are mentioned later.
    6. Select the Timezone to specify the time zone of the selected data source.
    7. Select Timestamp to view the present data with date and time.
    8. Click Next.
    Figure 2. Create Data Source (Cont.)
    Figure 3. Create Data Source (Cont.)
  4. On the Fetch Data tab, type in the details as per the environment.
  5. In the Connection Details section, enter the following details:
    1. URL – Type the URL which contains the placeholders that display the parameters based on the applied clause such as the number of records to be fetched, query type, date on which the data is fetched, and the order by and so on. It depends on the URL or API provided by the tool.

      Sample URL - https://url.servicenow.com/api/now/v1/table/sc_request?sysparm_fields=#Columns

    2. Authentication Type – Select one of the Authentication Types from Basic / Windows, OAuth 2.0
      1. Selection of Basic / Windows requires you to enter -
        • User Id
        • Password
      2. Selection of OAuth 2.0 requires you to enter -
        • User Id
        • Password
        • Authentication URL
    3. Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
    4. Click on Test Connection to check accessibility of URL from service. Testing the connection is not mandatory, you can still create Data source.
      Figure 4. Create Data Source (Connection Details)
      A screenshot of a computer Description automatically generated
  6. Request Authentication Parameters – If the user has additional parameters, click Add Authentication Parameters under the Request Authentication Parameters tab.
  7. Based on the Authentication Type, add the parameters mentioned in the table below.

    Sample Authentication Parameters

    Authentication Type Key Value Is Encrypted? Is Key?
    OAuth2.0 Username <username> NO YES
    OAuth2.0 Password <password> YES YES
    OAuth2.0 AuthMethod POST NO NO
    OAuth2.0 AuthPrefix Bearer NO NO
    OAuth2.0 client_id <clientID> YES YES
    OAuth2.0 client_secret <clientsecret> YES YES
    OAuth2.0 TokenKey access_token NO NO
    OAuth2.0 ResponseType JSON NO NO
    OAuth2.0 grant_type Password NO YES
    Figure 5. Create Data Source (Request Authentication Parameters for OAuth2.0)
    A screenshot of a computer Description automatically generated
  8. URL Path Parameters – Based on the URL entered earlier, please map the values to the URL Path Parameters. E.g., for the URL entered earlier, please populate the inputs below:
    Key: #Columns#
    ValueType: Text
    Value:
    number, sys_updated_on, short_description, description,assignment_group,incident_state,closed_at,category,dv_assigned_to,sys_id
    Note:
    These columns are mandatory. Users can add more columns if more data is required to be fetched from the ITSM tool.
    Key: #StartDate#
    ValueType: SQL UDF
    VALUE: @@GetFromDateTimeUsingIncidentModifiedDate
    Key: #EndDate#
    ValueType: SQL UDF
    VALUE: @@GetToolCurrentDateTime
    Figure 6. URL Path Parameters
    A screenshot of a computer Description automatically generated
  9. Request Header Parameters – Please enter the request header parameters as required.
  10. Response Body – In this section, please enter the output of URL query for one of the incidents in JSON format. A sample response is mentioned below.
    Response Body – 
    { "result": [{ "number": "INC0079154", "closed_at": "", "assignment_group": 
    { "link": "<https://my_host>", "value": "All user group" }, 
    "incident_state": "6", "sys_created_on": "2017-12-22 06:59:03", 
    "description": "Memory Utilization:10.0.0.11", "short_description":
    "Memory Utilization:localhost", "sys_updated_on": "2018-01-02 06:39:56", "category": "", "priority": "4", "sys_id": "xxxxxxxx" }] }
  11. After entering the response, click Extract Keys to add the parameters in the Mandatory Parameter Mapping section.
  12. Mandatory Parameter Mapping – Please map the mandatory parameters to the respective values as mentioned in the screenshot below -

    Sample Mandatory Parameter Mapping

    Key Value Type Value
    TicketNumber JSON.Keys result.0.number
    Summary JSON.Keys result.0.short_description
    Description JSON.Keys result.0.description
    CreationDate JSON.Keys result.0.sys_created_on
    StatusCode JSON.Keys result.0.incident_state
    ResolvedDate JSON.Keys result.0.closed_at
    LastModifiedDate JSON.Keys result.0.sys_updated_on
    Figure 7. Mandatory Parameter Mapping
    A screenshot of a computer Description automatically generated
  13. If you need to add Optional parameters, click Add Response Parameter to add more parameters. For our purpose, we will be adding a couple of extra parameters, as mentioned below, as we need them in the later section.

    Sample Optional Parameters

    Key Value Type Value
    AssignedGroup JSON.Keys result.0.assignment_group.value
    Col1 JSON.Keys result.0.sys_id
    Figure 8. Optional Parameter Mapping
    A screenshot of a computer Description automatically generated
  14. Click Next to proceed to Release Rules.
  15. On the Release Rules tab, type in the details as per the requirement.
  16. In the Connection Details section, enter the following details:
    1. URL – Type the URL of the selected service type to release the ticket. It contains the placeholders that display the parameters based on the applied clause and is dependent on the URL or API provided by the tool.

      Sample URL - https://<url>.service-now.com/api/now/table/incident/#incident#

    2. Authentication Type – Please enter the information in line with the Authentication type configured for fetching data configuration previously.
    3. Request Method – Select Request Method as PUT from the drop-down.
    4. Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
    5. Click on Test Connection to check accessibility of URL from service. Testing the connection is not mandatory, you can still create Data source.
      Figure 9. Release Rules (Connection Details)
      A screenshot of a computer Description automatically generated
  17. URL Path Parameters – Based on the URL entered earlier, please map the values to the URL Path Parameters. E.g., for the URL entered earlier, please populate the inputs below.
    Key: #incident#
    ValueType: Table Columns
    Value:
    Select from dropdown that mapped to sys_id from previous screen “Col2”
    Figure 10. Release Rules (URL Path Parameters)
    A white line with black lines Description automatically generated with medium confidence
  18. Request Header Parameters – Please enter the request header parameters as required.
  19. Request Body – In this section, please enter the request body in JSON format. A sample request is mentioned below.
    Request Body –
    {"assignment_group": "#AssignmentGroup#","work_notes": "#work_notes#" }
    Figure 11. Release Rules (Request Body)
    A screenshot of a computer Description automatically generated
  20. Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below-
    Response Body –
    {"result": "#success#"}
    Figure 12. Release Rules (Response Body)
    A screenshot of a computer Description automatically generated
  21. Response Key Value mapping can be done as per the table below-

    Sample Response Key Value Mapping

    #success# Text OK
  22. On the Close Rules tab, type in the details as per the requirement. Check Same as Release if similar configurations as mentioned in “Release Rules Configuration” are required, else proceed ahead
  23. In the Connection Details section, enter the following details:
    1. URL – Type the URL of the selected service type to release the ticket. It contains the placeholders that display the parameters based on the applied clause and are dependent on the URL or API provided by the tool.

      Sample URL - https://url.servicenow.com/api/now/v1/table/sc_request?sysparm_fields=#Columns

    2. Authentication Type – Please enter the information in line with the Authentication type configured for fetching data configuration previously.
    3. Request Method – Select Request Method as PUT from the drop-down.
    4. Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
    5. Click on Test Connection to check accessibility of URL from service. Testing the connection is not mandatory, you can still create Data source.
      Figure 13. Close Rules Configuration (Connection Details)
  24. URL Path Parameters – Based on the URL entered earlier, please map the values to the URL Path Parameters. E.g., for the URL entered earlier, please populate the below inputs.
    Key: #incident#
    ValueType: Table Columns
    Value:
    Select from dropdown that mapped to sys_id from previous screen “Col2”
    Figure 14. Close Rules (URL Path Parameters)
    A white line with black lines Description automatically generated with medium confidence
  25. Request Header Parameters – Please enter the request header parameters as required.
  26. Request Body – In this section, please enter the request body in JSON format. A sample request is mentioned below-
    Request Body -
    { "incident_state" : "6"} If you also want to add worknotes while Close ticket, use json 
    {"incident_state":"6", "work_notes": "#Notes#"}
    Figure 15. Close Rules Configuration (Request Body)
    A close-up of a computer screen Description automatically generated
  27. Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below.
    Response Body –
    { "result" : "#success#" }
    Figure 16. Close Rules Configuration (Response Body)
    A screenshot of a computer Description automatically generated
  28. Response Key Value mapping can be done as per the below table -

    Sample Response Key Value Mapping

    #success# Text OK
  29. On the InProgress Rules tab, type in the details as per the requirement. Check Same as Release if similar configurations as mentioned in “Release Rules Configuration” are required, else proceed ahead.
  30. In the Connection Details section, enter the following details:
    1. URL – Type the URL of the selected service type to release the ticket. It contains the placeholders that display the parameters based on the applied clause and are dependent on the URL or API provided by the tool.

      Sample URL - https://url.servicenow.com/api/now/v1/table/sc_request?sysparm_fields=#Columns

    2. Authentication Type – Please enter the information in line with the Authentication type configured for fetching data configuration previously.
    3. Request Method – Select Request Method as PUT from the drop-down.
    4. Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
    5. Click on Test Connection to check accessibility of URL from service. Testing the connection is not mandatory, you can still create Data source.
      Figure 17. InProgress Rules Configuration (Connection Details)
      A screenshot of a computer Description automatically generated
  31. URL Path Parameters – Based on the URL entered earlier, please map the values to the URL Path Parameters. E.g., for the URL entered earlier, please populate the inputs below.
    Key: #incident#
    ValueType: Table Columns
    Value:
    Select from dropdown that mapped to sys_id from previous screen “Col2”
    Figure 18. InProgress Rules Configuration (URL Path Parameters)
    A white rectangular object with a black stripe Description automatically generated with medium confidence
  32. Request Header Parameters – Please enter the request header parameters as required.
  33. Request Body – In this section, please enter the request body in JSON format. A sample request is mentioned below -
    Request Body –
    {"incident_state" : "2"} If you also want to add worknotes while inprogress ticket, 
    use json {"incident_state":"2", "work_notes": "#Notes#"}
    Figure 19. InProgress Rules Configuration (Request Body)
    A white background with black and blue text Description automatically generated with medium confidence
  34. Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below -
    Response Body –
    { "result" : "#success#" }
    Figure 20. InProgress Rules Configuration (Response Body)
    A screenshot of a computer Description automatically generated
  35. Response Key Value mapping can be done as per the below table -

    Sample Response Key Value Mapping

    #success# Text OK
  36. Click Save to add the data source.
  37. To bring the tickets within iAutomate scope, a specific queue needs to be configured in the ITSM tool and same has to be configured in iAutomate. This is achieved through Manage the Entry Criteria. Please follow the below steps:
    1. Go to Configuration and click Manage Data Sources.
    2. On the Data Sources tab, click next to the data source user wants to manage.
    3. Manage Entry Criteria screen appears.
      Figure 21. Manage Entry Criteria
    4. Select ‘AssignedGroup’ for the Column field and ‘equals to’ for the Operator.
    5. Enter the sys_id of the assignment group in ServiceNow in the Value field.
    6. Clause and Sub-Clause fields can also be added based on requirement.
      Figure 22. Manage Entry Criteria (Cont.)
      A black line on a white background Description automatically generated
  38. Click Save.