Integration with ServiceNow
BigFix Runbook AI integrates with ServiceNow for Incident Management (IM) by creating and managing the required IM data sources. Before creating or configuring the data source, ensure that the organization has been set up.
Incident Management
To fetch information about Incidents, usually, creation of a data source for Incident Management should suffice. However, there could be scenarios where some additional fields / values are required from CMDB for processing the tickets – recommending the relevant runbooks and parsing the tickets to extract relevant parameters, for which separate data sources for CMDB CI must be created. Here, we will cover the procedure for creating both kinds of data sources.
Create Data Source for Incident Management
To create a data source for Incident Management, perform the following steps:
- On the main menu bar, click Actions Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
- Release Rules Configuration
- Close Rules Configuration (Optional – applicable only when the ticket closure status update is managed by BigFix Runbook AI directly instead of RBA tool)
- InProgress Rules Configuration (Optional – applicable only when the ticket’s in progress status updates is managed by BigFix Runbook AI directly instead of RBA tool)
Release Rules Configuration is 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 Organization Name from the dropdown.
- Select the Module as Incident Management, since we are configuring this data source for pulling the incident tickets.
- Select the Service as Service Now Tool as we are configuring the data source for ServiceNow
- Select the Integration Type as REST, since we will be integrating through REST APIs.
- Check Is Ticket Closure Managed by BigFix Runbook AI job if you want BigFix Runbook AI to manage the ticket closure updates instead of the RBA tool. In this scenario, an additional tab Close Rules Configuration will be activated for providing further details, steps for which are mentioned later.
- Check “Is ticket InProgress Managed by BigFix Runbook AI job” if you want BigFix Runbook AI to manage the ticket’s 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.
- Click Next.
- On the Data Source tab,
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Select Analysis Enabled if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://URL.service-now.com/api/now/v1/table/incident?sysparm_fields=#Columns#&sysparm_query=sys_updated_on>=#StartDate#^sys_updated_on<=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password.
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Request Method – Select GET, POST or PUT as the Request method as per the URL configured.
- 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.
For password, click on the icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table.
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
---|---|---|---|---|
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 |
- 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: #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. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingIncidentModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- Request Header Parameters – Please enter the request header parameters as required.
- Request Body – Please enter the request body for the configured URL, if applicable.
- 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://sample.service-now.com/api/now/v1/table/sys_user_group/All user group>", "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": "123456" }] }
- 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:
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 |
- 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.
Key | Value Type | Value |
AssignedGroup | JSON.Keys | result.0.assignment_group.value |
Col1 | JSON.Keys | result.0.sys_id |
- Click Next to proceed to Release Rules Configuration.
- On Release Rules Configuration 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.
- User Id: Enter the user id for the configured ITSM.
- Password: For password, click on icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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.
- 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”
- 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#" }
- Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below.
Response Body –
{ "result" : "#success#" }
- Response Key Value mapping can be done as per the below table.
#success# | Text | OK |
- On Close Rules Configuration 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 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.
- User Id: Enter user id for the configured ITSM tool.
- Password: For password, click on icon next to it. If the password is available in plaintext, then select Input Text as Input Type and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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.
- 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”
- 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#"}
- Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below.
Response Body –
{ "result" : "#success#" }
- Response Key Value mapping can be done as per the below table.
#success# | Text | OK |
- On InProgress Rules Configuration 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 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.
- User Id Enter the user id for the configured ITSM tool.
- Password For password, click on icon next to it. If the password is available in plaintext then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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.
- 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”
- 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#"}
- Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below.
Response Body –
{ "result" : "#success#" }
- Response Key Value mapping can be done as per the below table:
#success# | Text | OK |
- Click Submit to add the data source.
- In order to bring the tickets within BigFix Runbook AI scope, a specific queue needs to be configured in the ITSM tool and the same has to be configured in BigFix Runbook AI. This is achieved through Manage the Entry Criteria. Please perform the below steps –
- Go to Action Tab and click Manage Data Sources.
- On the Data Sources tab, click next to the data source that user wants to manage. Manage Entry Criteria screen appears.
- Select ‘AssignedGroup’ for the Column field and ‘equals to’ for the Operator field.
- 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.
- Click Save.
Create Data Source for CMDB CI
To use the field values of CMDB CI for the purpose of Recommendation and Parsing by BigFix Runbook AI services, two data sources need to be created.
To create a data source for CMDB CI, please refer to Create Data Source for Incident Management.
To create a data source for CMDB CI, perform the following steps:
- On the main menu bar, click Actions Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
Release Rules Configuration is 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 Organization Name from the dropdown.
- Select the Module as CMDB CI, since we are configuring this data source for using its field value for the incidents.
- Select the Service as Service Now Tool as we are configuring the data source for ServiceNow
- Select the Integration Type as REST, since we will be integrating through REST APIs.
- Click Next.
- On the Data Source tab:
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Select Analysis Enabled if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://URL.service-now.com/api/now/v1/table/cmdb_ci_server?sysparm_fields=#Columns#&sysparm_query=sys_updated_on>=#StartDate#^sys_updated_on<=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password.
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Request Body - Select GET, POST or PUT as Request Method as per the configured URL.
- 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.
- Password For password, click on icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table.
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
---|---|---|---|---|
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 |
- 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: #Columns#
ValueType: Text
Value:
sys_id,name,category,sys_updated_on,subcategory
Note – These columns are mandatory. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingiCMDBModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- Request Header Parameters – Please enter the request header parameters as required.
- Request Body - Please enter the request body as per the configured URL, if applicable.
- 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": {
"sys_id": "c8d2f53fdbcc1490e3bbde06f4961918",
"name": "EC2AMAZ-FIHS9M1",
"category": "Application",
"subcategory": "Windows",
"sys_updated_on":"2020-06-11 12:43:56"
}
}
- 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.
Key | Value Type | Value |
ToolCIId | JSON.Keys | result.sys_id |
ToolCIName | JSON.Keys | result.name |
ToolCICategory | JSON.Keys | result.category |
- 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.
Key | Value Type | Value |
Col3 | JSON.Keys | result. subcategory |
- Click Next to proceed to Release Rules Configuration.
- Click Submit to add the data source.
Configuration of additional parameters for Recommendation and Parsing
To use the field values of CMDB CI for the purpose of Recommendation and Parsing by BigFix Runbook AI services, they need to be mapped to Incident Management.
To do so, perform the following steps -
- On the main menu bar, click Advance Configuration Parameter Manage Column.
- Select Organization Name from dropdown. Select Incident Management as the Module.
Summary, Description, RunbookToolTenantID, ModuleType are the default entries.
- Select iCMDB in Table dropdown.
- Select the column of CMDB which has to be mapped to incident in the Column dropdown. In this case, we are selecting subcategory.
- Check the fields Use For Parsing and ‘Base’ in Use For Recommendation.
- Click Save. The page lists one additional entry i.e. ‘Subcategory’, as depicted below:
- For Recommendation, above steps are sufficient. But for Parsing, additional steps are required to be performed.
- On the main menu bar, click on Advance configuration -> Parameter.
- Click Configure Parameter Type. By default, there are several entries already defined.
- Click Add New.
- Mention Parameter Type, for e.g. Category
- Select ‘Equal Search’ in the Parse By field.
- Select ‘Description’ in the Default Field Name field.
- Click Submit.
- Next step is to map this Parameter Type i.e. ‘Category’, to the one that was created via Manage Columns in earlier step by the name subcategory. To do that, perform the following steps:
- On the main menu bar, click Advance Configuration Parameter.
- Click Manage Parameter Configuration.
- Select Organization.
- Select ‘Incident Management’ as the Data Source.
- Select the newly created parameter ‘Category’ from Parameter Type dropdown.
- From the Field dropdown, select ‘subcategory’, the parameter that has been mapped via Manage Columns.
- Click Save.
- To verify whether this parameter is successfully parsed or not, perform the following steps -
- On the main menu bar, click Runbooks.
- Click Manage Runbooks.
- Select the Runbook Tool mapped with the organization.
- The parameter, Category, which was created in earlier steps, has to be added as one of the parameters to the existing runbook. You can also create a new runbook with Category as one of the parameters.
- Click the Edit icon to edit the runbook.
- In the Parameters section, add a new parameter with any relevant Parameter Name, Parameter Label, Parameter Description, Default Parameter Value. Ensure that Parameter Type is selected as Category.
- Add the parameter and click Update.
- Ensure that the runbook in which the parameter is added is mapped with the organization.
- Next step is to build the Recommendation model and to do that perform the following steps:
- On the main menu bar, click Actions -> Build Model.
- ReBuild / Re-build the model for the Organization under Incident Management module for the mapped runbook tool.
- Run the entire flow and see if the runbook recommended for the ticket in which the parameter was added has the parameter Category with its expected value.
Service Request Management
To fetch information about Service Requests, usually, creation of a data source for Service Request Tasks should suffice. However, there could be scenarios where some additional fields / values are required for processing the tickets – recommending the relevant runbooks and parsing the tickets to extract relevant parameters, for which separate data sources for Service Request and Service Request Item must be created. Here, we will cover the procedure for creating all 3 kinds of data sources.
Create Data Source for Service Request
To create a data source for Service Requests, perform the following steps:
- On the main menu bar, click Action Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
Release Rules Configuration is 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 Organization Name from the dropdown.
- In the Module field, select ‘Service Request’, since we are using this data source for using its field value for the Service Request Tasks.
- In the Service field, select Service Now Tool as we are configuring the data source for ServiceNow.
- In the Integration Type field, select REST API, since we will be integrating through REST APIs.
- Click Next.
- On the Data Source tab,
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Is Datetime to view the present data with date and time.
- Select Analysis Enabled if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration tab, populate 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://URL.service-now.com/api/now/v1/table/ sc_request?sysparm_fields=#Columns#&sysparm_query=sys_updated_on>=#StartDate#^sys_updated_on<=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Request Body – Select the GET, POST or PUT as Request Method as per the configured URL.
- 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.
- Password For password, click on icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table:
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
---|---|---|---|---|
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 |
- 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: #Columns#
ValueType: Text
Value:
number,sys_updated_on,sys_id,sys_created_on,short_description,description,state,request_state
Note – These columns are mandatory. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingServiceRequestModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- Request Header Parameters – Please enter the request header parameters as required.
- Request Body - Enter the request body in JSON format as per the configured URL, if applicable.
- Response Body – In this section, please enter the output of URL query for one of the service request tasks in JSON format. A sample response is mentioned below.
Response Body –
{
"result": {
"number": "REQ0011787",
"sys_id": "2ae764d5db199c14e3bbde06f496195a",
"short_description": "Test",
"request_state": "in_process",
"sys_created_on": "2020-06-08 10:34:54",
"description": "test",
"sys_updated_on": "2020-06-08 10:34:56",
"state": "2"
}
}
- 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.
Key | Value Type | Value |
TicketNumber | JSON.Keys | result.number |
Summary | JSON.Keys | result.short_description |
Description | JSON.Keys | result.description |
StatusCode | JSON.Keys | result.state |
LastModifiedDate | JSON.Keys | result.sys_updated_on |
TicketToolUID | JSON.Keys | result.sys_id |
- 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.
Key | Value Type | Value |
Col3 | JSON.Keys | result.request_state |
- Click Submit to add the data source.
Create Data Source for Service Request Tasks
To create a data source for Service Requests Tasks Management, perform the following steps:
- On the main menu bar, click Actions Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
- Release Rules Configuration
Release Rules Configuration is 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 Organization Name from the dropdown.
- In the Module field, select ‘Service Request Task’, since we are configuring this data source for pulling the service requests tasks.
- In the Service field, select Service Now Tool as we are configuring the data source for ServiceNow
- In the Integration Type field, select REST, since we will be integrating through REST APIs.
- Click Next.
- On the Data Source tab,
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Select Analysis Enabled, if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://URL.service-now.com/api/now/v1/table/sc_task?sysparm_fields=#Columns#&sysparm_query=active=true^sys_updated_on>=#StartDate#^sys_updated_on<=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Request Method - Enter the request method as GET, POST or PUT as per the configured URL.
- 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.
- Password For password, click on icon next to it. If the password is available in plaintext then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table:
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 |
- 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: #Columns#
ValueType: Text
Value:
number, sys_updated_on, short_description, description, assignment_group,closed_at,category,dv_assigned_to,sys_id,sys_created_on,state,request,request_item,sys_id
Note – These columns are mandatory. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingSRTaskModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- Request Header Parameters – Please enter the request header parameters as required.
- Request Body - Enter the request body in JSON format as per the configured URL, if applicable.
- Response Body – In this section, please enter the output of URL query for one of the service request tasks in JSON format. A sample response is mentioned below.
Response Body –
{
"result": [{"number": "TASK2190188","short_description": "For fullfillment","description": "Test", "state": "1","active": "true","sys_created_on":"2019-12-31 05:45:39","sys_id": "0701e746db9a0450b773f3731d9619ab","approval": "not requested","sys_updated_on":"2020-01-31 05:45:39”,"request": {
"link":"https://hclmtdev.servicenow.com/api/now/v1/table/sc_request/be702706db9a0450b773f3731d961907", "value": "be702706db9a0450b773f3731d961907"},
"request_item": {"link": "https://hclmtdev.service-now.com/api/now/v1/table/sc_req_item/32702706db9a0450b773f3731d961908", "value": "32702706db9a0450b773f3731d961908"
}
}]
}
- 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.
Key | Value Type | Value |
TicketNumber | JSON.Keys | result.0.number |
Summary | JSON.Keys | result.0.short_description |
Description | JSON.Keys | result.0.description |
StatusCode | JSON.Keys | result.0.state |
LastModifiedDate | JSON.Keys | result.0.sys_updated_on |
RequestItemId | JSON.Keys | result.0.request_item.value |
SRId | JSON.Keys | result.0.request.value |
CreationDate | JSON.Keys | result.0.sys_created_on |
- 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.
Key | Value Type | Value |
Col1 | JSON.Keys | result.sys_id |
- Click Next to proceed to Release Rules Configuration.
- On Release Rules Configuration 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/sc_task/#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.
- Password For password, click on icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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”
- 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#" }
- Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below.
Response Body –
{ "result" : "#success#" }
- Response Key Value mapping can be done as per the below table.
#success# | Text | OK |
- Click Submit to add the data source.
- In order to bring the tickets within BigFix Runbook AI scope, a specific queue needs to be configured in the ITSM tool and same has to be configured in BigFix Runbook AI. This is achieved through Manage the Entry Criteria. Please perform the below steps –
- Go to Actions tab 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.
- Select ‘AssignedGroup’ for the Column field and ‘equals to’ for the Operator field.
- 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.
- Click Save.
Create Data Source for Service Request Item
To create a data source for Service Requests Items, perform the following steps:
- On the main menu bar, click Actions Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
Release Rules Configuration is 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 Organization Name from the dropdown.
- In the Module field, select ‘Service Request Item’, since we are using this data source for using its field value for the Service Request Tasks.
- In the Service field, select ‘Service Now Tool’ as we are configuring the data source for ServiceNow.
- In the Integration Type field, select ‘REST API’, since we will be integrating through REST APIs.
- Click Next.
- On the Data Source tab:
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Select Analysis Enabled? if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://URL.service-now.com/api/now/v1/table/ sc_req_item?sysparm_fields=#Columns#&sysparm_query=sys_updated_on>=#StartDate#^sys_updated_on<=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password.
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Request Body – Select the request method as GET, POST or PUT as per the configured URL.
- 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.
- Password For password, click on icon next to it. If the password is available in plaintext then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table.
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 |
- 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: #Columns#
ValueType: Text
Value:
number,sys_updated_on,sys_id,sys_created_on,short_description,description,state,request,approval
Note – These columns are mandatory. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingiRequestItemModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- Request Header Parameters – Please enter the request header parameters as required.
- Request Body - Enter the request body in JSON format as per the configured URL, if applicable.
- Response Body – In this section, please enter the output of URL query for one of the service request tasks in JSON format. A sample response is mentioned below:
Response Body –
{
"result": {
"number": "RITM0011964",
"sys_id": "6ee764d5db199c14e3bbde06f496195a",
"short_description": "Can't find the right request?TEST",
"request": {
"link":"https://dryicegbpdevdemo.service-now.com/api/now/v1/table/sc_request/2ae764d5db199c14e3bbde06f496195a",
"value": "2ae764d5db199c14e3bbde06f496195a"
},
"sys_created_on": "2020-06-08 10:34:54",
"approval": "approved",
"description": "Test",
"sys_updated_on": "2020-06-08 10:35:17",
"state": "2"
}
}
- 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:
Key | Value Type | Value |
TicketNumber | JSON.Keys | result.number |
Summary | JSON.Keys | result.short_description |
Description | JSON.Keys | result.description |
StatusCode | JSON.Keys | result.state |
LastModifiedDate | JSON.Keys | result.sys_updated_on |
RequestNumber | JSON.Keys | result.request.value |
TicketToolUID | JSON.Keys | result.sys_id |
- 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.
Key | Value Type | Value |
Col2 | JSON.Keys | result.approval |
- Click Submit to add the data source.
Configuration of additional parameters for Recommendation and Parsing
To use the field values of Service Request and Service Request Item for the purpose of Recommendation and Parsing by BigFix Runbook AI services, they need to be mapped to Service Request Task.
To do so, perform the following steps -
- On the main menu bar, click Advance Configuration Parameter Manage Column.
- Select Organization Name from dropdown. Select Service Request Task as the Module.
Summary, Description, RunbookToolTenantID, ModuleType are the default entries.
- To map the column of Service Request, select iServiceRequest in Table dropdown.
- Select the column of Service Request which has to be mapped to Service Request Task in the Column dropdown. In this case, we are selecting request_state.
- Check the fields Use For Parsing and select ‘Base’ in Use For Recommendation.
- Click Save.
- To map the column of Service Request Item, select iRequestItem in Table dropdown.
- Select the column of Service Request Item which has to be mapped to Service Request Task in the Column dropdown. In this case, we are selecting approval.
- Check the fields Use For Parsing and select ‘Base’ in Use For Recommendation.
- Click Save. The page lists two additional entries, request_state and approval, as depicted below.
- For Recommendation, above steps are sufficient. But for Parsing, additional steps are required to be performed.
- On the main menu bar, click Environment.
- Click Configure Parameter Type. By default, there are several entries already defined.
- Click Add New.
- Mention Parameter Type for Service Request column, for e.g. RequestState
- Select ‘Equal Search’ in the Parse By field.
- Select ‘Description’ in the Default Field Name field.
- Click Submit.
- Click Add New.
- Mention Parameter Type for Service Request Item column, for e.g. ApprovalState.
- In the Parse By field, select ‘Equal Search’.
- In the Default Field Name field, select ‘Description’.
- Click Submit.
- Next step is to map this Parameter Type i.e. ‘RequestState’ and ‘ApprovalState’, to the one that was created via Manage Columns in earlier step by the name ‘request_state’ and ‘approval’, respectively. To do that, perform the following steps:
- On the main menu bar, click Advance Configurations Parameter.
- Click Manage Parameter Configuration.
- Selection Organization.
- Select relevant ‘Service Request Task’ as the Data Source.
- Select the newly created parameter RequestState from Parameter Type dropdown.
- From the Field dropdown, select ‘request_state’, the parameter that has been mapped via Manage Columns.
- Click Save.
- Selection Organization.
- Select relevant ‘Service Request Task’ as the Data Source.
- Select the newly created parameter i.e. ‘ApprovalState’ from Parameter Type dropdown.
- From the Field dropdown, select ‘approval’, the parameter that has been mapped via Manage Columns.
- Click Save.
- To verify whether this parameter is successfully parsed or not, perform the following steps -
- On the main menu bar, click Runbooks.
- Click Manage Runbooks.
- Select the Runbook Tool mapped with the organization.
- The parameter, RequestState and ApprovalState, which were created in earlier steps, have to be added as the parameters to the existing runbook. You can also create a new runbook with RequestState and ApprovalState as the parameters.
- Click the Edit icon to edit the runbook.
- In the Parameters section, add two new parameters with relevant Parameter Name, Parameter Label, Parameter Description, Default Parameter Value. Ensure that Parameter Type is selected as RequestState and ApprovalState respectively.
- Add the parameters and click Update.
- Ensure that the runbook in which the parameters are added is mapped with the organization.
- Next step is to build the Recommendation model and to do that perform the following steps:
- On the main menu bar, click Actions tabs Runbooks.
- Click Build Models.
- ReBuild / Re-build the model for the Organization under Service Request Task module for the mapped runbook tool.
- Run the entire flow and see if the runbook recommended for the ticket in which the parameters were added have the parameter RequestState and ApprovalState with their expected values.
Change Request Management
To fetch information about Change Requests, usually, creation of a data source for Change Request Task should suffice. However, there could be scenarios where some additional fields / values are required from Change Request for processing the tickets – recommending the relevant runbooks and parsing the tickets to extract relevant parameters, for which separate data source for Change Request has to be created. Here, we will cover the procedure for creating both kinds of data sources.
Create Data Source for Change Request
To create a data source for Change Request, perform the following steps:
- On the main menu bar, click Actions Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
Release Rules Configuration is 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 Organization Name from the dropdown.
- Select the Module as Change Request since we are using this data source for using its field value for the change requests.
- Select the Service as Service Now Tool as we are configuring the data source for ServiceNow
- Select the Integration Type as REST, since we will be integrating through REST APIs.
- Click Next.
- On the Data Source tab:
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Select Analysis Enabled if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://URL.service-now.com/api/now/v1/table/ change_request?sysparm_fields=#Columns#&sysparm_query=active=true^ sys_updated_on >=#StartDate#^ sys_updated_on <=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- Request Body – Select the request method as GET, POST or PUT as per the configured URL.
- 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.
- Password For password, click on icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table.
Table 21– Sample Authentication Parameters– Change Request
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
---|---|---|---|---|
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 | <clientsrcret> | YES | YES |
OAuth2.0 | TokenKey | access_token | NO | NO |
OAuth2.0 | ResponseType | JSON | NO | NO |
OAuth2.0 | grant_type | Password | NO | YES |
- 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: #Columns#
ValueType: Text
Value:
number, approval,sys_updated_on,sys_created_on,short_description, description,state,due_date, change_request,sys_id,assignment_group,priority
Note – These columns are mandatory. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingIChangeRequestModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- Request Header Parameters – Please enter the request header parameters as required.
- Request Body - Enter the request body in JSON format as per the configured URL, if applicable.
- 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": {"sys_updated_on": "2018-03-18 13:59:04","number": "CHG556563","approval":"approved","priority":"4","sys_created_on": "2018-03-18 13:59:02","state": "1", "short_description": "Implementation Task", "description": "Please initiate the Implementation process.","sys_id": "d612a2a34ff85b40b2627d918110c7ef","expected_start": "2018-03-19 13:58:31",
"change_request": {"link": "https://hclgbpdev.service-now.com/api/now/v1/table/change_request/c6c12e634ff85b40b2627d918110c724","value": "c6c12e634ff85b40b2627d918110c724" },
"assignment_group":{
"link": "https://dryicegbpdevdemo.service-now.com/api/now/v1/table/sys_user_group/73be6572db1bdf00ce29b6bffe96193d",
"value": "73be6572db1bdf00ce29b6bffe96193d"
}
}}
- 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:
Key | Value Type | Value |
TicketNumber | JSON.Keys | result.number |
Summary | JSON.Keys | result.short_description |
Description | JSON.Keys | result.description |
StatusCode | JSON.Keys | result.state |
LastModifiedDate | JSON.Keys | result.sys_updated_on |
TicketToolUID | JSON.Keys | result.sys_id |
- 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.
Key | Value Type | Value |
AssignedGroup | JSON.Keys | result.assignment_group.value |
Col1 | JSON.Keys | result.sys_id |
- Click Submit to add the data source.
Create Data Source for Change Request Task
To create a data source for Change Request Task Management, perform the following steps:
- On the main menu bar, click Actions Tab Manage Data Sources.
- The Create Data Source page appears with the following tabs:
- Organization
- Data Source
- Fetch Data Configuration
- Release Rules Configuration
Release Rules Configuration is 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 Organization Name from the dropdown.
- In the Module field, select ‘Change Request Task’, since we are configuring this data source for pulling the change requests.
- In the Service field, select ‘Service Now Tool’ as we are configuring the data source for ServiceNow.
- In the Integration Type field, select REST, since we will be integrating through REST APIs.
- Click Next.
- On the Data Source tab,
- Type the new data source in the Name field.
- Select the Timezone to specify the time zone of the selected data source.
- Select Timestamp to view the present data with date and time.
- Select Analysis Enabled? if user wants to analyze the data retrieved from the data source.
- Click Next.
- On the Fetch Data Configuration 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 is dependent on the URL or API provided by the tool.
- Sample URL - https://<URL>.service-now.com/api/now/v1/table/change_task?sysparm_fields=#Columns#&sysparm_query=active=true^ sys_updated_on >=#StartDate#^ sys_updated_on <=#EndDate#^ORDERBYsys_updated_on
- Authentication Type – Select one of the Authentication Types from Basic / Windows, JWT, OAuth 2.0
- Selection of Basic / Windows requires you to enter -
- User Id
- Password
- Selection of JWT / OAuth 2.0 requires you to enter -
- User Id
- Password
- Authentication URL
- 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.
- Password For password, click on icon next to it. If the password is available in plaintext, then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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 below table.
Authentication Type | Key | Value | Is Encrypted? | Is Key? |
---|---|---|---|---|
JWT | username | <username> | NO | YES |
JWT | password | <password> | YES | YES |
JWT | AuthMethod | POST | NO | NO |
JWT | AuthPrefix | AR-JWT | NO | NO |
JWT | TokenKey | access_token | NO | NO |
JWT | ResponseType | TEXT | NO | NO |
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 | <clientsrcret> | YES | YES |
OAuth2.0 | TokenKey | access_token | NO | NO |
OAuth2.0 | ResponseType | JSON | NO | NO |
OAuth2.0 | grant_type | Password | NO | YES |
- 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: #Columns#
ValueType: Text
Value:
number, short_description, description, state, change_request, sys_updated_on, sys_created_on
Note – These columns are mandatory. User can add more columns if more data is required to be fetched from ITSM tool.
Key: #StartDate#
ValueType: SQL UDF
VALUE: @@GetFromDateTimeUsingIChangeTaskModifiedDate
Key: #EndDate#
ValueType: SQL UDF
VALUE: @@GetToolCurrentDateTime
- 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": {"sys_updated_on": "2018-03-18 13:59:04","number": "CTASK0039760","sys_created_on":
2018-03-18 13:59:02","state": "1", "short_description": "Implementation Task", "description": "Please initiate the Implementation process.","sys_id": "d612a2a34ff85b40b2627d918110c7ef”,
"change_request": {"link": "https://hclgbpdev.service-now.com/api/now/v1/table/change_request/c6c12e634ff85b40b2627d918110c724","value": "c6c12e634ff85b40b2627d918110c724" } }
}
- 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.
Key | Value Type | Value |
TicketNumber | JSON.Keys | result.number |
Summary | JSON.Keys | result.short_description |
Description | JSON.Keys | result.description |
StatusCode | JSON.Keys | result.state |
LastModifiedDate | JSON.Keys | result.sys_updated_on |
ChangeId | JSON.Keys | result.change_request.value |
CreationDate | JSON.Keys | result.sys_created_on |
- 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.
Key | Value Type | Value |
Col1 | JSON.Keys | result.sys_id |
- Click Next to proceed to Release Rules Configuration.
- On Release Rules Configuration 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/change_task/#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.
- Password For password, click on icon next to it. If the password is available in plaintext then select Input type as Input Text and enter the password in Value field. Else if it is available in any Key Vault such as CyberArk then select Input Type as CyberArk and then select any of the configured details from the value field.
- 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”
- 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#" }
- Response Body – In this section, please enter the response body in JSON format. A sample response is mentioned below.
Response Body –
{ "result" : "#success#" }
- Response Key Value mapping can be done as per the below table.
#success# | Text | OK |
- Click Submit to add the data source.
- In order to bring the tickets within BigFix Runbook AI scope, a specific queue needs to be configured in the ITSM tool and same has to be configured in BigFix Runbook AI. This is achieved through Manage Entry Criteria. Please perform the below steps:
- Go to Actions Tab 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.
- Select ‘AssignedGroup’ for the Column field and ‘equals to’ for the Operator field.
- 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.
- Click Save.
Configuration of additional parameters for Recommendation and Parsing
To use the field values of Change Request for the purpose of Recommendation and Parsing by BigFix Runbook AI services, they need to be mapped to Change Request Task.
To do so, perform the following steps -
- On the main menu bar, click Advance Configuration Parameter Manage Column.
- Select Organization Name from dropdown. Select ‘Change Request Task’ as the Module.
Note - Summary, Description, RunbookToolTenantID, ModuleType are the default entries.
- Select ‘iChangeRequest’ in Table dropdown.
- Select the column of Change Request which has to be mapped to Change Request in the Column dropdown. In this case, we are selecting ‘priority’.
- Check the fields Use For Parsing and select ‘Base’ for Use For Recommendation field.
- Click Save. The page lists one additional entry i.e. ‘priority’, as depicted below.
- For Recommendation, above steps are sufficient. But for Parsing, additional steps are required to be performed.
- On the main menu bar, click Environment.
- Click Configure Parameter Type. By default, there are several entries already defined.
- Click Add New.
- Type Parameter Type, for e.g. Priority
- Select ‘Equal Search’ as Parse By.
- Select ‘Description’ as Default Field Name.
- Click Submit.
- Next step is to map this Parameter Type ‘Category’, to the one that was created via Manage Columns in earlier step by the name priority. To do that, perform the following steps:
- On the main menu bar, click Organization.
- Click Manage Parameter Configuration.
- Selection Organization. Select ‘Change Request Task’ as the Data Source.
- Select the newly created parameter ‘Priority’ from Parameter Type dropdown.
- From the Field dropdown, select ‘priority’, the parameter that has been mapped via Manage Columns.
- Click Save.
- To verify whether this parameter is successfully parsed or not, perform the following steps:
- On the main menu bar, click Runbooks.
- Click Manage Runbooks.
- Select the Runbook Tool mapped with the organization.
- The parameter, Priority, which was created in earlier steps, has to be added as one of the parameters to the existing runbook. You can also create a new runbook with Priority as one of the parameters.
- Click the Edit icon to edit the runbook.
- In the Parameters section, add a new parameter with any relevant Parameter Name, Parameter Label, Parameter Description, Default Parameter Value. Ensure that Parameter Type is selected as Priority.
- Add the parameter and click Update.
- Ensure that the runbook in which the parameter is added is mapped with the organization.
- Next step is to build the Recommendation model and to do that perform the following steps:
- On the main menu bar, click Actions Tab Runbooks.
- Click Build Model.
- ReBuild / Re-build the model for the Organization under Change Request Task module for the mapped runbook tool.
- Run the entire flow and see if the runbook recommended for the ticket in which the parameter was added has the parameter Priority with its expected value.