Skip to main content

Service Now

The integration of ServiceNow with Yellow.ai enables your bot to efficiently manage IT service requests and streamline service desk operations mentioned below.

ActionDescription
Create ticketCreate a ticket in ServiceNow.
Update ticketUpdate a ticket in ServiceNow.
Search ticketSearch for a ticket in ServiceNow.
Upload fileUpload a file to ServiceNow.
Get fileFetch a file from ServiceNow.
Get File listFetch a file list from ServiceNow.

Connect ServiceNow with Yellow.ai

Create an app on ServiceNow to fetch instance URL, client ID and client secret and input the details in Yellow.ai to establish this integration.

Create an app on ServiceNow

  1. Go to your ServiceNow instance, search for Application Registry in the Filter Navigator.

  2. Go to New (on the top right corner) and click Create an OAuth API endpoint for external clients to create an application.

  3. Fill in the following fields:

  • Name: Enter a unique name for your application.
  • Redirect URL: Click the lock icon to open the field and add this Redirect URL.
  • Accessible from: Choose All Application Scopes and click Submit.
  1. Once the app is created, it will get listed as shown below. Click on it.

  2. Copy the Instance URL (the URL on the address bar of your Service now account(as shown below), Client ID and Client Secret. To copy the client secret, click the lock icon and then copy.

Authorize Yellow.ai to access your Service now account

In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment.

  1. Switch to the Development/Staging environment and go to Extensions > Integrations > ITSM > Service Now.

  2. In Give account name, provide a name for the integration. You can use only lowercase alphanumeric characters and underscores (_).

  3. Copy and paste the Instance URL, Client ID and Client Secret (as mentioned in the previous section)

  4. Click Connect.

  5. You will be prompted to grant authorization, click Allow.

    drawing
  6. To connect another account, click +Add Account and proceed with the previous steps. You can add a maximum of 15 accounts.

info
  1. In a two-tier environment, add account names in Development and use them in Live.
  2. In a three-tier environment, add accounts in Staging and Sandbox, and they'll be available in Production.

Manage ServiceNow actions from bot conversations

From Yellow.ai you can access your ServiceNow instance and create, update and search a ticket, upload,get file and file list.

  1. Go to Automation and create a flow that suits your use case.
  2. Go to the specific point in the conversation where you want to add the node. Click Add Node, then go to Integrations and select ServiceNow.
  1. Configure the node using the available options.

    drawing

    a. Account name: Choose the account to use for accessing a specific action.

    b. Action: Select the action to perform.

    c. Select Objects: Choose the object (Incident/Request) in which the chosen action should be performed. Get File action is an exception, the Select Objects field doesn't apply to this action.

    d. Once you choose the object, the corresponding fields for that action and object is displayed. Fill these fields by adding nodes before the ServiceNow node to collect user information, or click 'Or' to manually input the details.

    To collect the information from user, add a prompt node and store the response in a variable. Pass that variable in the respective field.

    • Parse API response: Select the function that will parse the API response(optional). To know more about how to use this, click here.
  2. Store the API response in a variable and pass it in a message node to display the response to the end user.

Configuring bot for a sample Service Now use case

Let's say that you want to fetch a ticket's information in Requests using the ticket number.

  1. Add a prompt node and collect the ticket number value in a variable.

    drawing
  1. Include the ServiceNow node wherever you want the bot to access ServiceNow and click the node.

    drawing
  • Account name: Choose the ServiceNow account in which you want to perform this action.

  • Action: Choose Search Ticket.

  • Select Objects: Choose Requests.

  • Select Fields: Choose the field based on which you want to search. Here it's Number.

  • Value: Pass the variable which contains the number value (from step 1). You can also click Or and type the value if it is a static value.

  • Parse API response: Select the function that will parse the API response(optional). To know more about how to use this, click here. Store the response in a variable.

    drawing
  1. Use a message node and pass this variable in it to display this response to the end user.

    drawing

Alternative:

You can also store the API response in a variable and use a syntax in a message node to display certain info from the API response. Refer to this article for syntaxes.

For example, you can use {{{variables.variablename.result.0.number}}} to retrieve the ticket number from the following response.

{
"result": {
"sys_updated_on": "2021-11-12 14:16:35",
"task_effective_number": "INC0010005",
"number": "INC0010005",
"sys_updated_by": "admin",
"opened_by": {
"link": "https://dev61928.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
"value": "6816f79cc0a8016401c5a33be04be441"
},
"sys_created_on": "2021-11-12 14:16:35",
"sys_domain": {
"link": "https://dev61928.service-now.com/api/now/table/sys_user_group/global",
"value": "global"
},
"state": "1",
"sys_created_by": "admin",
"knowledge": "false",
"opened_at": "2021-11-12 14:16:35",
"short_description": "This is short description",
"description": "Hardware Name : Dell Inspiron 27 7790nRequester Name : Shubhi SaxenanColor : Dark Black",
"close_notes": "",
"sys_class_name": "incident",
"closed_by": "",
"sys_id": "e788251187333010fc0763150cbb358c",
"incident_state": "1",
"urgency": "2",
"severity": "3",
"approval": "not requested",
"upon_approval": "proceed",
"category": "inquiry"
}
}