ServiceNow Deprecated

Deprecated. Use the ServiceNow v2 integration instead.

Case Management · ServiceNow

Details

IDServiceNow
ProviderServiceNow
CategoryCase Management
From Version5.0.0
Docker Imagedemisto/python:2.7.18.20958
Supported ModulesAttack Surface Management Exposure Management Agentix Cortex Cloud Cloud Runtime Security Cloud Posture Security XSIAM EDR

README

Deprecated. Use the ServiceNow v2 integration instead.

This integration was integrated and tested with the London version of ServiceNow.

Use cases

  1. Get, update, create, delete ServiceNow tickets, in addition to adding links/comments and uploading files to them.
  2. Fetch newly created incidents.
  3. Get, update, create, delete records from any ServiceNow table.

Wrapper Scripts

There are 3 scripts that serve as examples for wrapping the following generic commands:
servicenow-query-table - ServiceNowQueryIncident
servicenow-create-record - ServiceNowCreateIncident
servicenow-update-record - ServiceNowUpdateIncident

You can use these scripts if you want to wrap these commands around a ServiceNow table of your choice. These scripts are wrapped around the incident table, so to wrap them around another table simply copy the scripts and edit the code, arguments and outputs accordingly.

Configure ServiceNow on Cortex XSOAR

To use ServiceNow on Cortex XSOAR, ensure your user account has the rest_api_explorer and web_service_admin roles. These roles are required to make API calls. However, they may not suffice for viewing records in some tables. Please make sure you have the correct role so you have permissions to work with the relevant table.

  1. Navigate to Settings > Integrations > Servers `&` Services.
  2. Search for ServiceNow.
  3. Click Add instance to create and configure a new integration instance.
    • Name: a textual name for the integration instance.
    • ServiceNow URL, in the format https://company.service-now.com/
    • Username
    • Use system proxy settings
    • Trust any certificate (not secure)
    • Default ticket type for running ticket commands and fetching incidents. Can be incident, sc_request, problem or change_reuquest. Commands also take ticket_type argument
    • ServiceNow API Version (e.g. 'v1')
    • Fetch incidents: The query to use when fetching incidents, and how many incidents to fetch each time.
    • The query to use when fetching ServiceNow incidents
    • How many ServiceNow incidents to fetch each time
    • Incident type
    • Get incident attachments
  4. Click Test to validate the URLs, token, and connection.

Cortex XSOAR engine: If relevant, select the engine that acts as a proxy to the IMAP server.
Engines are used when you need to access a remote network segments and there are network devices such as proxies, firewalls, etc. that prevent the Cortex XSOAR server from accessing the remote networks. For more information, see:
Cortex XSOAR 6.13 - Engines
Cortex XSOAR 8 Cloud- Engines
Cortex XSOAR 8.7 On-prem - Engines.

Fetched Incidents Data

The integration fetches newly created tickets according to the following parameters, which you define in the instance configuration: ticket_type, query, and limit. For the first fetch, the integration will fetch incidents that were created 10 minutes earlier. After that, it will fetch incidents that were created after the timestamp of the last fetch.

Data:

{
    "result": [
        {
            "active": "false",
            "activity_due": "",
            "additional_assignee_list": "",
            "approval": "",
            "approval_history": "",
            "approval_set": "",
            "assigned_to": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/46b87022a9fe198101a78787e40d7547",
                "value": "46b87022a9fe198101a78787e40d7547"
            },
            "assignment_group": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user_group/d625dccec0a8016700a222a0f7900d06",
                "value": "d625dccec0a8016700a222a0f7900d06"
            },
            "business_duration": "1970-01-22 21:46:21",
            "business_service": "",
            "business_stc": "1892781",
            "calendar_duration": "1970-04-02 20:46:21",
            "calendar_stc": "7937181",
            "caller_id": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/5137153cc611227c000bbd1bd8cd2005",
                "value": "5137153cc611227c000bbd1bd8cd2005"
            },
            "category": "network",
            "caused_by": "",
            "child_incidents": "",
            "close_code": "Closed/Resolved by Caller",
            "close_notes": "Closed before close notes were made mandatory\n\t\t",
            "closed_at": "2018-02-21 23:10:06",
            "closed_by": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/9ee1b13dc6112271007f9d0efdb69cd0",
                "value": "9ee1b13dc6112271007f9d0efdb69cd0"
            },
            "cmdb_ci": {
                "link": "https://dev56245.service-now.com/api/now/table/cmdb_ci/b0c4030ac0a800090152e7a4564ca36c",
                "value": "b0c4030ac0a800090152e7a4564ca36c"
            },
            "comments": "",
            "comments_and_work_notes": "",
            "company": "",
            "contact_type": "",
            "correlation_display": "",
            "correlation_id": "",
            "delivery_plan": "",
            "delivery_task": "",
            "description": "User can't access email on mail.company.com.\n\t\t",
            "due_date": "",
            "escalation": "0",
            "expected_start": "",
            "follow_up": "",
            "group_list": "",
            "hold_reason": "",
            "impact": "1",
            "incident_state": "7",
            "knowledge": "false",
            "location": {
                "link": "https://dev56245.service-now.com/api/now/table/cmn_location/1083361cc611227501b682158cabf646",
                "value": "1083361cc611227501b682158cabf646"
            },
            "made_sla": "false",
            "notify": "1",
            "number": "INC0000001",
            "opened_at": "2018-02-20 23:09:51",
            "opened_by": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/681ccaf9c0a8016400b98a06818d57c7",
                "value": "681ccaf9c0a8016400b98a06818d57c7"
            },
            "order": "",
            "parent": "",
            "parent_incident": "",
            "priority": "1",
            "problem_id": {
                "link": "https://dev56245.service-now.com/api/now/table/problem/9d3a266ac6112287004e37fb2ceb0133",
                "value": "9d3a266ac6112287004e37fb2ceb0133"
            },
            "reassignment_count": "1",
            "reopen_count": "",
            "reopened_by": "",
            "reopened_time": "",
            "resolved_at": "2018-05-23 19:56:12",
            "resolved_by": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
                "value": "6816f79cc0a8016401c5a33be04be441"
            },
            "rfc": "",
            "severity": "1",
            "short_description": "Can't read email",
            "sla_due": "",
            "state": "7",
            "subcategory": "",
            "sys_class_name": "incident",
            "sys_created_by": "pat",
            "sys_created_on": "2016-09-21 18:24:13",
            "sys_domain": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user_group/global",
                "value": "global"
            },
            "sys_domain_path": "/",
            "sys_id": "9c573169c611228700193229fff72400",
            "sys_mod_count": "21",
            "sys_tags": "",
            "sys_updated_by": "admin",
            "sys_updated_on": "2018-05-23 20:16:07",
            "time_worked": "",
            "u_test": "",
            "upon_approval": "",
            "upon_reject": "",
            "urgency": "1",
            "user_input": "",
            "watch_list": "",
            "work_end": "",
            "work_notes": "",
            "work_notes_list": "",
            "work_start": ""
        },
        {
            "active": "true",
            "activity_due": "2018-05-23 21:51:11",
            "additional_assignee_list": "",
            "approval": "",
            "approval_history": "",
            "approval_set": "",
            "assigned_to": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/46ca0887a9fe19810191e08e51927ebf",
                "value": "46ca0887a9fe19810191e08e51927ebf"
            },
            "assignment_group": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user_group/287ebd7da9fe198100f92cc8d1d2154e",
                "value": "287ebd7da9fe198100f92cc8d1d2154e"
            },
            "business_duration": "",
            "business_service": "",
            "business_stc": "",
            "calendar_duration": "",
            "calendar_stc": "",
            "caller_id": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/5137153cc611227c000bbd1bd8cd2005",
                "value": "5137153cc611227c000bbd1bd8cd2005"
            },
            "category": "network",
            "caused_by": "",
            "child_incidents": "",
            "close_code": "",
            "close_notes": "",
            "closed_at": "",
            "closed_by": "",
            "cmdb_ci": {
                "link": "https://dev56245.service-now.com/api/now/table/cmdb_ci/b0c25d1bc0a800090168be1bfcdcd759",
                "value": "b0c25d1bc0a800090168be1bfcdcd759"
            },
            "comments": "",
            "comments_and_work_notes": "",
            "company": "",
            "contact_type": "",
            "correlation_display": "",
            "correlation_id": "",
            "delivery_plan": "",
            "delivery_task": "",
            "description": "User can't get to any of his files on the file server.",
            "due_date": "",
            "escalation": "3",
            "expected_start": "",
            "follow_up": "",
            "group_list": "",
            "hold_reason": "4",
            "impact": "1",
            "incident_state": "3",
            "knowledge": "false",
            "location": {
                "link": "https://dev56245.service-now.com/api/now/table/cmn_location/108486c7c611227500b093211aa88dcc",
                "value": "108486c7c611227500b093211aa88dcc"
            },
            "made_sla": "false",
            "notify": "1",
            "number": "INC0000002",
            "opened_at": "2018-02-14 23:07:12",
            "opened_by": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user/681ccaf9c0a8016400b98a06818d57c7",
                "value": "681ccaf9c0a8016400b98a06818d57c7"
            },
            "order": "",
            "parent": "",
            "parent_incident": "",
            "priority": "1",
            "problem_id": {
                "link": "https://dev56245.service-now.com/api/now/table/problem/9d3a266ac6112287004e37fb2ceb0133",
                "value": "9d3a266ac6112287004e37fb2ceb0133"
            },
            "reassignment_count": "1",
            "reopen_count": "",
            "reopened_by": "",
            "reopened_time": "",
            "resolved_at": "",
            "resolved_by": "",
            "rfc": "",
            "severity": "1",
            "short_description": "Network file shares access issue",
            "sla_due": "",
            "state": "3",
            "subcategory": "",
            "sys_class_name": "incident",
            "sys_created_by": "pat",
            "sys_created_on": "2016-09-10 22:30:06",
            "sys_domain": {
                "link": "https://dev56245.service-now.com/api/now/table/sys_user_group/global",
                "value": "global"
            },
            "sys_domain_path": "/",
            "sys_id": "9d385017c611228701d22104cc95c371",
            "sys_mod_count": "17",
            "sys_tags": "",
            "sys_updated_by": "admin",
            "sys_updated_on": "2018-05-23 19:51:11",
            "time_worked": "",
            "u_test": "",
            "upon_approval": "",
            "upon_reject": "",
            "urgency": "1",
            "user_input": "",
            "watch_list": "",
            "work_end": "",
            "work_notes": "",
            "work_notes_list": "",
            "work_start": ""
        }
    ]
}

Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

  1. Get ticket information: servicenow-get-ticket
  2. Create a ticket: servicenow-create-ticket
  3. Update a ticket: servicenow-update-ticket
  4. Delete a ticket: servicenow-delete-ticket
  5. Add a link to a ticket: servicenow-add-link
  6. Add a comment to a ticket: servicenow-add-comment
  7. Get ticket information for a query: servicenow-query-tickets
  8. Upload a file to a ticket: servicenow-upload-file
  9. Get record information: servicenow-get-record
  10. Query a table: servicenow-query-table
  11. Create a record in a table: servicenow-create-record
  12. Update a record in a table: servicenow-update-record
  13. Delete a record from a table: servicenow-delete-record
  14. List API fields for a table: servicenow-list-table-fields
  15. Query computers: servicenow-query-computers
  16. Query groups: servicenow-query-groups
  17. Query users: servicenow-query-users
  18. Get table names: servicenow-get-table-name
  19. Get ticket notes: servicenow-get-ticket-notes

1. Get ticket information


Retrieves ticket information by the ticket ID.

Base Command

servicenow-get-ticket

Input
Argument Name Description Required
id Ticket system ID to retrieve Optional
ticket_type Ticket type Optional
number Ticket number to retrieve Optional
get_attachments Whether to retrieve ticket attachments, default is false Optional

 

Context Output
Path Type Description
ServiceNow.Ticket.ID string ServiceNow ticket ID
ServiceNow.Ticket.OpenedBy string ServiceNow ticket opener ID
ServiceNow.Ticket.CreatedOn date ServiceNow ticket creation date
ServiceNow.Ticket.Assignee string ServiceNow ticket assignee ID
ServiceNow.Ticket.State string ServiceNow ticket state
ServiceNow.Ticket.Summary string ServiceNow ticket short summary
ServiceNow.Ticket.Number string ServiceNow ticket number
ServiceNow.Ticket.Active boolean ServiceNow ticket active
ServiceNow.Ticket.AdditionalComments string ServiceNow ticket comments
ServiceNow.Ticket.Priority string ServiceNow ticket priority
ServiceNow.Ticket.OpenedAt date ServiceNow ticket opening time
ServiceNow.Ticket.ResolvedBy string ServiceNow ticket resolver ID
ServiceNow.Ticket.CloseCode string ServiceNow ticket close code
File.Info string Attachment file info
File.Name string Attachment file name
File.Size number Attachment file size
File.SHA1 string Attachment file SHA-1
File.SHA256 string Attachment file SHA-256
File.EntryID string Attachment file entry ID
File.Type string Attachment file type
File.MD5 string Attachment file MD5

 

Command Example

!servicenow-get-ticket number=INC0010052

