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:
- On the left menu bar, click Configuration 🡪 Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Fetch Data
- Release Rules
- Close Rules (Optional – applicable only when the ticket closure status update is managed by iAutomate directly instead of RBA tool)
- 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. - On the Organization tab,
- Select the Module as Event Management, since we are configuring this data source for pulling the event data.
- Select the Service as Moogsoft Tool as we are configuring the data source for Moogsoft
- Select the Integration Type as REST, since we will be integrating through REST APIs.
- 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.
- 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.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Click Next.
Figure 2. Create Data Source (Cont.)
Figure 3. Create Data Source (Cont.)
- On the Fetch Data tab, type in the details as per the environment.
- In the Connection Details section, enter the following details:
-
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
-
Authentication Type – Select one of the Authentication Types from Basic /
Windows, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password
- Selection of OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Selection of Basic / Windows requires you to enter -
- Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
- 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)
-
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.
- Request Authentication Parameters – If the user has additional parameters, click Add Authentication Parameters under the Request Authentication Parameters tab.
- 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)
-
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_idNote: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: @@GetToolCurrentDateTimeFigure 6. URL Path Parameters
- Request Header Parameters – Please enter the request header parameters as required.
-
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" }] } - After entering the response, click Extract Keys to add the parameters in the Mandatory Parameter Mapping section.
-
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
- 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
- Click Next to proceed to Release Rules.
- On the Release Rules tab, type in the details as per the requirement.
- In the Connection Details section, enter the following details:
-
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#
- Authentication Type – Please enter the information in line with the Authentication type configured for fetching data configuration previously.
- Request Method – Select Request Method as PUT from the drop-down.
- Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
- 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)
-
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.
-
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)
- Request Header Parameters – Please enter the request header parameters as required.
-
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)
-
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)
-
Response Key Value mapping can be done as per the table below-
Sample Response Key Value Mapping
#success# Text OK - 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
- In the Connection Details section, enter the following details:
-
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
- Authentication Type – Please enter the information in line with the Authentication type configured for fetching data configuration previously.
- Request Method – Select Request Method as PUT from the drop-down.
- Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
- 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)
-
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.
-
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)
- Request Header Parameters – Please enter the request header parameters as required.
- 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)
-
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)
-
Response Key Value mapping can be done as per the below table -
Sample Response Key Value Mapping
#success# Text OK - 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.
- In the Connection Details section, enter the following details:
-
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
- Authentication Type – Please enter the information in line with the Authentication type configured for fetching data configuration previously.
- Request Method – Select Request Method as PUT from the drop-down.
- Proxy Required – Check Proxy Required, if the environment needs access to content from data sources outside the firewall.
- 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)
-
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.
-
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)
- Request Header Parameters – Please enter the request header parameters as required.
-
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)
-
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)
-
Response Key Value mapping can be done as per the below table -
Sample Response Key Value Mapping
#success# Text OK - Click Save to add the data source.
- 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:
- Go to Configuration and click Manage Data Sources.
- On the Data Sources tab, click
next to the data source
user wants to manage. -
Manage Entry Criteria screen appears.
Figure 21. Manage Entry Criteria
- Select ‘AssignedGroup’ for the Column field and ‘equals to’ for the Operator.
- Enter the sys_id of the assignment group in ServiceNow in the Value field.
-
Clause and Sub-Clause fields can also be added based on requirement.
Figure 22. Manage Entry Criteria (Cont.)
- Click Save.