Servicenow
Overview
ServiceNow is a software as a service (SaaS) platform that automates businesses and streamlines their processes. It supports a variety of modules and solutions, and Leena AI integrates with its IT Service Management suite.
The ServiceNow connector enables your Leena AI Agents to integrate with your organization's ServiceNow platform, facilitating automated ticket management, service catalog operations, and IT service workflows.
API Details
Leena AI integrates with ServiceNow via REST APIs.
Documentation link:
Setup
The ServiceNow connector uses Basic Authentication.
Prerequisites
Before setting up the ServiceNow connector, ensure you have:
- Administrator access to your ServiceNow instance
- Valid ServiceNow username and password
- Access to your ServiceNow instance URL
- Access to your Leena AI workspace with connector management permissions
Get credentials
Here is how to get credentials from ServiceNow:
- Log in to ServiceNow as an admin user in your developer instance
- Navigate to your profile:
- Click on "My Profile"
- Click on "Manage Instance Password"
- Note down the following credentials (displayed on this page):
- Instance Name
- Username
- Password
- Instance URL
Add connection
Here is how to add a connection on Leena AI:
- Log in to your Leena AI workspace
- Navigate to Settings > Integrations
- Search for "ServiceNow" and select it from the list to add its new connector
- Start configuring the connector
- Connection ID: Unique identifier for this connection
- Connection Name: Descriptive name for your connection
- Auth Type: Select "Basic Auth"
- Username: Your ServiceNow username
- Password: Your ServiceNow password
- Instance URL: Your ServiceNow instance URL
- Save the connection
Use Cases
Some of the use cases that you can achieve using ServiceNow connector are below:
- Raise ticket in Leena AI: Raise a ticket through Leena AI's virtual assistant so that the ticket is raised to the relevant assignee and details are reflected in ServiceNow portal
- Raise ticket in ServiceNow: Raised tickets on ServiceNow portal to be reflected on Leena AI's virtual assistant/case management
- Ticket detail: Know ticket history (due date, closure details, assignee details, etc.) in Leena AI's virtual assistant
- Notification of ticket Status: Notified on Leena AI's virtual assistant based on the ticket status (acknowledged, closed, etc.)
- Comment on ticket: Comment on existing ticket through Leena AI's virtual assistant so that agent can receive comments and same can be reflected in ServiceNow portal
Actions
The following actions are supported for the ServiceNow connector:
| Action Name | Description |
|---|---|
| Get table | List all the available tables. |
| Create Table Record | Create entries/record in table. |
| Get records | Get the records in table entries. |
| Update Table Record | Update the record in table entries. |
| Get Table Record | Get detailed record. |
| Add Attachment | Add attachment in table. |
| Get catalogs | Retrieves a list of catalogs to which the user has access. |
| Get catalog detail | Retrieves the available information for a specified catalog. |
| Get catalog categories | Retrieves the list of available categories for the specified catalog. |
| Get category detail | Retrieves the available information for a specified category. |
| Get item | Retrieves a list of catalog items |
| Get item detail | Retrieves a specified catalog item detail. |
| Submit order | Submit Order for the specified catalog item. |
| Submit producer | Creates a record and returns the Table API relative path and redirect URL to access the created record. |
Create Table Record
Creates a new record in the specified ServiceNow table. The Agent can leverage the skill (workflow), which has been designed to insert one record into a table. This action does not support multiple record insertion (batch/bulk). Here are some common use cases:
-
Add a ticket detail in ServiceNow table: Raise a ticket through Leena AI's virtual assistant so that the ticket is raised to the relevant assignee and details are reflected in ServiceNow portal
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table Name | Name of the table in which to save the record |
Optional
| Name | Description |
|---|---|
| Sys Parm Display Name | Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences. If returning display values, the value that is returned is dependent on the field type: Choice fields (database value may be a number, but display value will be more descriptive), Date fields (database value is in UTC format, display value is based on user's time zone), Encrypted text (database value is encrypted, displayed value is unencrypted based on user's encryption context), Reference fields (database value is sys_id, display value is a display field of the referenced record). Options: true (returns display values), false (returns actual values), all (returns both) |
| Sys Parm Exclude Reference Link | Flag that indicates whether to exclude Table API links for reference fields. Options: true (exclude links), false (include links) |
| Sys Parm Fields | Comma-separated list of fields to return in the response |
| Sys Parm Input Display Value | Flag that indicates whether to set field values using the display value or the actual value. Options: true (treats input as display values and manipulates them to be stored properly in database), false (treats input as actual values and stores them without manipulation) |
| Sys Parm View | UI view for which to render the data. Determines the fields returned in the response. Options: desktop, mobile, both |
Here is a sample JSON input:
{
"Table Name": "Incident",
"Sys Parm Display Name": "true",
"Sys Parm Exclude Reference Link": "false",
"Sys Parm View": "desktop"
}Response
Upon successful creation, the action returns the created record details from the specified table.
Get Table Record
Retrieves a detailed record from a specified ServiceNow table. This action retrieves the record identified by the specified sys_id from the table. Here are some common use cases:
- Ticket detail: Know ticket history (due date, closure details, assignee details, etc.) in Leena AI's virtual assistant
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| tableName | Name of the table from which to retrieve the record |
| sys_id | Sys_id of the record to retrieve (String) |
Optional
| Name | Description |
|---|---|
| Sys Parm Display Name | Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences. If returning display values, the value that is returned is dependent on the field type: Choice fields (database value may be a number, but display value will be more descriptive), Date fields (database value is in UTC format, display value is based on user's time zone), Encrypted text (database value is encrypted, displayed value is unencrypted based on user's encryption context), Reference fields (database value is sys_id, display value is a display field of the referenced record). Options: true (returns display values), false (returns actual values), all (returns both) |
| Sys Parm Exclude Reference Link | Flag that indicates whether to exclude Table API links for reference fields. Options: true (exclude links), false (include links) |
| Sys Parm Fields | Comma-separated list of fields to return in the response |
| Sys Parm Input Display Value | Flag that indicates whether to set field values using the display value or the actual value. Options: true (treats input as display values and manipulates them to be stored properly in database), false (treats input as actual values and stores them without manipulation) |
| Sys Parm View | UI view for which to render the data. Determines the fields returned in the response. Options: desktop, mobile, both |
| Sys Query No Domain | Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured. Options: false (exclude if not in user's domain), true (include even if not in user's domain) |
Here is a sample JSON input:
{
"tableName": "Incident",
"sys_id": "1c741bd700478d83673af3",
"Sys Parm Display Name": "true",
"Sys Parm View": "desktop"
}Response
The action returns detailed information about the specified record.
Update Table Record
Updates an existing record in a ServiceNow table. The Agent can leverage the skill (workflow), which has been designed to update the specified record with the name-value pairs included in the request. Here are some common use cases:
-
Comment on ticket: Update comment on existing ticket through Leena AI's virtual assistant so that agent can receive comments and same can be reflected in ServiceNow portal
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| tableName | Name of the table in which the specified record is located |
| sys_id | Sys_id of the record to update (String) |
Optional
| Name | Description |
|---|---|
| Sys Parm Display Value | Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences. If returning display values, the value that is returned is dependent on the field type: Choice fields (database value may be a number, but display value will be more descriptive), Date fields (database value is in UTC format, display value is based on user's time zone), Encrypted text (database value is encrypted, displayed value is unencrypted based on user's encryption context), Reference fields (database value is sys_id, display value is a display field of the referenced record). Options: true (returns display values), false (returns actual values), all (returns both) |
| Sys Parm Fields | Comma-separated list of fields to return in the response |
| Sys Parm Input Display Value | Flag that indicates whether to set field values using the display value or the actual value. Options: true (treats input as display values and manipulates them to be stored properly in database), false (treats input as actual values and stores them without manipulation) |
| Sys Parm View | UI view for which to render the data. Determines the fields returned in the response. Options: desktop, mobile, both |
| Table Fields | All other fields associated with the table for which the values are to be updated |
Here is a sample JSON input:
{
"tableName": "Incident",
"sys_id": "1c741bd700478d83673af3",
"Sys Parm Display Value": "true",
"Sys Parm View": "desktop"
}Response
Upon successful update, the action returns the updated record details.
Get Catalog Detail
Retrieves detailed information for a specified service catalog. Here are some common use cases:
-
Service Catalog details: Know about the available service catalog items or list of all the catalog items available. A user can request the Leena AI bot to list/know about the available service catalog items along with description
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Catalog sys_id | Sys_id of the catalog (String) |
Optional
| Name | Description |
|---|---|
| Sys Parm view | UI view for which to render the data. Determines the fields returned in the response. Options: desktop, mobile, both |
Here is a sample JSON input:
{
"Catalog sys_id": "e0330108b837659bba8fb4",
"Sys Parm view": "desktop"
}Response
The action returns detailed information about the specified catalog including description and available items.
Get Catalog Categories
Retrieves the list of available categories for a specified service catalog. Here are some common use cases:
-
A user can request Leena AI virtual assistant to list down all the available categories for a Catalog
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Catalog sys_id | Sys_id of the catalog whose categories are requested (String) |
Optional
| Name | Description |
|---|---|
| Sys Parm Limit | Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval |
| Sys Parm Offset | Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks |
| Sys Parm view | UI view for which to render the data. Determines the fields returned in the response. Options: desktop, mobile, both |
Here is a sample JSON input:
{
"Catalog sys_id": "e0d00659bba8fb4",
"Sys Parm Limit": 10000,
"Sys Parm Offset": 1000,
"Sys Parm view": "desktop"
}Response
The action returns a list of categories available in the specified catalog.
Get Item
Retrieves a list of catalog items based on specified criteria. Here are some common use cases:
-
A user can view the items against specific categories of a service catalog. For example: Request for New email, Request for Email Alias, etc. These items can be associated with category: Cloud Services (Email)
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Catalog sys_id | Sys_id of the catalog (String) |
| Category sys_id | Sys_id of the category whose items are requested (String) |
Optional
| Name | Description |
|---|---|
| Sys Parm Limit | Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval |
| Sys Parm Offset | Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks |
| Sys Parm view | UI view for which to render the data. Determines the fields returned in the response. Options: desktop, mobile, both |
| Sys Parm Text | Specific text for which to search for in the category items. Example: sysparm_text="iPhone" or sysparm_text="Mobile devices" |
Here is a sample JSON input:
{
"Catalog sys_id": "e0d00659bba8fb4",
"Category sys_id": "e079989wbba8fb4",
"Sys Parm Limit": 10000,
"Sys Parm Offset": 1000,
"Sys Parm view": "desktop",
"Sys Parm Text": "iPhone"
}Response
The action returns a list of catalog items matching the specified criteria.
Submit Order
Submits an order for a specified catalog item. This process automates the ordering of specified catalog item for single or multiple users.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Catalog sys_id | Sys_id of the catalog (String) |
| Category sys_id | Sys_id of the category (String) |
| Item | Specified catalog item for order |
Optional
| Name | Description |
|---|---|
| Quantity | Quantity of the item |
| Variables | Name-value pairs of all mandatory cart item variables. Mandatory variables are defined on the associated form |
| Sys Parm Request For | Sys_id of the user for whom to order the specified item. Located in the User [sys_user] table |
| Sys Parm Also Request For | Comma-separated string of user sys_ids of other users for which to order the specified item. User sys_ids are located in the User [sys_user] table |
Here is a sample JSON input:
{
"Catalog sys_id": "Technical Catalog",
"Category sys_id": "Infrastructure",
"Item": "Application Server (Standard)",
"Quantity": 3,
"Variables": {
"division": "IT",
"environment": "Dev",
"purpose": "test"
},
"Sys Parm Request For": "[email protected]",
"Sys Parm Also Request For": "Lana Keels ([email protected]), Toy Neel ([email protected])"
}Response
Upon successful order submission, the action returns order confirmation details.
Submit Producer
Creates a table record (e.g., Service_request) directly from catalog. This action submits a producer request and returns the Table API relative path and redirect URL to access the created record.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Catalog sys_id | Sys_id of the catalog (String) |
| Category sys_id | Sys_id of the category (String) |
| Item | Specified catalog item for order |
Optional
| Name | Description |
|---|---|
| Variables | Name-value pairs of all mandatory cart item variables. Mandatory variables are defined on the associated form |
| Sys Parm View | UI view for which to render the data. Determines the fields returned in the response. Valid values: desktop, mobile, both |
Here is a sample JSON input:
{
"Catalog sys_id": "Technical Catalog",
"Category sys_id": "Infrastructure",
"Item": "Application Server (Standard)",
"Variables": {
"urgency": "1",
"comments": "test"
},
"Sys Parm View": "desktop"
}Response
Upon successful submission, the action returns the Table API relative path and redirect URL to access the created record.
Get Item Detail
Retrieves detailed information for a specified catalog item. Here are some common use cases:
-
Retrieves a specified category item detail. This action is used by Virtual Assistant to fetch all the relevant attributes associated with an Item, and accordingly fetch information from the user
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Catalog sys_id | Sys_id of the catalog (String) |
| Category sys_id | Sys_id of the category (String) |
| Item | Specified catalog item |
Optional
| Name | Description |
|---|---|
| Sys Parm View | UI view for which to render the data. Determines the fields returned in the response. Valid values: desktop, mobile, both |
Here is a sample JSON input:
{
"Catalog sys_id": "Technical Catalog",
"Category sys_id": "Infrastructure",
"Item": "Application Server (Standard)",
"Sys Parm View": "desktop"
}Response
The action returns detailed information about the specified catalog item including all relevant attributes.
Get Catalogs
Retrieves a list of service catalogs to which the user has access based on the passed in parameters. Here are some common use cases:
-
A user can request Virtual Assistant to list all the Catalog categories which can be availed by the user
Input Parameters
Here are the input parameters required to set up this action:
Optional
| Name | Description |
|---|---|
| Sys Parm Limit | Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval |
| Sys Parm Text | Specific text for which to search for in the category items. Example: sysparm_text="iPhone" or sysparm_text="Mobile devices" |
| Sys Parm View | UI view for which to render the data. Determines the fields returned in the response. Valid values: desktop, mobile, both |
Here is a sample JSON input:
{
"Sys Parm Limit": 10000,
"Sys Parm Text": "iPhone",
"Sys Parm View": "desktop"
}Response
The action returns a list of catalogs accessible to the user.
Updated about 20 hours ago