Context Example
{
    "ServiceNow": {
        "Ticket": {
            "Active": "true",
            "CreatedOn": "2018-09-04 08:21:33",
            "ID": "0c23f8d24f102300d316b63ca310c742",
            "Number": "INC0010052",
            "OpenedAt": "2018-09-04 08:21:33",
            "OpenedBy": "6816f79cc0a8016401c5a33be04be441",
            "Priority": "4 - Low",
            "State": "1 - New",
            "Summary": "This is a new ticket"
        }
    }
}
Human Readable Output

image

2. Create a ticket

Creates a new ServiceNow ticket.

Base Command

servicenow-create-ticket

Input
Argument Name Description Required
short_description Short description of the ticket Optional
ticket_type Ticket type Optional
urgency Ticket urgency Optional
severity Ticket severity Optional
impact Ticket impact Optional
active Set ticket as Active Optional
activity_due Set ticket ActivityDue - format "2016-07-02 21:51:11" Optional
additional_assignee_list List of assigned users to the ticket Optional
approval_history Ticket history approval Optional
approval_set Set ticket ApprovalSet - format "2016-07-02 21:51:11" Optional
assigned_to To whom the ticket is assigned Optional
business_duration Format: YYYY-MM-DD HH:MM:SS Optional
business_service Business service Optional
business_stc Business source Optional
calendar_duration Format: YYYY-MM-DD HH:MM:SS Optional
caller_id UID Format Optional
category Category of ticket Optional
caused_by UID Format Optional
close_code Ticket's close code Optional
close_notes Close notes of the ticket Optional
closed_at Format: YYYY-MM-DD HH:MM:SS Optional
closed_by User who closed the ticket Optional
cmdb_ci UID Format Optional
comments Format type journal input Optional
comments_and_work_notes Format type journal input Optional
company UID Format Optional
contact_type Contact type Optional
correlation_display Correlation display Optional
correlation_id Correlation id Optional
delivery_plan UID Format Optional
display If you want to display comments, work_notes... Optional
description Ticket description Optional
due_date Format: YYYY-MM-DD HH:MM:SS Optional
escalation Escalation Optional
expected_start Format: YYYY-MM-DD HH:MM:SS Optional
follow_up Format: YYYY-MM-DD HH:MM:SS Optional
group_list UID format list Optional
knowledge Is the ticket solved in the knowledge base Optional
location Location of the ticket Optional
made_sla SLA of the ticket Optional
notify Notify about this ticket Optional
order Order number Optional
parent UID Format Optional
parent_incident UID Format Optional
problem_id UID Format Optional
reassignment_count How many users included in this ticket before Optional
reopen_count How many time the ticket has been reopened Optional
resolved_at Format: YYYY-MM-DD HH:MM:SS Optional
resolved_by UID Format Optional
rfc UID Optional
sla_due Format: YYYY-MM-DD HH:MM:SS Optional
subcategory Subcategory Optional
sys_updated_by Last updated by Optional
sys_updated_on Format: YYYY-MM-DD HH:MM:SS Optional
user_input Input from the end user Optional
watch_list A list of watched tickets Optional
work_end Format: YYYY-MM-DD HH:MM:SS Optional
work_notes Format journal list Optional
work_notes_list List with UIDs Optional
work_start Date when started to work on the ticket Optional
assignment_group Set AssignmentGroup - sys_id of group Optional
incident_state integer Optional
number Ticket number Optional
priority Priority of the ticket Optional
template Template name to use as a base to create new tickets. Optional
custom_fields Custom(user defined) fields in the format: fieldname1=value;fieldname2=value;... Optional
change_type Type of change request ticket Optional
state State of the ticket, e.g., "Closed" or "7" or "7 - Closed Optional
opened_at Time the ticket was opened (YYYY-MM-DD HH:MM:SS) Optional

 

Context Output
Path Type Description
ServiceNow.Ticket.ID string ServiceNow ticket ID
ServiceNow.Ticket.OpenedBy string ServiceNow ticket opener ID
ServiceNow.Ticket.CreatedOn date ServiceNow ticket creation date
ServiceNow.Ticket.Assignee string ServiceNow ticket assignee ID
ServiceNow.Ticket.State string ServiceNow ticket state
ServiceNow.Ticket.Summary string ServiceNow ticket short summary
ServiceNow.Ticket.Number string ServiceNow ticket number
ServiceNow.Ticket.Active boolean ServiceNow ticket active
ServiceNow.Ticket.AdditionalComments string ServiceNow ticket comments
ServiceNow.Ticket.Priority string ServiceNow ticket priority
ServiceNow.Ticket.OpenedAt date ServiceNow ticket opening time
ServiceNow.Ticket.ResolvedBy string ServiceNow ticket resolver ID
ServiceNow.Ticket.CloseCode string ServiceNow ticket close code

 

Command Example

!servicenow-create short_description="This is a new ticket" ticket_type="incident" type="normal"

Context Example
{
    "ServiceNow": {
        "Ticket": {
            "Active": "true",
            "CreatedOn": "2018-11-27 12:11:39",
            "ID": "bd5d42994f82230021ae045e9310c7bd",
            "Number": "INC0010449",
            "OpenedAt": "2018-11-27 12:11:39",
            "OpenedBy": "6816f79cc0a8016401c5a33be04be441",
            "Priority": "5 - Planning",
            "State": "1 - New",
            "Summary": "This is a new ticket"
        }
    }
}
Human Readable Output

image

3. Update a ticket


Updates a specified ServiceNow ticket.

Base Command

servicenow-update-ticket

Input
Argument Name Description Required
short_description Short description of the ticket Optional
ticket_type Ticket type Optional
urgency Ticket urgency Optional
severity Ticket severity Optional
impact Ticket impact Optional
active Does the ticket active (true/false) Optional
activity_due Format: YYYY-MM-DD HH:MM:SS Optional
additional_assignee_list List of assigned users to the ticket Optional
approval_history Ticket history approval Optional
approval_set Set ticket ApprovalSet - format "2016-07-02 21:51:11" Optional
assigned_to To whom the ticket is assigned Optional
business_duration Format: YYYY-MM-DD HH:MM:SS Optional
business_service Business service Optional
business_stc Business source Optional
calendar_duration Format: YYYY-MM-DD HH:MM:SS Optional
caller_id UID Format Optional
category Category name Optional
caused_by UID Format Optional
close_code Ticket's close code Optional
close_notes Close notes of the ticket Optional
closed_at Format: YYYY-MM-DD HH:MM:SS Optional
closed_by User who closed the ticket Optional
cmdb_ci UID Format Optional
comments Format type journal input Optional
comments_and_work_notes Format type journal input Optional
company UID Format Optional
contact_type Contact type Optional
correlation_display Correlation display Optional
correlation_id Correlation id Optional
delivery_plan UID Format Optional
display If you want to display comments, work_notes... Optional
description Ticket description Optional
due_date Format: YYYY-MM-DD HH:MM:SS Optional
escalation Escalation Optional
expected_start Format: YYYY-MM-DD HH:MM:SS Optional
follow_up Format: YYYY-MM-DD HH:MM:SS Optional
group_list UID format list Optional
knowledge Is the ticket solved in the knowledge base Optional
location Location of the ticket Optional
made_sla SLA of the ticket Optional
notify Notify about this ticket Optional
order Order number Optional
parent UID Format Optional
parent_incident UID Format Optional
problem_id UID Format Optional
reassignment_count How many users included in this ticket before Optional
reopen_count How many time the ticket has been reopened Optional
resolved_at Format: YYYY-MM-DD HH:MM:SS Optional
resolved_by UID Format Optional
rfc UID Optional
sla_due Format: YYYY-MM-DD HH:MM:SS Optional
subcategory Subcategory Optional
sys_updated_by Last updated by Optional
sys_updated_on Format: YYYY-MM-DD HH:MM:SS Optional
user_input Input from the end user Optional
watch_list A list of watched tickets Optional
work_end Format: YYYY-MM-DD HH:MM:SS Optional
work_notes Format journal list Optional
work_notes_list List with UIDs Optional
work_start Date when started to work on the ticket Optional
assignment_group UID Optional
incident_state integer Optional
number Ticket number Optional
priority Priority of the ticket Optional
id System ID of the ticket to update Required
custom_fields Custom(user defined) fields in the format: fieldname1=value;fieldname2=value;... Optional
change_type Type of Change Request ticket Optional
state State of the ticket, e.g., "Closed" or "7" or "7 - Closed Optional

 

Context Output
Path Type Description
ServiceNow.Ticket.ID string ServiceNow ticket ID
ServiceNow.Ticket.OpenedBy string ServiceNow ticket opener ID
ServiceNow.Ticket.CreatedOn date ServiceNow ticket creation date
ServiceNow.Ticket.Assignee string ServiceNow ticket assignee ID
ServiceNow.Ticket.State string ServiceNow ticket state
ServiceNow.Ticket.Summary string ServiceNow ticket short summary
ServiceNow.Ticket.Number string ServiceNow ticket number
ServiceNow.Ticket.Active boolean ServiceNow ticket active
ServiceNow.Ticket.AdditionalComments string ServiceNow ticket comments
ServiceNow.Ticket.Priority string ServiceNow ticket priority
ServiceNow.Ticket.OpenedAt date ServiceNow ticket opening time
ServiceNow.Ticket.ResolvedBy string ServiceNow ticket resolver ID
ServiceNow.Ticket.CloseCode string ServiceNow ticket close code

 

Command Example

!servicenow-update ticket_type="incident" impact="2" id="c34852514fc2230021ae045e9310c7ab"

Context Example
{
    "ServiceNow": {
        "Ticket": {
            "Active": "true",
            "CreatedOn": "2018-11-27 12:59:32",
            "ID": "c34852514fc2230021ae045e9310c7ab",
            "Number": "INC0010452",
            "OpenedAt": "2018-11-27 12:59:32",
            "OpenedBy": "6816f79cc0a8016401c5a33be04be441",
            "Priority": "4 - Low",
            "State": "1 - New"
        }
    }
}
Human Readable Output

image

4. Delete a ticket


Deletes a specified ServiceNow ticket.

Base Command

servicenow-delete-ticket

Input
Argument Name Description Required
id Ticket system ID Required
ticket_type Ticket type Optional

 

Context Output

There is no context output for this command.

Command Example

!servicenow-delete-ticket id=0c23f8d24f102300d316b63ca310c742

Human Readable Output

image

5. Add a link to a ticket


Adds a link to a specified ServiceNow ticket.

Base Command

servicenow-add-link

Input
Argument Name Description Required
id Ticket system ID Required
ticket_type Ticket type Optional
link The actual link to publish in ServiceNow ticket, valid url format, like http://www.demisto.com Required
post-as-comment Publish the link as comment on the ticket, if false will publish the link as WorkNote, format boolean Optional
text The text to represent the link Optional

 

Context Output

There is no context output for this command.

Command Example

!servicenow-add-link id="bd5d42994f82230021ae045e9310c7bd" ticket_type="incident" link="www.demisto.com" text="this is a link"

Human Readable Output

image

6. Add a comment to a ticket


Adds a comment to a specified ticket.

Base Command

servicenow-add-comment

Input
Argument Name Description Required
id Ticket system ID Required
ticket_type Ticket type Optional
comment Comment to add Required
post-as-comment Publish the link as a comment on the ticket, if false will publish the link as WorkNote, format boolean Optional

 

Context Output

There is no context output for this command.

Command Example

!servicenow-add-comment id="0c23f8d24f102300d316b63ca310c742" ticket_type="incident" comment="This is a comment"

Human Readable Output

image

7. Get ticket information from a query


Retrieves ticket information via a query.

Base Command

servicenow-query-tickets

Input
Argument Name Description Required
limit Limit for how many tickets to retrieve Optional
ticket_type Ticket type Optional
query The query to run. To learn about querying in ServiceNow, see the ServiceNow documentation. Optional
offset Starting record index to begin retrieving records from Optional

 

Context Output
Path Type Description
Ticket.ID string The unique ticket identifier
Ticket.Creator string A string field that indicates the user who created the ticket
Ticket.CreatedOn date The date and time when the ticket was created
Ticket.Assignee string Specifies the user assigned to complete the ticket. By default, this field uses a reference qualifier to only display users with the itil role.
Ticket.State string Status of the ticket
Ticket.Summary string A human-readable title for the record
Ticket.Number string The display value of the ticket
Ticket.Active boolean Specifies whether work is still being done on a task or whether the work for the task is complete
Ticket.AdditionalComments unknown Comments about the task record
Ticket.Priority string Specifies how high a priority the ticket should be for the assignee
Ticket.OpenedAt date The date and time when the ticket was opened for the first time
Ticket.Escalation string Indicates how long the ticket has been open

 

Command Example

!servicenow-query-tickets limit="10" query="impact<2^short_descriptionISNOTEMPTY" ticket_type="incident"

Context Example
{
    "ServiceNow": {
        "Ticket": [
            {
                "Active": "false",
                "Assignee": "46b87022a9fe198101a78787e40d7547",
                "CloseCode": "Closed/Resolved by Caller",
                "CreatedOn": "2016-09-21 18:24:13",
                "ID": "9c573169c611228700193229fff72400",
                "Number": "INC0000001",
                "OpenedAt": "2018-02-20 23:09:51",
                "OpenedBy": "681ccaf9c0a8016400b98a06818d57c7",
                "Priority": "1 - Critical",
                "ResolvedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "State": "7 - Closed",
                "Summary": "Can't read email"
            },
            {
                "Active": "true",
                "Assignee": "46ca0887a9fe19810191e08e51927ebf",
                "CreatedOn": "2016-09-10 22:30:06",
                "ID": "9d385017c611228701d22104cc95c371",
                "Number": "INC0000002",
                "OpenedAt": "2018-02-14 23:07:12",
                "OpenedBy": "681ccaf9c0a8016400b98a06818d57c7",
                "Priority": "1 - Critical",
                "State": "3 - On Hold",
                "Summary": "Network file shares access issue"
            },
            {
                "Active": "true",
                "Assignee": "46d44a23a9fe19810012d100cca80666",
                "CreatedOn": "2016-09-25 14:41:46",
                "ID": "e8caedcbc0a80164017df472f39eaed1",
                "Number": "INC0000003",
                "OpenedAt": "2018-02-21 23:07:30",
                "OpenedBy": "681b365ec0a80164000fb0b05854a0cd",
                "Priority": "1 - Critical",
                "State": "2 - In Progress",
                "Summary": "Wireless access is down in my area"
            },
            {
                "Active": "false",
                "Assignee": "46c6f9efa9fe198101ddf5eed9adf6e7",
                "CloseCode": "Solved (Work Around)",
                "CreatedOn": "2016-09-21 22:34:12",
                "ID": "9d3c1197c611228701cd1d94bc32d76d",
                "Number": "INC0000004",
                "OpenedAt": "2018-02-27 22:49:22",
                "OpenedBy": "681b365ec0a80164000fb0b05854a0cd",
                "Priority": "1 - Critical",
                "ResolvedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "State": "7 - Closed",
                "Summary": "Forgot email password"
            },
            {
                "Active": "false",
                "Assignee": "46c6f9efa9fe198101ddf5eed9adf6e7",
                "CloseCode": "Closed/Resolved by Caller",
                "CreatedOn": "2016-09-25 15:14:01",
                "ID": "e8e875b0c0a80164009dc852b4d677d5",
                "Number": "INC0000005",
                "OpenedAt": "2018-02-16 23:06:52",
                "OpenedBy": "6816f79cc0a8016401c5a33be04be441",
                "Priority": "1 - Critical",
                "ResolvedBy": "6816f79cc0a8016401c5a33be04be441",
                "State": "7 - Closed",
                "Summary": "CPU load high for over 10 minutes"
            },
            {
                "Active": "false",
                "Assignee": "46ca0887a9fe19810191e08e51927ebf",
                "CloseCode": "Closed/Resolved by Caller",
                "CreatedOn": "2016-09-18 20:42:01",
                "ID": "8d6246c7c0a80164012fb063cecd4ace",
                "Number": "INC0000006",
                "OpenedAt": "2018-02-20 23:08:05",
                "OpenedBy": "5136503cc611227c0183e96598c4f706",
                "Priority": "1 - Critical",
                "ResolvedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "State": "7 - Closed",
                "Summary": "Hangs when trying to print VISIO document"
            },
            {
                "Active": "true",
                "Assignee": "5137153cc611227c000bbd1bd8cd2007",
                "CreatedOn": "2014-03-10 20:43:10",
                "ID": "8d6353eac0a8016400d8a125ca14fc1f",
                "Number": "INC0000007",
                "OpenedAt": "2015-08-12 23:08:24",
                "OpenedBy": "681ccaf9c0a8016400b98a06818d57c7",
                "Priority": "1 - Critical",
                "State": "3 - On Hold",
                "Summary": "Need access to sales DB for the West"
            },
            {
                "Active": "false",
                "Assignee": "681b365ec0a80164000fb0b05854a0cd",
                "CloseCode": "Closed/Resolved by Caller",
                "CreatedOn": "2016-09-18 20:43:58",
                "ID": "8d641046c0a80164000bc7c0d3ed46a0",
                "Number": "INC0000008",
                "OpenedAt": "2018-02-28 23:08:39",
                "OpenedBy": "681ccaf9c0a8016400b98a06818d57c7",
                "Priority": "1 - Critical",
                "ResolvedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "State": "7 - Closed",
                "Summary": "Printer in my office is out of toner"
            },
            {
                "Active": "false",
                "Assignee": "5137153cc611227c000bbd1bd8cd2007",
                "CloseCode": "Closed/Resolved by Caller",
                "CreatedOn": "2018-03-05 22:51:33",
                "ID": "46b66a40a9fe198101f243dfbc79033d",
                "Number": "INC0000009",
                "OpenedAt": "2018-02-27 22:50:23",
                "OpenedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "Priority": "1 - Critical",
                "ResolvedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "State": "7 - Closed",
                "Summary": "Reset my password"
            },
            {
                "Active": "false",
                "Assignee": "5137153cc611227c000bbd1bd8cd2007",
                "CloseCode": "Solved (Work Around)",
                "CreatedOn": "2018-03-05 23:18:07",
                "ID": "46cebb88a9fe198101aee93734f9768b",
                "Number": "INC0000013",
                "OpenedAt": "2018-03-04 23:15:58",
                "OpenedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "Priority": "1 - Critical",
                "ResolvedBy": "9ee1b13dc6112271007f9d0efdb69cd0",
                "State": "7 - Closed",
                "Summary": "EMAIL is slow when an attachment is involved"
            }
        ]
    }
}
Human Readable Output

image

8. Upload a file to a ticket


Uploads a file to a specified ServiceNow ticket.

Base Command

servicenow-upload-file

Input
Argument Name Description Required
id Ticket system ID Required
ticket_type Ticket type Optional
file_id War Room entry ID that includes the file Required
file_name File name of uploaded file to override the existing file name in entry Optional

 

Context Output
Path Type Description
Ticket.File.Filename string Name of the file
Ticket.File.Link string Download link for the file
Ticket.File.SystemID string System ID of the file

 

Command Example

!servicenow-upload-file file_id=8781@cc00e449-9e7b-4609-8a68-1c8c01114562 id=bd5d42994f82230021ae045e9310c7bd

Context Example
{
    "File": {
        "EntryID": "8786@cc00e449-9e7b-4609-8a68-1c8c01114562",
        "Extension": "txt",
        "Info": "text/plain; charset=utf-8",
        "MD5": "ea499981fdaadbd1a26250b0d925bf43",
        "Name": "file.txt",
        "SHA1": "7ca8be259038fbc1c10ab953363114f3e222f842",
        "SHA256": "02790f5a87eaa10abf8023268ea576d7a72acaab77e0a8371e44491b357728bc",
        "SSDeep": "384:fBr9CRIuXUA+m0x/nL8LuyahOMKFE3qw3db27XUS354AI3NUrXG:5r9i0xfL8LuyahOMK+3z3db2L354vdiW",
        "Size": 51080,
        "Type": "ASCII text\n"
    },
    "ServiceNow": {
        "Ticket": {
            "File": {
                "Filename": "file.txt",
                "Link": "https://dev56245.service-now.com/api/now/attachment/8cc29e1d4f82230021ae045e9310c723/file",
                "SystemID": "8cc29e1d4f82230021ae045e9310c723"
            },
            "ID": "bd5d42994f82230021ae045e9310c7bd"
        }
    }
}
Human Readable Output

image

9. Get record information


Retrieves information for a specified record.

Base Command

servicenow-get-record

Input
Argument Name Description Required
id Record system ID Required
fields Comma-separated table fields to display and output to the context, e.g., name,tag,company. ID field is added by default. Optional
table_name The name of the table to get the record from Required

 

Context Output
Path Type Description
ServiceNow.Record.ID string The unique record identifier for the record
ServiceNow.Record.UpdatedBy string A string field that indicates the user who most recently updated the record
ServiceNow.Record.UpdatedAt date A time-stamp field that indicates the date and time of the most recent update
ServiceNow.Record.CreatedBy string A string field that indicates the user who created the record
ServiceNow.Record.CreatedOn date A time-stamp field that indicates when a record was created

 

Command Example

!servicenow-get-record table_name=alm_asset id=00a96c0d3790200044e0bfc8bcbe5dc3 fields=asset_tag,sys_updated_by,display_name

Context Example
{
    "ServiceNow": {
        "Record": {
            "ID": "00a96c0d3790200044e0bfc8bcbe5dc3",
            "asset_tag": "P1000479",
            "display_name": "P1000479 - Apple MacBook Pro 15\"",
            "sys_updated_by": "system"
        }
    }
}
Human Readable Output

image

10. Query a table


Queries a specified table in ServiceNow.

Base Command

servicenow-query-table

Input
Argument Name Description Required
table_name The name of the table to query Required
limit Limit for how many tickets to retrieve Optional
query The query to run. For more information about querying in ServiceNow, see the ServiceNow documentation. Optional
fields Comma-separated table fields to display and output to the context, e.g., name,tag,company. ID field is added by default. Optional
offset Starting record index to begin retrieving records from Optional

 

Context Output
Path Type Description
ServiceNow.Results.ID string The unique record identifier for the record
ServiceNow.Results.UpdatedBy string A string field that indicates the user who most recently updated the record
ServiceNow.Results.UpdatedAt date A time-stamp field that indicates the date and time of the most recent update
ServiceNow.Results.CreatedBy string A string field that indicates the user who created the record
ServiceNow.Results.CreatedOn date A time-stamp field that indicates when a record was created

 

Command Example
!servicenow-query-table table_name=alm_asset fields=asset_tag,sys_updated_by,display_name query=display_nameCONTAINSMacBook
Context Example
{
    "ServiceNow": {
        "Record": [
            {
                "ID": "00a96c0d3790200044e0bfc8bcbe5dc3",
                "asset_tag": "P1000479",
                "display_name": "P1000479 - Apple MacBook Pro 15\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "01a92c0d3790200044e0bfc8bcbe5d36",
                "asset_tag": "P1000807",
                "display_name": "P1000807 - Apple MacBook Pro 17\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "01a9a80d3790200044e0bfc8bcbe5d53",
                "asset_tag": "P1000637",
                "display_name": "P1000637 - Apple MacBook Air 13\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "02a9a80d3790200044e0bfc8bcbe5dba",
                "asset_tag": "P1000412",
                "display_name": "P1000412 - Apple MacBook Pro 17\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "02a9ac0d3790200044e0bfc8bcbe5d5e",
                "asset_tag": "P1000563",
                "display_name": "P1000563 - Apple MacBook Pro 15\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "03a9680d3790200044e0bfc8bcbe5d4c",
                "asset_tag": "P1000626",
                "display_name": "P1000626 - Apple MacBook Air 13\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "03a9ac0d3790200044e0bfc8bcbe5d9d",
                "asset_tag": "P1000551",
                "display_name": "P1000551 - Apple MacBook Pro 15\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "04a96c0d3790200044e0bfc8bcbe5db3",
                "asset_tag": "P1000503",
                "display_name": "P1000503 - Apple MacBook Pro 15\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "04a9a80d3790200044e0bfc8bcbe5d1b",
                "asset_tag": "P1000640",
                "display_name": "P1000640 - Apple MacBook Air 13\"",
                "sys_updated_by": "system"
            },
            {
                "ID": "04a9e80d3790200044e0bfc8bcbe5d41",
                "asset_tag": "P1000815",
                "display_name": "P1000815 - Apple MacBook Pro 17\"",
                "sys_updated_by": "system"
            }
        ]
    }
}
Human Readable Output

image

11. Create a record in a table


Creates a new record in a specified ServiceNow table.

Base Command

servicenow-create-record

Input
Argument Name Description Required
table_name The name of the table to create a record in Required
fields Fields and their values to create the record with, in the format: fieldname1=value;fieldname2=value;... Optional
custom_fields Custom(user defined) fields in the format: fieldname1=value;fieldname2=value;... Optional
template Template name to use as a base to create new records Optional

 

Context Output
Path Type Description
ServiceNow.Record.ID string The unique record identifier for the record
ServiceNow.Record.UpdatedBy string A string field that indicates the user who most recently updated the record
ServiceNow.Record.UpdatedAt date A time-stamp field that indicates the date and time of the most recent update
ServiceNow.Record.CreatedBy string A string field that indicates the user who created the record
ServiceNow.Record.CreatedOn date time-stamp field that indicates when a record was created

 

Command Example
!servicenow-create-record table_name=incident fields="short_description=My description;assigned_to=my user"
Context Example
{
    "ServiceNow": {
        "Record": {
            "CreatedAt": "2018-11-27 12:51:44",
            "CreatedBy": "admin",
            "ID": "748692114fc2230021ae045e9310c7ff",
            "UpdatedAt": "2018-11-27 12:51:44",
            "UpdatedBy": "admin"
        }
    }
}
Human Readable Output

image

12. Update a record in a table


Updates a record in a specified ServiceNow table.

Base Command

servicenow-update-record

Input
Argument Name Description Required
table_name The name of the table to update the record in Required
id The system ID of the ticket to update Required
fields Fields and their values to update in the record, in the format: fieldname1=value;fieldname2=value;... Optional
custom_fields Custom (user-defined) fields and their values to update in the record, in the format: fieldname1=value;fieldname2=value;... Optional

 

Context Output
Path Type Description
ServiceNow.Record.ID string The unique record identifier for the record.
ServiceNow.Record.UpdatedBy string A string field that indicates the user who most recently updated the record.
ServiceNow.Record.UpdatedAt date A time-stamp field that indicates the date and time of the most recent update.
ServiceNow.Record.CreatedBy string A string field that indicates the user who created the record.
ServiceNow.Record.CreatedOn date time-stamp field that indicates when a record was created.

 

Command Example

!servicenow-update-record table_name=incident id=748692114fc2230021ae045e9310c7ff fields="short_description=new desc;assigned_to=new user"

Context Example
{
    "ServiceNow": {
        "Record": {
            "CreatedAt": "2018-11-27 12:51:44",
            "CreatedBy": "admin",
            "ID": "748692114fc2230021ae045e9310c7ff",
            "UpdatedAt": "2018-11-27 12:53:48",
            "UpdatedBy": "admin"
        }
    }
}
Human Readable Output

image

13. Delete a record from a table


Deletes a record from a specified ServiceNow table.

Base Command

servicenow-delete-record

Input
Argument Name Description Required
table_name The table name Required
id The system ID of the ticket to delete Required

 

Context Output

There is no context output for this command.

Command Example
!servicenow-delete-record id=748692114fc2230021ae045e9310c7ff table_name=incident
Human Readable Output

image

14. List API fiels for a table


Lists API fields for a specified ServiceNow table.

Base Command

servicenow-list-table-fields

Input
Argument Name Description Required
table_name Table name Required
 
Context Output
Path Type Description
ServiceNow.Field string Table API field name

 

Command Example
!servicenow-list-table-fields table_name=alm_asset
Context Example
{
    "ServiceNow": {
        "Field": [
            {
                "Name": "reserved_for"
            },
            {
                "Name": "expenditure_type"
            },
            {
                "Name": "request_line"
            },
            {
                "Name": "checked_in"
            },
            {
                "Name": "sys_tags"
            },
            {
                "Name": "sys_created_on"
            },
            {
                "Name": "gl_account"
            },
            {
                "Name": "salvage_value"
            },
            {
                "Name": "ci"
            },
            {
                "Name": "asset_tag"
            },
            {
                "Name": "managed_by"
            },
            {
                "Name": "assigned_to"
            },
            {
                "Name": "install_status"
            },
            {
                "Name": "cost_center"
            },
            {
                "Name": "old_substatus"
            },
            {
                "Name": "pre_allocated"
            },
            {
                "Name": "display_name"
            },
            {
                "Name": "justification"
            },
            {
                "Name": "skip_sync"
            },
            {
                "Name": "sys_updated_by"
            },
            {
                "Name": "sys_created_by"
            },
            {
                "Name": "due"
            },
            {
                "Name": "comments"
            },
            {
                "Name": "beneficiary"
            },
            {
                "Name": "depreciated_amount"
            },
            {
                "Name": "lease_id"
            },
            {
                "Name": "sys_id"
            },
            {
                "Name": "purchase_date"
            },
            {
                "Name": "work_notes"
            },
            {
                "Name": "department"
            },
            {
                "Name": "serial_number"
            },
            {
                "Name": "location"
            },
            {
                "Name": "residual_date"
            },
            {
                "Name": "sys_class_name"
            },
            {
                "Name": "warranty_expiration"
            },
            {
                "Name": "vendor"
            },
            {
                "Name": "parent"
            },
            {
                "Name": "checked_out"
            },
            {
                "Name": "company"
            },
            {
                "Name": "sys_updated_on"
            },
            {
                "Name": "resale_price"
            },
            {
                "Name": "residual"
            },
            {
                "Name": "supported_by"
            },
            {
                "Name": "sys_mod_count"
            },
            {
                "Name": "disposal_reason"
            },
            {
                "Name": "invoice_number"
            },
            {
                "Name": "old_status"
            },
            {
                "Name": "sys_domain_path"
            },
            {
                "Name": "retired"
            },
            {
                "Name": "assigned"
            },
            {
                "Name": "depreciation"
            },
            {
                "Name": "model_category"
            },
            {
                "Name": "po_number"
            },
            {
                "Name": "acquisition_method"
            },
            {
                "Name": "due_in"
            },
            {
                "Name": "depreciation_date"
            },
            {
                "Name": "install_date"
            },
            {
                "Name": "substatus"
            },
            {
                "Name": "order_date"
            },
            {
                "Name": "cost"
            },
            {
                "Name": "support_group"
            },
            {
                "Name": "stockroom"
            },
            {
                "Name": "retirement_date"
            },
            {
                "Name": "sys_domain"
            },
            {
                "Name": "owned_by"
            },
            {
                "Name": "model"
            },
            {
                "Name": "delivery_date"
            },
            {
                "Name": "quantity"
            }
        ]
    }
}
Human Readable Output

image

15. Query computers


Queries the cmdb_ci_computer table in ServiceNow.

Base Command

servicenow-query-computers

Input
Argument Name Description Required
computer_id Query by computer sys_id Optional
computer_name Query by computer name Optional
query Query by specified query, for more information about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html Optional
asset_tag Query by asset tag Optional
limit Query results limit Optional
offset Starting record index to begin retrieving records from Optional

 

Context Output
Path Type Description
ServiceNow.Computer.ID string Computer sys_id
ServiceNow.Computer.AssetTag string Computer Asset tag
ServiceNow.Computer.Name string Computer name
ServiceNow.Computer.DisplayName string Computer display name
ServiceNow.Computer.SupportGroup string Computer support group
ServiceNow.Computer.OperatingSystem string Computer operating system
ServiceNow.Computer.Company string Computer company sys_id
ServiceNow.Computer.AssignedTo string Computer assigned to user sys_id
ServiceNow.Computer.State string Computer state
ServiceNow.Computer.Cost string Computer cost
ServiceNow.Computer.Comments string Computer comments

 

Command Example

!servicenow-query-computers

Context Example
{
    "ServiceNow": {
        "Computer": [
            {
                "AssetTag": "P1000503",
                "AssignedTo": "92826bf03710200044e0bfc8bcbe5dbb",
                "Company": "81fbfe03ac1d55eb286d832de58ae1fd",
                "Cost": "1799.99 USD",
                "DisplayName": "P1000503 - MacBook Pro 15\"",
                "ID": "00a96c0d3790200044e0bfc8bcbe5db4",
                "Name": "MacBook Pro 15\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000640",
                "AssignedTo": "3682abf03710200044e0bfc8bcbe5d09",
                "Company": "81fca4cbac1d55eb355b4b6db0e3c80f",
                "Cost": "1599.99 USD",
                "DisplayName": "P1000640 - MacBook Air 13\"",
                "ID": "00a9a80d3790200044e0bfc8bcbe5d1c",
                "Name": "MacBook Air 13\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000815",
                "AssignedTo": "86826bf03710200044e0bfc8bcbe5d42",
                "Company": "81fd65ecac1d55eb42a426568fc87a63",
                "Cost": "2499.99 USD",
                "DisplayName": "P1000815 - MacBook Pro 17\"",
                "ID": "00a9e80d3790200044e0bfc8bcbe5d42",
                "Name": "MacBook Pro 17\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000814",
                "AssignedTo": "4e826bf03710200044e0bfc8bcbe5d41",
                "Company": "81fd65ecac1d55eb42a426568fc87a63",
                "Cost": "2499.99 USD",
                "DisplayName": "P1000814 - MacBook Pro 17\"",
                "ID": "00a9e80d3790200044e0bfc8bcbe5de8",
                "Name": "MacBook Pro 17\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000517",
                "AssignedTo": "12826bf03710200044e0bfc8bcbe5dc3",
                "Company": "81fca4cbac1d55eb355b4b6db0e3c80f",
                "Cost": "1799.99 USD",
                "DisplayName": "P1000517 - MacBook Pro 15\"",
                "ID": "00a9ec0d3790200044e0bfc8bcbe5d06",
                "Name": "MacBook Pro 15\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000666",
                "AssignedTo": "fe82abf03710200044e0bfc8bcbe5d18",
                "Company": "a66b1fb03710200044e0bfc8bcbe5d08",
                "Cost": "1599.99 USD",
                "DisplayName": "P1000666 - MacBook Air 13\"",
                "ID": "01a9280d3790200044e0bfc8bcbe5d79",
                "Name": "MacBook Air 13\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000871",
                "AssignedTo": "4e826bf03710200044e0bfc8bcbe5d6f",
                "Company": "31bea3d53790200044e0bfc8bcbe5dec",
                "Cost": "2499.99 USD",
                "DisplayName": "P1000871 - MacBook Pro 17\"",
                "ID": "01a92c0d3790200044e0bfc8bcbe5d27",
                "Name": "MacBook Pro 17\"",
                "OperatingSystem": "Mac OS 10 (OS/X)",
                "State": "In use"
            },
            {
                "AssetTag": "P1000429",
                "AssignedTo": "c6826bf03710200044e0bfc8bcbe5d90",
                "Company": "4b7d13f03710200044e0bfc8bcbe5db6",
                "Cost": "2249.99 USD",
                "DisplayName": "P1000429 - ThinkStation C20",
                "ID": "01a9e40d3790200044e0bfc8bcbe5dab",
                "Name": "ThinkStation C20",
                "OperatingSystem": "Windows XP Professional",
                "State": "In use"
            },
            {
                "AssetTag": "P1000440",
                "AssignedTo": "8a826bf03710200044e0bfc8bcbe5d96",
                "Company": "81fca4cbac1d55eb355b4b6db0e3c80f",
                "Cost": "1699.99 USD",
                "DisplayName": "P1000440 - ThinkStation S20",
                "ID": "01a9ec0d3790200044e0bfc8bcbe5dc3",
                "Name": "ThinkStation S20",
                "OperatingSystem": "Windows XP Professional",
                "State": "In use"
            },
            {
                "AssetTag": "P1000357",
                "AssignedTo": "ce826bf03710200044e0bfc8bcbe5d67",
                "Company": "a66b1fb03710200044e0bfc8bcbe5d08",
                "Cost": "1329 USD",
                "DisplayName": "P1000357 - Precision T5500 Workstation",
                "ID": "02a9604d3790200044e0bfc8bcbe5d17",
                "Name": "Precision T5500 Workstation",
                "OperatingSystem": "Windows XP Professional",
                "State": "In use"
            }
        ]
    }
}
Human Readable Output

image

16. Query groups


Queries the sys_user_group table in ServiceNow.

Base Command

servicenow-query-groups

Input
Argument Name Description Required
group_id Query by group sys_id Optional
group_name Query by group name Optional
query Query by specified query, for more information about querying in ServiceNow, see the ServiceNow documentation. Optional
limit Query results limit Optional
offset Starting record index to begin retrieving records from Optional

 

Context Output
Path Type Description
ServiceNow.Group.ID string Group sys_id
ServiceNow.Group.Description string Group description
ServiceNow.Group.Name string Group name
ServiceNow.Group.Manager string Group manager sys_id
ServiceNow.Group.Updated date Group update time

 

Command Example

!servicenow-query-groups group_name=test1

Context Example
{
    "ServiceNow": {
        "Group": {
            "Active": "true",
            "Description": "Incident Management Group",
            "ID": "12a586cd0bb23200ecfd818393673a30",
            "Name": "test1",
            "Updated": "2018-11-26 14:51:41"
        }
    }
}
Human Readable Output

image

17. Query users


Queries the sys_user table in ServiceNow.

Base Command

servicenow-query-users

Input
Argument Name Description Required
user_id Query by user sys_id Optional
user_name Query by username Optional
query Query by specified query, for more information about querying in ServiceNow, see the ServiceNow documentation. Optional
limit Query results limit Optional
offset Starting record index to begin retrieving records from Optional

 

Context Output
Path Type Description
ServiceNow.User.ID string User sys_id
ServiceNow.User.Name string User name (first, middle, last)
ServiceNow.User.UserName string User username
ServiceNow.User.Email string User email
ServiceNow.User.Created date User creation time
ServiceNow.User.Updated date User update time

 

Command Example
!servicenow-query-users user_name=sean.bonnet
Context Example
{
    "ServiceNow": {
        "User": {
            "Created": "2012-02-18 03:04:50",
            "Email": "sean.bonnet@example.com",
            "ID": "02826bf03710200044e0bfc8bcbe5d6d",
            "Name": "Sean Testman",
            "Updated": "2018-08-12 22:18:39",
            "UserName": "sean.bonnet"
        }
    }
}
Human Readable Output

image

18. Get table names


Retrieves table names by a label to use in commands.

Base Command
servicenow-get-table-name
Input
Argument Name Description Required
label The table label, e.g., Asset, Incident, IP address, etc. Required
limit The number of results to return Optional
offset Starting record index to begin retrieving records from Optional

 

Context Output
Path Type Description
ServiceNow.Table.ID string Table system ID
ServiceNow.Table.Name string Table name to use in commands, e.g., alm_asset
ServiceNow.Table.SystemName string Table system name, e.g., Asset
 
Command Example
!servicenow-get-table-name label=Asset
Context Example
{
    "ServiceNow": {
        "Table": {
            "ID": "56cc519d5d521300651727c3e282e819",
            "Name": "alm_asset",
            "SystemName": "Asset"
        }
    }
}
Human Readable Output

image

19. Get ticket notes


Returns notes for a specified ticket.

Base Command

servicenow-get-ticket-notes

Input
Argument Name Description Required
id Ticket System ID Required
limit Limit for the ticket notes Optional
offset Offset of the ticket notes Optional

 

Context Output
Path Type Description
ServiceNow.Ticket.ID string Ticket ID
ServiceNow.Ticket.Note.Value unknown Ticket note value
ServiceNow.Ticket.Note.CreatedOn date Ticket note created on date
ServiceNow.Ticket.Note.CreatedBy string Ticket note created by
ServiceNow.Ticket.Note.Type string Ticket note type

 

Command Example

!servicenow-get-ticket-notes id=9c573169c611228700193229fff72400

Context Example
{
    "ServiceNow": {
        "Ticket": {
            "ID": "9c573169c611228700193229fff72400",
            "Note": [
                {
                    "CreatedBy": "admin",
                    "CreatedOn": "2019-01-31 08:40:56",
                    "Type": "Comment",
                    "Value": "test"
                },
                {
                    "CreatedBy": "admin",
                    "CreatedOn": "2019-01-31 11:09:14",
                    "Type": "Work Note",
                    "Value": "hmm"
                }
            ]
        }
    }
Human Readable Output

image

 

Additional Information

The tables and fields in the ServiceNow UI are different than those in the API. Each table and field name in the UI have their representation in the API.

The integration allows viewing the API table name with the servicenow-get-table command and the API fields(columns) for each table using the servicenow-list-fields command, given the table has records.

In the API, fields that are linked to records in a table (e.g., user) return as an object of link and value as the link refers to the link to that record in the API and the value refers to the system ID of the record. By default, the integration retrieves the value of the object - which means its system ID.

Troubleshooting

If there is an error within ServiceNow, the message is usually indicative, e.g., User Not Authenticated, details: Required to provide Auth information Invalid table or No Record found, details: Record doesn't exist or ACL restricts the record retrieval.

However there may be connection issues, e.g., when the ServiceNow server URL is incorrect or is unreachable.

Configuration parameters

  • url — ServiceNow URL, in the format https://company.service-now.com/ (required)
  • credentials — Username
  • proxy — Use system proxy settings
  • insecure — Trust any certificate (not secure)
  • ticket_type — Default ticket type for running ticket commands and fetching incidents
  • api_version — ServiceNow API Version (e.g. 'v1')
  • isFetch — Fetch incidents
  • sysparm_query — The query to use when fetching incidents
  • fetch_limit — How many incidents to fetch each time
  • fetch_time — First fetch timestamp (<number> <time unit>, e.g., 12 hours, 7 days, 3 months, 1 year)
  • timestamp_field — Timestamp field to filter by (e.g., `opened_at`) This is how the filter is applied to the query: “ORDERBYopened_at^opened_at>[Last Run]. To prevent duplicate incidents, this field is mandatory for fetching incidents.
  • incidentType — Incident type
  • get_attachments — Get incident attachments

Commands (31)

  • servicenow-add-comment Deprecated

    Add comment to specific ticket by providing ticket id

  • servicenow-add-link Deprecated

    Add a link to specific ticket

  • servicenow-create Deprecated

    Deprecated. Use servicenow-create-ticket or servicenow-create-record instead

  • servicenow-create-record Deprecated

    Create a new record in a specified ServiceNow table

  • servicenow-create-ticket Deprecated

    Create new ServiceNow ticket

  • servicenow-delete-record Deprecated

    Delete a record in a specified ServiceNow table

  • servicenow-delete-ticket Deprecated

    Delete a ticket from ServiceNow

  • servicenow-get Deprecated

    Deprecated. Use servicenow-get-ticket or servicenow-get-record instead

  • servicenow-get-computer Deprecated

    Deprecated. Use servicenow-query-computers instead.

  • servicenow-get-groups Deprecated

    Deprecated. Use servicenow-query-groups instead.

  • servicenow-get-record Deprecated

    Retrieve record information by specific record ID

  • servicenow-get-table-name Deprecated

    Get table names by a label to use in commands

  • servicenow-get-ticket Deprecated

    Retrieve ticket information by specific ticket ID

  • servicenow-get-ticket-notes Deprecated

    Get notes from the specified ServiceNow ticket - Read permissions are required for the sys_journal_field table.

  • servicenow-incident-add-comment Deprecated

    Deprecated. Use servicenow-add-comment instead.

  • servicenow-incident-add-link Deprecated

    Deprecated. Use servicenow-add-link instead.

  • servicenow-incident-create Deprecated

    Create a new ServiceNow ticket

  • servicenow-incident-update Deprecated

    Deprecated. Use servicenow-update-ticket or servicenow-update-record instead

  • servicenow-incident-upload-file Deprecated

    Deprecated. Use servicenow-upload-file instead.

  • servicenow-incidents-query Deprecated

    Deprecated. Use servicenow-query-table or servicenow-query-tickets instead.

  • servicenow-list-table-fields Deprecated

    List API fields for a specified ServiceNow table

  • servicenow-query Deprecated

    Deprecated. Use servicenow-query-table or servicenow-query-tickets instead.

  • servicenow-query-computers Deprecated

    Query the cmdb_ci_computer table in ServiceNow

  • servicenow-query-groups Deprecated

    Query the sys_user_group table in ServiceNow

  • servicenow-query-table Deprecated

    Query a specified table in ServiceNow

  • servicenow-query-tickets Deprecated

    Retrieve ticket info with a query

  • servicenow-query-users Deprecated

    Query the sys_user table in ServiceNow

  • servicenow-update Deprecated

    Deprecated. Use servicenow-update-ticket or servicenow-update-record instead

  • servicenow-update-record Deprecated

    Update a record in a specified ServiceNow table

  • servicenow-update-ticket Deprecated

    Update specific ticket

  • servicenow-upload-file Deprecated

    Upload a file to a specific ticket

category: Case Management
provider: ServiceNow
commonfields:
  id: ServiceNow
  version: -1
configuration:
- display: ServiceNow URL, in the format https://company.service-now.com/
  name: url
  required: true
  type: 0
- display: Username
  name: credentials
  type: 9
  required: false
- defaultvalue: ''
  display: Use system proxy settings
  name: proxy
  type: 8
  required: false
- defaultvalue: 'false'
  display: Trust any certificate (not secure)
  name: insecure
  type: 8
  required: false
- defaultvalue: incident
  display: Default ticket type for running ticket commands and fetching incidents
  name: ticket_type
  type: 0
  required: false
- display: ServiceNow API Version (e.g. 'v1')
  name: api_version
  type: 0
  required: false
- display: Fetch incidents
  name: isFetch
  type: 8
  required: false
- defaultvalue: stateNOT IN6,7
  display: The query to use when fetching incidents
  name: sysparm_query
  type: 0
  required: false
- defaultvalue: '10'
  display: How many incidents to fetch each time
  name: fetch_limit
  type: 0
  required: false
- defaultvalue: 10 minutes
  display: First fetch timestamp (<number> <time unit>, e.g., 12 hours, 7 days, 3 months, 1 year)
  name: fetch_time
  type: 0
  required: false
- defaultvalue: opened_at
  display: |-
    Timestamp field to filter by (e.g., `opened_at`)
    This is how the filter is applied to the query: “ORDERBYopened_at^opened_at>[Last Run]. To prevent duplicate incidents, this field is mandatory for fetching incidents.
  name: timestamp_field
  type: 0
  required: false
- display: Incident type
  name: incidentType
  type: 13
  required: false
- display: Get incident attachments
  name: get_attachments
  type: 8
  required: false
description: Deprecated. Use the ServiceNow v2 integration instead.
display: ServiceNow (Deprecated)
deprecated: true
name: ServiceNow
script:
  commands:
  - arguments:
    - default: true
      description: Ticket System ID
      name: id
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: Ticket number to retrieve
      name: number
    - auto: PREDEFINED
      defaultValue: 'false'
      description: Whether to retrieve ticket attachments, default false
      name: get_attachments
      predefined:
      - 'true'
      - 'false'
    deprecated: true
    description: Retrieve ticket information by specific ticket ID
    name: servicenow-get-ticket
    outputs:
    - contextPath: ServiceNow.Ticket.ID
      description: ServiceNow ticket ID
      type: string
    - contextPath: ServiceNow.Ticket.OpenedBy
      description: ServiceNow ticket opener ID
      type: string
    - contextPath: ServiceNow.Ticket.CreatedOn
      description: ServiceNow ticket creation date.
      type: date
    - contextPath: ServiceNow.Ticket.Assignee
      description: ServiceNow ticket assignee ID
      type: string
    - contextPath: ServiceNow.Ticket.State
      description: ServiceNow ticket state
      type: string
    - contextPath: ServiceNow.Ticket.Summary
      description: ServiceNow ticket short summary
      type: string
    - contextPath: ServiceNow.Ticket.Number
      description: ServiceNow ticket number
      type: string
    - contextPath: ServiceNow.Ticket.Active
      description: ServiceNow ticket active
      type: boolean
    - contextPath: ServiceNow.Ticket.AdditionalComments
      description: ServiceNow ticket comments
      type: string
    - contextPath: ServiceNow.Ticket.Priority
      description: ServiceNow ticket priority
      type: string
    - contextPath: ServiceNow.Ticket.OpenedAt
      description: ServiceNow ticket opening time
      type: date
    - contextPath: ServiceNow.Ticket.ResolvedBy
      description: ServiceNow ticket resolver ID
      type: string
    - contextPath: ServiceNow.Ticket.CloseCode
      description: ServiceNow ticket close code
      type: string
    - contextPath: File.Info
      description: Attachment file info
      type: string
    - contextPath: File.Name
      description: Attachment file name
      type: string
    - contextPath: File.Size
      description: Attachment file size
      type: number
    - contextPath: File.SHA1
      description: Attachment file SHA1
      type: string
    - contextPath: File.SHA256
      description: Attachment file SHA256
      type: string
    - contextPath: File.EntryID
      description: Attachment file entry ID
      type: string
    - contextPath: File.Type
      description: Attachment file type
      type: string
    - contextPath: File.MD5
      description: Attachment file MD5
      type: string
  - arguments:
    - default: true
      description: Ticket System ID to retrieve
      name: id
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: Ticket number to retrieve
      name: number
    - description: Whether to retrieve ticket attachments, default false
      name: get_attachments
    deprecated: true
    description: Deprecated. Use servicenow-get-ticket or servicenow-get-record instead
    name: servicenow-get
    outputs:
    - contextPath: Ticket.ID
      description: The unique ticket identifier(sys_id).
      type: string
    - contextPath: Ticket.Creator
      description: A string field that indicates the user who created the ticket.
      type: string
    - contextPath: Ticket.CreatedOn
      description: The date and time when the ticket was created.
      type: date
    - contextPath: Ticket.Assignee
      description: Specifies the user assigned to complete the ticket. By default, this field uses a reference qualifier to only display users with the itil role.
      type: string
    - contextPath: Ticket.State
      description: Status of the ticket.
      type: string
    - contextPath: Ticket.Summary
      description: A human-readable title for the record.
      type: string
    - contextPath: Ticket.Number
      description: The display value of the ticket.
      type: string
    - contextPath: Ticket.Active
      description: Specifies whether work is still being done on a task or whether the work for the task is complete.
      type: boolean
    - contextPath: Ticket.AdditionalComments
      description: Comments about the task record.
      type: Unknown
    - contextPath: Ticket.Priority
      description: Specifies how high a priority the ticket should be for the assignee.
      type: string
    - contextPath: Ticket.OpenedAt
      description: The date and time when the ticket was opened for the first time.
      type: date
    - contextPath: File.Info
      description: Attachment file info
      type: string
    - contextPath: File.Name
      description: Attachment file name
      type: string
    - contextPath: File.Size
      description: Attachment file size
      type: number
    - contextPath: File.SHA1
      description: Attachment file SHA1
      type: string
    - contextPath: File.SHA256
      description: Attachment file SHA256
      type: string
    - contextPath: File.EntryID
      description: Attachment file entry ID
      type: string
    - contextPath: File.Type
      description: Attachment file type
      type: string
    - contextPath: File.MD5
      description: Attachment file MD5
      type: string
  - arguments:
    - description: Short description of the ticket
      name: short_description
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - auto: PREDEFINED
      description: Ticket urgency
      name: urgency
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket severity
      name: severity
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket impact
      name: impact
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Set ticket as Active
      name: active
      predefined:
      - 'true'
      - 'false'
    - description: Set ticket ActivityDue - format "2016-07-02 21:51:11"
      name: activity_due
    - description: List of assigned users to the ticket
      name: additional_assignee_list
    - description: Ticket history approval
      name: approval_history
    - description: Set ticket ApprovalSet - format "2016-07-02 21:51:11"
      name: approval_set
    - description: To whom the ticket is assigned
      name: assigned_to
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: business_duration
    - description: Business service
      name: business_service
    - description: Business source
      name: business_stc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: calendar_duration
    - description: UID Format
      name: caller_id
    - description: Category of ticket
      name: category
    - description: UID Format
      name: caused_by
    - auto: PREDEFINED
      description: Ticket's close code
      name: close_code
      predefined:
      - Solved (Work Around)
      - Solved (Permanently)
      - Solved Remotely (Work Around)
      - Solved Remotely (Permanently)
      - Not Solved (Not Reproducible)
      - Not Solved (Too Costly)
      - Closed/Resolved by Caller
    - description: Close notes of the ticket
      name: close_notes
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: closed_at
    - description: User who closed the ticket
      name: closed_by
    - description: UID Format
      name: cmdb_ci
    - description: Format type journal input
      name: comments
    - description: Format type journal input
      name: comments_and_work_notes
    - description: UID Format
      name: company
    - description: Contact type
      name: contact_type
    - description: Correlation display
      name: correlation_display
    - description: Correlation id
      name: correlation_id
    - description: UID Format
      name: delivery_plan
    - auto: PREDEFINED
      description: If you want to display comments, work_notes...
      name: display
      predefined:
      - 'true'
      - 'false'
    - description: Ticket description
      name: description
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: due_date
    - description: Escalation
      name: escalation
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: expected_start
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: follow_up
    - description: UID format list
      name: group_list
    - auto: PREDEFINED
      description: Is the ticket solved in the knowledge base
      name: knowledge
      predefined:
      - 'true'
      - 'false'
    - description: Location of the ticket
      name: location
    - description: SLA of the ticket
      name: made_sla
    - auto: PREDEFINED
      description: Notify about this ticket
      name: notify
      predefined:
      - '1'
      - '0'
    - description: Order number
      name: order
    - description: UID Format
      name: parent
    - description: UID Format
      name: parent_incident
    - description: UID Format
      name: problem_id
    - description: How many users included in this ticket before
      name: reassignment_count
    - description: How many time the ticket has been reopened
      name: reopen_count
    - description: 'Resolving time, Format: YYYY-MM-DD HH:MM:SS'
      name: resolved_at
    - description: UID Format
      name: resolved_by
    - description: UID
      name: rfc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sla_due
    - description: Subcategory
      name: subcategory
    - description: Last updated by
      name: sys_updated_by
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sys_updated_on
    - description: Input from the end user
      name: user_input
    - description: A list of watched tickets
      name: watch_list
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: work_end
    - description: Format journal list
      name: work_notes
    - description: List with UIDs
      name: work_notes_list
    - description: Date when started to work on the ticket
      name: work_start
    - description: Set AssignmentGroup - sys_id of group
      name: assignment_group
    - description: integer
      name: incident_state
    - description: Ticket number
      name: number
    - auto: PREDEFINED
      description: Priority of the ticket
      name: priority
      predefined:
      - 5 - Planning
      - 4 - Low
      - 3 - Moderate
      - 2 - High
      - 1 - Critical
    - description: Template name to use as a base to create new tickets.
      name: template
    - description: 'Custom(user defined) fields in the format: fieldname1=value;fieldname2=value; custom fields start with a "u_".'
      name: custom_fields
    - auto: PREDEFINED
      defaultValue: normal
      description: Type of Change Request ticket
      name: change_type
      predefined:
      - normal
      - standard
      - emergency
    - description: State of the ticket, e.g., "Closed" or "7" or "7 - Closed".
      name: state
    - description: ' Ticket opening time, Format: YYYY-MM-DD HH:MM:SS'
      name: opened_at
    - description: Caller system ID
      name: caller
    deprecated: true
    description: Create new ServiceNow ticket
    name: servicenow-create-ticket
    outputs:
    - contextPath: ServiceNow.Ticket.ID
      description: ServiceNow ticket ID
      type: string
    - contextPath: ServiceNow.Ticket.OpenedBy
      description: ServiceNow ticket opener ID
      type: string
    - contextPath: ServiceNow.Ticket.CreatedOn
      description: ServiceNow ticket creation date.
      type: date
    - contextPath: ServiceNow.Ticket.Assignee
      description: ServiceNow ticket assignee ID
      type: string
    - contextPath: ServiceNow.Ticket.State
      description: ServiceNow ticket state
      type: string
    - contextPath: ServiceNow.Ticket.Summary
      description: ServiceNow ticket short summary
      type: string
    - contextPath: ServiceNow.Ticket.Number
      description: ServiceNow ticket number
      type: string
    - contextPath: ServiceNow.Ticket.Active
      description: ServiceNow ticket active
      type: boolean
    - contextPath: ServiceNow.Ticket.AdditionalComments
      description: ServiceNow ticket comments
      type: string
    - contextPath: ServiceNow.Ticket.Priority
      description: ServiceNow ticket priority
      type: string
    - contextPath: ServiceNow.Ticket.OpenedAt
      description: ServiceNow ticket opening time
      type: date
    - contextPath: ServiceNow.Ticket.ResolvedBy
      description: ServiceNow ticket resolver ID
      type: string
    - contextPath: ServiceNow.Ticket.CloseCode
      description: ServiceNow ticket close code
      type: string
  - arguments:
    - description: Short description of the ticket
      name: short_description
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - auto: PREDEFINED
      description: Ticket urgency
      name: urgency
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket severity
      name: severity
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket impact
      name: impact
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Set ticket as Active
      name: active
      predefined:
      - 'true'
      - 'false'
    - description: Set ticket ActivityDue - format "2016-07-02 21:51:11" glide_date_time
      name: activity_due
    - description: List of assigned users to the ticket
      name: additional_assignee_list
    - description: Ticket history approval
      name: approval_history
    - description: Set ticket ApprovalSet - format "2016-07-02 21:51:11" glide_date_time
      name: approval_set
    - description: To whom the ticket is assigned
      name: assigned_to
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: business_duration
    - description: Business service
      name: business_service
    - description: Business source
      name: business_stc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: calendar_duration
    - description: UID Format
      name: caller_id
    - description: Category of ticket
      name: category
    - description: UID Format
      name: caused_by
    - description: Ticket's close code
      name: close_code
    - description: Close notes of the ticket
      name: close_notes
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: closed_at
    - description: User who closed the ticket
      name: closed_by
    - description: UID Format
      name: cmdb_ci
    - description: Format type journal input
      name: comments
    - description: Format type journal input
      name: comments_and_work_notes
    - description: UID Format
      name: company
    - description: Contact type
      name: contact_type
    - description: Correlation display
      name: correlation_display
    - description: Correlation id
      name: correlation_id
    - description: UID Format
      name: delivery_plan
    - auto: PREDEFINED
      description: If you want to display comments, work_notes...
      name: display
      predefined:
      - 'true'
      - 'false'
    - description: Ticket description
      name: description
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: due_date
    - description: Escalation
      name: escalation
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: expected_start
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: follow_up
    - description: UID format list
      name: group_list
    - auto: PREDEFINED
      description: Is the ticket solved in the knowledge base
      name: knowledge
      predefined:
      - 'true'
      - 'false'
    - description: Location of the ticket
      name: location
    - description: SLA of the ticket
      name: made_sla
    - auto: PREDEFINED
      description: Notify about this ticket
      name: notify
      predefined:
      - '1'
      - '0'
    - description: Order number
      name: order
    - description: UID Format
      name: parent
    - description: UID Format
      name: parent_incident
    - description: UID Format
      name: problem_id
    - description: How many users included in this ticket before
      name: reassignment_count
    - description: How many time the ticket has been reopened
      name: reopen_count
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: resolved_at
    - description: UID Format
      name: resolved_by
    - description: UID
      name: rfc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sla_due
    - description: Subcategory
      name: subcategory
    - description: Last updated by
      name: sys_updated_by
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sys_updated_on
    - description: Input from the end user
      name: user_input
    - description: A list of watched tickets
      name: watch_list
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: work_end
    - description: Format journal list
      name: work_notes
    - description: List with UIDs
      name: work_notes_list
    - description: Date when started to work on the ticket
      name: work_start
    - description: Set AssignmentGroup - uuid of group like 46b87022a9fe198101a78787e40d7547
      name: assignment_group
    - description: integer
      name: incident_state
    - description: Ticket number
      name: number
    - auto: PREDEFINED
      description: Priority of the ticket (number)
      name: priority
      predefined:
      - 5 - Planning
      - 4 - Low
      - 3 - Moderate
      - 2 - High
      - 1 - Critical
    - description: Template name to use as a base to create new tickets.
      name: template
    - description: 'Custom(user defined) fields in the format: fieldname1=value;fieldname2=value;...'
      name: custom_fields
    - auto: PREDEFINED
      defaultValue: normal
      description: Type of Change Request ticket
      name: type
      predefined:
      - normal
      - standard
      - emergency
    - description: State of the ticket
      name: state
    deprecated: true
    description: Deprecated. Use servicenow-create-ticket or servicenow-create-record instead
    name: servicenow-create
    outputs:
    - contextPath: Ticket.ID
      description: ServiceNow ticket System ID
      type: string
    - contextPath: Ticket.Creator
      description: ServiceNow ticket creator
      type: string
    - contextPath: Ticket.Assignee
      description: ServiceNow ticket assignee
      type: string
    - contextPath: Ticket.State
      description: ServiceNow ticket state
      type: string
    - contextPath: Ticket.Summary
      description: ServiceNow ticket short summary
      type: string
    - contextPath: Ticket.Number
      description: ServiceNow ticket number
      type: string
  - arguments:
    - description: Short description of the ticket
      name: short_description
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
    - description: Ticket urgency
      name: urgency
    - description: Ticket severity
      name: severity
    - description: Ticket impact
      name: impact
    - auto: PREDEFINED
      description: Set ticket as Active
      name: active
      predefined:
      - 'true'
      - 'false'
    - description: Set ticket ActivityDue - format "2016-07-02 21:51:11" glide_date_time
      name: activity_due
    - description: List of assigned users to the ticket
      name: additional_assignee_list
    - description: Ticket history approval
      name: approval_history
    - description: Set ticket ApprovalSet - format "2016-07-02 21:51:11" glide_date_time
      name: approval_set
    - description: To whom the ticket is assigned
      name: assigned_to
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: business_duration
    - description: Business service
      name: business_service
    - description: Business source
      name: business_stc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: calendar_duration
    - description: UID Format
      name: caller_id
    - description: Category name
      name: category
    - description: UID Format
      name: caused_by
    - description: Ticket's close code
      name: close_code
    - description: Close notes of the ticket
      name: close_notes
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: closed_at
    - description: User who closed the ticket
      name: closed_by
    - description: UID Format
      name: cmdb_ci
    - description: Format type journal input
      name: comments
    - description: Format type journal input
      name: comments_and_work_notes
    - description: UID Format
      name: company
    - description: Contact type
      name: contact_type
    - description: Correlation display
      name: correlation_display
    - description: Correlation id
      name: correlation_id
    - description: UID Format
      name: delivery_plan
    - auto: PREDEFINED
      description: If you want to display comments, work_notes...
      name: display
      predefined:
      - 'true'
      - 'false'
    - description: Ticket description
      name: description
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: due_date
    - description: Escalation
      name: escalation
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: expected_start
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: follow_up
    - description: UID format list
      name: group_list
    - auto: PREDEFINED
      description: Is the ticket solved in the knowledge base
      name: knowledge
      predefined:
      - 'true'
      - 'false'
    - description: Location of the ticket
      name: location
    - description: SLA of the ticket
      name: made_sla
    - auto: PREDEFINED
      description: Notify about this ticket
      name: notify
      predefined:
      - '1'
      - '0'
    - description: Order number
      name: order
    - description: UID Format
      name: parent
    - description: UID Format
      name: parent_incident
    - description: UID Format
      name: problem_id
    - description: How many users included in this ticket before
      name: reassignment_count
    - description: How many time the ticket has been reopened
      name: reopen_count
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: resolved_at
    - description: UID Format
      name: resolved_by
    - description: UID
      name: rfc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sla_due
    - description: Subcategory
      name: subcategory
    - description: Last updated by
      name: sys_updated_by
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sys_updated_on
    - description: Input from the end user
      name: user_input
    - description: A list of watched tickets
      name: watch_list
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: work_end
    - description: Format journal list
      name: work_notes
    - description: List with UIDs
      name: work_notes_list
    - description: Date when started to work on the ticket
      name: work_start
    - description: Set AssignmentGroup - uuid of group like 46b87022a9fe198101a78787e40d7547
      name: assignment_group
    - description: integer
      name: incident_state
    - description: Ticket number
      name: number
    - description: Priority of the ticket (number)
      name: priority
    - description: Template name to use as a base to create new tickets.
      name: template
    deprecated: true
    description: Create a new ServiceNow ticket
    name: servicenow-incident-create
    outputs:
    - contextPath: Ticket.ID
      description: ServiceNow ticket System ID
      type: string
    - contextPath: Ticket.Creator
      description: ServiceNow ticket creator
      type: string
    - contextPath: Ticket.Assignee
      description: ServiceNow ticket assignee
      type: string
    - contextPath: Ticket.State
      description: ServiceNow ticket state
      type: string
    - contextPath: Ticket.Summary
      description: ServiceNow ticket short summary
      type: string
    - contextPath: Ticket.Number
      description: ServiceNow ticket number
      type: string
  - arguments:
    - description: Short description of the ticket
      name: short_description
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - auto: PREDEFINED
      description: Ticket urgency
      name: urgency
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket severity
      name: severity
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket impact
      name: impact
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Does the ticket active(true/false)
      name: active
      predefined:
      - 'true'
      - 'false'
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: activity_due
    - description: List of assigned users to the ticket
      name: additional_assignee_list
    - description: Ticket history approval
      name: approval_history
    - description: Set ticket ApprovalSet - format "2016-07-02 21:51:11"
      name: approval_set
    - description: To whom the ticket is assigned
      name: assigned_to
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: business_duration
    - description: Business service
      name: business_service
    - description: Business source
      name: business_stc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: calendar_duration
    - description: UID Format
      name: caller_id
    - description: Category name
      name: category
    - description: UID Format
      name: caused_by
    - auto: PREDEFINED
      description: Ticket's close code
      name: close_code
      predefined:
      - Solved (Work Around)
      - Solved (Permanently)
      - Solved Remotely (Work Around)
      - Solved Remotely (Permanently)
      - Not Solved (Not Reproducible)
      - Not Solved (Too Costly)
      - Closed/Resolved by Caller
    - description: Close notes of the ticket
      name: close_notes
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: closed_at
    - description: User who closed the ticket
      name: closed_by
    - description: UID Format
      name: cmdb_ci
    - description: Format type journal input
      name: comments
    - description: Format type journal input
      name: comments_and_work_notes
    - description: UID Format
      name: company
    - description: Contact type
      name: contact_type
    - description: Correlation display
      name: correlation_display
    - description: Correlation id
      name: correlation_id
    - description: UID Format
      name: delivery_plan
    - auto: PREDEFINED
      description: If you want to display comments, work_notes...
      name: display
      predefined:
      - 'true'
      - 'false'
    - description: Ticket description
      name: description
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: due_date
    - description: Escalation
      name: escalation
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: expected_start
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: follow_up
    - description: UID format list
      name: group_list
    - auto: PREDEFINED
      description: Is the ticket solved in the knowledge base
      name: knowledge
      predefined:
      - 'true'
      - 'false'
    - description: Location of the ticket
      name: location
    - description: SLA of the ticket
      name: made_sla
    - auto: PREDEFINED
      description: Notify about this ticket
      name: notify
      predefined:
      - '1'
      - '0'
    - description: Order number
      name: order
    - description: UID Format
      name: parent
    - description: UID Format
      name: parent_incident
    - description: UID Format
      name: problem_id
    - description: How many users included in this ticket before
      name: reassignment_count
    - description: How many time the ticket has been reopened
      name: reopen_count
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: resolved_at
    - description: UID Format
      name: resolved_by
    - description: UID
      name: rfc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sla_due
    - description: Subcategory
      name: subcategory
    - description: Last updated by
      name: sys_updated_by
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sys_updated_on
    - description: Input from the end user
      name: user_input
    - description: A list of watched tickets
      name: watch_list
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: work_end
    - description: Format journal list
      name: work_notes
    - description: List with UIDs
      name: work_notes_list
    - description: Date when started to work on the ticket
      name: work_start
    - description: UID
      name: assignment_group
    - description: integer
      name: incident_state
    - description: Ticket number
      name: number
    - auto: PREDEFINED
      description: Priority of the ticket
      name: priority
      predefined:
      - 5 - Planning
      - 4 - Low
      - 3 - Moderate
      - 2 - High
      - 1 - Critical
    - description: System ID of the ticket to update
      name: id
      required: true
    - description: 'Custom(user defined) fields in the format: fieldname1=value;fieldname2=value; custom fields start with a "u_".'
      name: custom_fields
    - auto: PREDEFINED
      defaultValue: normal
      description: Type of Change Request ticket
      name: change_type
      predefined:
      - normal
      - standard
      - emergency
    - description: State of the ticket, e.g., "Closed" or "7" or "7 - Closed".
      name: state
    - description: Caller system ID
      name: caller
    deprecated: true
    description: Update specific ticket
    name: servicenow-update-ticket
  - arguments:
    - description: Short description of the ticket
      name: short_description
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - auto: PREDEFINED
      description: Ticket urgency
      name: urgency
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket severity
      name: severity
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Ticket impact
      name: impact
      predefined:
      - 3 - Low
      - 2 - Medium
      - 1 - High
    - auto: PREDEFINED
      description: Does the ticket active(true/false)
      name: active
      predefined:
      - 'true'
      - 'false'
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: activity_due
    - description: List of assigned users to the ticket
      name: additional_assignee_list
    - description: Ticket history approval
      name: approval_history
    - description: Set ticket ApprovalSet - format "2016-07-02 21:51:11" glide_date_time
      name: approval_set
    - description: To whom the ticket is assigned
      name: assigned_to
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: business_duration
    - description: Business service
      name: business_service
    - description: Business source
      name: business_stc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: calendar_duration
    - description: UID Format
      name: caller_id
    - description: Category name
      name: category
    - description: UID Format
      name: caused_by
    - description: Ticket's close code
      name: close_code
    - description: Close notes of the ticket
      name: close_notes
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: closed_at
    - description: User who closed the ticket
      name: closed_by
    - description: UID Format
      name: cmdb_ci
    - description: Format type journal input
      name: comments
    - description: Format type journal input
      name: comments_and_work_notes
    - description: UID Format
      name: company
    - description: Contact type
      name: contact_type
    - description: Correlation display
      name: correlation_display
    - description: Correlation id
      name: correlation_id
    - description: UID Format
      name: delivery_plan
    - auto: PREDEFINED
      description: If you want to display comments, work_notes...
      name: display
      predefined:
      - 'true'
      - 'false'
    - description: Ticket description
      name: description
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: due_date
    - description: Escalation
      name: escalation
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: expected_start
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: follow_up
    - description: UID format list
      name: group_list
    - auto: PREDEFINED
      description: Is the ticket solved in the knowledge base
      name: knowledge
      predefined:
      - 'true'
      - 'false'
    - description: Location of the ticket
      name: location
    - description: SLA of the ticket
      name: made_sla
    - auto: PREDEFINED
      description: Notify about this ticket
      name: notify
      predefined:
      - '1'
      - '0'
    - description: Order number
      name: order
    - description: UID Format
      name: parent
    - description: UID Format
      name: parent_incident
    - description: UID Format
      name: problem_id
    - description: How many users included in this ticket before
      name: reassignment_count
    - description: How many time the ticket has been reopened
      name: reopen_count
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: resolved_at
    - description: UID Format
      name: resolved_by
    - description: UID
      name: rfc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sla_due
    - description: Subcategory
      name: subcategory
    - description: Last updated by
      name: sys_updated_by
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sys_updated_on
    - description: Input from the end user
      name: user_input
    - description: A list of watched tickets
      name: watch_list
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: work_end
    - description: Format journal list
      name: work_notes
    - description: List with UIDs
      name: work_notes_list
    - description: Date when started to work on the ticket
      name: work_start
    - description: UID
      name: assignment_group
    - description: integer
      name: incident_state
    - description: Ticket number
      name: number
    - auto: PREDEFINED
      description: Priority of the ticket
      name: priority
      predefined:
      - 5 - Planning
      - 4 - Low
      - 3 - Moderate
      - 2 - High
      - 1 - Critical
    - description: System ID of the ticket to update
      name: id
      required: true
    - description: 'Custom(user defined) fields in the format: fieldname1=value;fieldname2=value;...'
      name: custom_fields
    - auto: PREDEFINED
      defaultValue: normal
      description: Type of Change Request ticket
      name: type
      predefined:
      - normal
      - standard
      - emergency
    - description: State of the ticket
      name: state
    deprecated: true
    description: Deprecated. Use servicenow-update-ticket or servicenow-update-record instead
    name: servicenow-update
  - arguments:
    - description: Short description of the ticket
      name: short_description
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
    - description: Ticket urgency
      name: urgency
    - description: Ticket severity
      name: severity
    - description: Ticket impact
      name: impact
    - auto: PREDEFINED
      description: Does the ticket active(true/false)
      name: active
      predefined:
      - 'true'
      - 'false'
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: activity_due
    - description: List of assigned users to the ticket
      name: additional_assignee_list
    - description: Ticket history approval
      name: approval_history
    - description: Set ticket ApprovalSet - format "2016-07-02 21:51:11" glide_date_time
      name: approval_set
    - description: To whom the ticket is assigned
      name: assigned_to
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: business_duration
    - description: Business service
      name: business_service
    - description: Business source
      name: business_stc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: calendar_duration
    - description: UID Format
      name: caller_id
    - description: Category name
      name: category
    - description: UID Format
      name: caused_by
    - description: Ticket's close code
      name: close_code
    - description: Close notes of the ticket
      name: close_notes
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: closed_at
    - description: User who closed the ticket
      name: closed_by
    - description: UID Format
      name: cmdb_ci
    - description: Format type journal input
      name: comments
    - description: Format type journal input
      name: comments_and_work_notes
    - description: UID Format
      name: company
    - description: Contact type
      name: contact_type
    - description: Correlation display
      name: correlation_display
    - description: Correlation id
      name: correlation_id
    - description: UID Format
      name: delivery_plan
    - auto: PREDEFINED
      description: If you want to display comments, work_notes...
      name: display
      predefined:
      - 'true'
      - 'false'
    - description: Ticket description
      name: description
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: due_date
    - description: Escalation
      name: escalation
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: expected_start
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: follow_up
    - description: UID format list
      name: group_list
    - auto: PREDEFINED
      description: Is the ticket solved in the knowledge base
      name: knowledge
      predefined:
      - 'true'
      - 'false'
    - description: Location of the ticket
      name: location
    - description: SLA of the ticket
      name: made_sla
    - auto: PREDEFINED
      description: Notify about this ticket
      name: notify
      predefined:
      - '1'
      - '0'
    - description: Order number
      name: order
    - description: UID Format
      name: parent
    - description: UID Format
      name: parent_incident
    - description: UID Format
      name: problem_id
    - description: How many users included in this ticket before
      name: reassignment_count
    - description: How many time the ticket has been reopened
      name: reopen_count
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: resolved_at
    - description: UID Format
      name: resolved_by
    - description: UID
      name: rfc
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sla_due
    - description: Subcategory
      name: subcategory
    - description: Last updated by
      name: sys_updated_by
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: sys_updated_on
    - description: Input from the end user
      name: user_input
    - description: A list of watched tickets
      name: watch_list
    - description: 'Format: YYYY-MM-DD HH:MM:SS'
      name: work_end
    - description: Format journal list
      name: work_notes
    - description: List with UIDs
      name: work_notes_list
    - description: Date when started to work on the ticket
      name: work_start
    - description: UID
      name: assignment_group
    - description: integer
      name: incident_state
    - description: Ticket number
      name: number
    - description: Priority of the ticket (number)
      name: priority
    - description: System ID of the ticket to update
      name: id
      required: true
    deprecated: true
    description: Deprecated. Use servicenow-update-ticket or servicenow-update-record instead
    name: servicenow-incident-update
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    deprecated: true
    description: Delete a ticket from ServiceNow
    name: servicenow-delete-ticket
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: The actual link to publish in ServiceNow ticket, valid url format, like http://www.demisto.com
      name: link
      required: true
    - description: Publish the link as comment on the ticket, if false will publish the link as WorkNote, format bool
      name: post-as-comment
    - description: The text to represent the link
      name: text
    deprecated: true
    description: Add a link to specific ticket
    name: servicenow-add-link
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
    - description: The actual link to publish in ServiceNow ticket, valid url format, like http://www.demisto.com
      name: link
      required: true
    - description: Publish the link as comment on the ticket, by default true, if false will publish the link as WorkNote, format bool
      name: post-as-comment
    - description: The text to represent the link
      name: text
    deprecated: true
    description: Deprecated. Use servicenow-add-link instead.
    name: servicenow-incident-add-link
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: Comment to add
      name: comment
      required: true
    - auto: PREDEFINED
      defaultValue: 'false'
      description: Specify to publish the note as comment on the ticket.
      name: post-as-comment
      predefined:
      - 'true'
      - 'false'
    deprecated: true
    description: Add comment to specific ticket by providing ticket id
    name: servicenow-add-comment
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
    - description: Comment to add
      name: comment
      required: true
    - description: Publish the link as comment on the ticket, if false will publish the link as WorkNote, format bool
      name: post-as-comment
    deprecated: true
    description: Deprecated. Use servicenow-add-comment instead.
    name: servicenow-incident-add-comment
  - arguments:
    - defaultValue: '10'
      description: Limit for how many tickets to retrieve
      name: limit
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: The query to run. To learn about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html
      name: query
    - defaultValue: '0'
      description: Starting record index to begin retrieving records from
      name: offset
    deprecated: true
    description: Retrieve ticket info with a query
    name: servicenow-query-tickets
    outputs:
    - contextPath: Ticket.ID
      description: The unique ticket identifier.
      type: string
    - contextPath: Ticket.Creator
      description: A string field that indicates the user who created the ticket.
      type: string
    - contextPath: Ticket.CreatedOn
      description: The date and time when the ticket was created.
      type: date
    - contextPath: Ticket.Assignee
      description: Specifies the user assigned to complete the ticket. By default, this field uses a reference qualifier to only display users with the itil role.
      type: string
    - contextPath: Ticket.State
      description: Status of the ticket.
      type: string
    - contextPath: Ticket.Summary
      description: A human-readable title for the record.
      type: string
    - contextPath: Ticket.Number
      description: The display value of the ticket.
      type: string
    - contextPath: Ticket.Active
      description: Specifies whether work is still being done on a task or whether the work for the task is complete.
      type: boolean
    - contextPath: Ticket.AdditionalComments
      description: Comments about the task record.
      type: Unknown
    - contextPath: Ticket.Priority
      description: Specifies how high a priority the ticket should be for the assignee.
      type: string
    - contextPath: Ticket.OpenedAt
      description: The date and time when the ticket was opened for the first time.
      type: date
    - contextPath: Ticket.Escalation
      description: Indicates how long the ticket has been open.
      type: string
  - arguments:
    - defaultValue: '10'
      description: Limit for how many tickets to retrieve
      name: limit
    - description: Query
      name: sysparm_query
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: The query to run. To learn about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html
      name: query
    deprecated: true
    description: Deprecated. Use servicenow-query-table or servicenow-query-tickets instead.
    name: servicenow-query
    outputs:
    - contextPath: Ticket.ID
      description: ServiceNow ticket System ID
      type: string
    - contextPath: Ticket.Creator
      description: ServiceNow ticket creator
      type: string
    - contextPath: Ticket.Assignee
      description: ServiceNow ticket assignee
      type: string
    - contextPath: Ticket.State
      description: ServiceNow ticket state
      type: string
    - contextPath: Ticket.Summary
      description: ServiceNow ticket short summary
      type: string
    - contextPath: Ticket.Number
      description: ServiceNow ticket number
      type: string
  - arguments:
    - defaultValue: '10'
      description: Limit for how many tickets to retrieve
      name: limit
    - description: Query
      name: sysparm_query
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
    deprecated: true
    description: Deprecated. Use servicenow-query-table or servicenow-query-tickets instead.
    name: servicenow-incidents-query
    outputs:
    - contextPath: Ticket.ID
      description: ServiceNow ticket System ID
      type: string
    - contextPath: Ticket.Creator
      description: ServiceNow ticket creator
      type: string
    - contextPath: Ticket.Assignee
      description: ServiceNow ticket assignee
      type: string
    - contextPath: Ticket.State
      description: ServiceNow ticket state
      type: string
    - contextPath: Ticket.Summary
      description: ServiceNow ticket short summary
      type: string
    - contextPath: Ticket.Number
      description: ServiceNow ticket number
      type: string
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
      - sc_request
      - sc_task
    - description: War-room entry ID that includes the file
      name: file_id
      required: true
    - description: Filename of uploaded file to override the existing file name in entry
      name: file_name
    deprecated: true
    description: Upload a file to a specific ticket
    name: servicenow-upload-file
    outputs:
    - contextPath: ServiceNow.Ticket.File.Filename
      description: Name of the file
      type: string
    - contextPath: ServiceNow.Ticket.File.Link
      description: Download link for the file
      type: string
    - contextPath: ServiceNow.Ticket.File.SystemID
      description: System ID of the file
      type: string
  - arguments:
    - description: Ticket System ID
      name: id
      required: true
    - auto: PREDEFINED
      defaultValue: incident
      description: Ticket type
      name: ticket_type
      predefined:
      - incident
      - problem
      - change_request
    - description: War-room entry ID that includes the file
      name: file_id
      required: true
    - description: Filename of uploaded file to override the existing file name in entry
      name: file_name
    deprecated: true
    description: Deprecated. Use servicenow-upload-file instead.
    name: servicenow-incident-upload-file
    outputs:
    - contextPath: Ticket.File.Filename
      description: Name of the file
      type: string
    - contextPath: Ticket.File.Link
      description: Download link for the file
      type: string
    - contextPath: Ticket.File.SystemID
      description: System ID of the file
      type: string
  - arguments:
    - description: Servicenow group name
      name: name
      required: true
    deprecated: true
    description: Deprecated. Use servicenow-query-groups instead.
    name: servicenow-get-groups
    outputs:
    - contextPath: ServiceNowGroups.GroupId
      description: Group Id
      type: string
    - contextPath: ServiceNowGroups.GroupName
      description: Group name
      type: string
  - arguments:
    - description: machine name
      name: computerName
      required: true
    deprecated: true
    description: Deprecated. Use servicenow-query-computers instead.
    name: servicenow-get-computer
    outputs:
    - contextPath: ServiceNowComputer.sys_id
      description: 'Id '
      type: string
    - contextPath: ServiceNowComputer.u_code
      description: Code
      type: string
    - contextPath: ServiceNowComputer.support_group
      description: Support group
      type: string
    - contextPath: ServiceNowComputer.os
      description: Operating System
      type: string
    - contextPath: ServiceNowComputer.comments
      description: Comments
      type: string
  - arguments:
    - description: Record system ID
      name: id
      required: true
    - description: Comma separated table fields to display and output to the context, e.g name,tag,company. ID field is added by default.
      name: fields
    - description: The name of the table to get the record from
      name: table_name
      required: true
    deprecated: true
    description: Retrieve record information by specific record ID
    name: servicenow-get-record
    outputs:
    - contextPath: ServiceNow.Record.ID
      description: The unique record identifier for the record.
      type: string
    - contextPath: ServiceNow.Record.UpdatedBy
      description: A string field that indicates the user who most recently updated the record.
      type: string
    - contextPath: ServiceNow.Record.UpdatedAt
      description: A time-stamp field that indicates the date and time of the most recent update.
      type: date
    - contextPath: ServiceNow.Record.CreatedBy
      description: A string field that indicates the user who created the record.
      type: string
    - contextPath: ServiceNow.Record.CreatedOn
      description: time-stamp field that indicates when a record was created.
      type: date
  - arguments:
    - description: The name of the table to query
      name: table_name
      required: true
    - defaultValue: '10'
      description: Limit for how many tickets to retrieve
      name: limit
    - description: The query to run. For more information about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html
      name: query
    - description: Comma separated table fields to display and output to the context, e.g name,tag,company. ID field is added by default.
      isArray: true
      name: fields
    - defaultValue: '0'
      description: Starting record index to begin retrieving records from
      name: offset
    deprecated: true
    description: Query a specified table in ServiceNow
    name: servicenow-query-table
    outputs:
    - contextPath: ServiceNow.Results.ID
      description: The unique record identifier for the record.
      type: string
    - contextPath: ServiceNow.Results.UpdatedBy
      description: A string field that indicates the user who most recently updated the record.
      type: string
    - contextPath: ServiceNow.Results.UpdatedAt
      description: A time-stamp field that indicates the date and time of the most recent update.
      type: date
    - contextPath: ServiceNow.Results.CreatedBy
      description: A string field that indicates the user who created the record.
      type: string
    - contextPath: ServiceNow.Results.CreatedOn
      description: time-stamp field that indicates when a record was created.
      type: date
  - arguments:
    - description: The name of the table to create a record in.
      name: table_name
      required: true
    - description: 'Fields and their values to create the record with, in the format: fieldname1=value;fieldname2=value;...'
      name: fields
    - description: 'Custom(user defined) fields in the format: fieldname1=value;fieldname2=value;...'
      name: custom_fields
    deprecated: true
    description: Create a new record in a specified ServiceNow table
    name: servicenow-create-record
    outputs:
    - contextPath: ServiceNow.Record.ID
      description: The unique record identifier for the record.
      type: string
    - contextPath: ServiceNow.Record.UpdatedBy
      description: A string field that indicates the user who most recently updated the record.
      type: string
    - contextPath: ServiceNow.Record.UpdatedAt
      description: A time-stamp field that indicates the date and time of the most recent update.
      type: date
    - contextPath: ServiceNow.Record.CreatedBy
      description: A string field that indicates the user who created the record.
      type: string
    - contextPath: ServiceNow.Record.CreatedOn
      description: time-stamp field that indicates when a record was created.
      type: date
  - arguments:
    - description: The name of the table to update the record in
      name: table_name
      required: true
    - description: The system ID of the ticket to update
      name: id
      required: true
    - description: 'Fields and their values to update in the record, in the format: fieldname1=value;fieldname2=value;...'
      name: fields
    - description: 'Custom(User defined) fields and their values to update in the record, in the format: fieldname1=value;fieldname2=value;...'
      name: custom_fields
    deprecated: true
    description: Update a record in a specified ServiceNow table
    name: servicenow-update-record
    outputs:
    - contextPath: ServiceNow.Record.ID
      description: The unique record identifier for the record.
      type: string
    - contextPath: ServiceNow.Record.UpdatedBy
      description: A string field that indicates the user who most recently updated the record.
      type: string
    - contextPath: ServiceNow.Record.UpdatedAt
      description: A time-stamp field that indicates the date and time of the most recent update.
      type: date
    - contextPath: ServiceNow.Record.CreatedBy
      description: A string field that indicates the user who created the record.
      type: string
    - contextPath: ServiceNow.Record.CreatedOn
      description: time-stamp field that indicates when a record was created.
      type: date
  - arguments:
    - description: The table name
      name: table_name
      required: true
    - description: The system ID of the ticket to delete
      name: id
      required: true
    deprecated: true
    description: Delete a record in a specified ServiceNow table
    name: servicenow-delete-record
  - arguments:
    - description: Table name
      name: table_name
      required: true
    deprecated: true
    description: List API fields for a specified ServiceNow table
    name: servicenow-list-table-fields
    outputs:
    - contextPath: ServiceNow.Field
      description: Table API field name
      type: string
  - arguments:
    - description: Query by computer sys_id
      name: computer_id
    - description: Query by computer name
      name: computer_name
    - description: Query by specified query, for more information about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html
      name: query
    - description: Query by asset tag
      name: asset_tag
    - defaultValue: '10'
      description: Query results limit
      name: limit
    - defaultValue: '0'
      description: Starting record index to begin retrieving records from
      name: offset
    deprecated: true
    description: Query the cmdb_ci_computer table in ServiceNow
    name: servicenow-query-computers
    outputs:
    - contextPath: ServiceNow.Computer.ID
      description: Computer sys_id
      type: string
    - contextPath: ServiceNow.Computer.AssetTag
      description: Computer Asset tag
      type: string
    - contextPath: ServiceNow.Computer.Name
      description: Computer name
      type: string
    - contextPath: ServiceNow.Computer.DisplayName
      description: Computer display name
      type: string
    - contextPath: ServiceNow.Computer.SupportGroup
      description: Computer support group
      type: string
    - contextPath: ServiceNow.Computer.OperatingSystem
      description: Computer operating system
      type: string
    - contextPath: ServiceNow.Computer.Company
      description: Computer company sys_id
      type: string
    - contextPath: ServiceNow.Computer.AssignedTo
      description: Computer assigned to user sys_id
      type: string
    - contextPath: ServiceNow.Computer.State
      description: Computer state
      type: string
    - contextPath: ServiceNow.Computer.Cost
      description: Computer cost
      type: string
    - contextPath: ServiceNow.Computer.Comments
      description: Computer comments
      type: string
  - arguments:
    - description: Query by group sys_id
      name: group_id
    - description: Query by group name
      name: group_name
    - description: Query by specified query, for more information about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html
      name: query
    - defaultValue: '10'
      description: Query results limit
      name: limit
    - defaultValue: '0'
      description: Starting record index to begin retrieving records from
      name: offset
    deprecated: true
    description: Query the sys_user_group table in ServiceNow
    name: servicenow-query-groups
    outputs:
    - contextPath: ServiceNow.Group.ID
      description: Group sys_id
      type: string
    - contextPath: ServiceNow.Group.Description
      description: Group description
      type: string
    - contextPath: ServiceNow.Group.Name
      description: Group name
      type: string
    - contextPath: ServiceNow.Group.Manager
      description: Group manager sys_id
      type: string
    - contextPath: ServiceNow.Group.Updated
      description: Group update time
      type: date
  - arguments:
    - description: Query by user sys_id
      name: user_id
    - description: Query by username
      name: user_name
    - description: Query by specified query, for more information about querying in ServiceNow, see https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html
      name: query
    - defaultValue: '10'
      description: Query results limit
      name: limit
    - defaultValue: '0'
      description: Starting record index to begin retrieving records from
      name: offset
    deprecated: true
    description: Query the sys_user table in ServiceNow
    name: servicenow-query-users
    outputs:
    - contextPath: ServiceNow.User.ID
      description: User sys_id
      type: string
    - contextPath: ServiceNow.User.Name
      description: User name (first + last)
      type: string
    - contextPath: ServiceNow.User.UserName
      description: User username
      type: string
    - contextPath: ServiceNow.User.Email
      description: User email
      type: string
    - contextPath: ServiceNow.User.Created
      description: User creation time
      type: date
    - contextPath: ServiceNow.User.Updated
      description: User update time
      type: date
  - arguments:
    - description: The table label, e.g Asset, Incident, IP address etc.
      name: label
      required: true
    - defaultValue: '10'
      description: Results limit
      name: limit
    - description: Starting record index to begin retrieving records from
      name: offset
    deprecated: true
    description: Get table names by a label to use in commands
    name: servicenow-get-table-name
    outputs:
    - contextPath: ServiceNow.Table.ID
      description: Table system ID
      type: string
    - contextPath: ServiceNow.Table.Name
      description: Table name to use in commands, e.g alm_asset
      type: string
    - contextPath: ServiceNow.Table.SystemName
      description: Table system name, e.g Asset
      type: string
  - arguments:
    - default: true
      description: Ticket System ID
      name: id
      required: true
    - defaultValue: '10'
      description: Limit for the ticket notes
      name: limit
    - defaultValue: '0'
      description: Offset of the ticket notes
      name: offset
    deprecated: true
    description: Get notes from the specified ServiceNow ticket - Read permissions are required for the sys_journal_field table.
    name: servicenow-get-ticket-notes
    outputs:
    - contextPath: ServiceNow.Ticket.ID
      description: Ticket ID
      type: string
    - contextPath: ServiceNow.Ticket.Note.Value
      description: Ticket note value
      type: unknown
    - contextPath: ServiceNow.Ticket.Note.CreatedOn
      description: Ticket note created on
      type: date
    - contextPath: ServiceNow.Ticket.Note.CreatedBy
      description: Ticket note created by
      type: string
    - contextPath: ServiceNow.Ticket.Note.Type
      description: Ticket note type
      type: string
  isfetch: true
  script: '-'
  type: python
  subtype: python2
  dockerimage: demisto/python:2.7.18.20958
tests:
- No test - Hibernating instance
fromversion: 5.0.0