Procedures

Automation procedures in the ServiceNow BDK Book.

to create a (record) in a table name

Creates a new record in a ServiceNow account.

Input Concepts

Concept
Description
Type
Required
Default Value

The ServiceNow Record object to be created.

servicenow record

Yes

table name

The table name in which the record will be created.

text

Yes

Output Concepts

Concept
Description
Type

A ServiceNow Record object representing the newly created record.

servicenow record

Examples

Create a new incident in the 'incident' table with the specified attributes.

create a json
use the above as the incident
set the incident's "short_description" to "Test Incident"
set the incident's "urgency" to "1"
set the incident's "impact" to "1"
create the incident in "incident"

to delete some records

Deletes records from ServiceNow using batch processing.

Input Concepts

Concept
Description
Type
Required
Default Value

The records to be deleted.

servicenow record

Yes

Examples

Delete incidents in the 'incident' table.

...
use the above as the records
delete the records

to retrieve some (records) from servicenow

FILTER - CAPABLE

Retrieves a list of ServiceNow records based on the specified filters.

Input Concepts

Concept
Description
Type
Required
Default Value

table name

The table name from which to retrieve records.

text

Yes

limit

The limit of objects brought by the call.

text

No

Output Concepts

Concept
Description
Type

List of ServiceNow Records based on the specified filters.

servicenow record

Examples

Retrieve all incidents from the 'incident' table.

retrieve some records from servicenow
... the table name is "incident"

Retrieve all incidents from the 'incident' table whose number is 'INC0010001'.

retrieve some records from servicenow whose number is "INC0010001"
... the table name is "incident"

Retrieve all incidents from the 'incident' table whose created date is after '2022-01-01'.

the date is "2024-02-25T12:30:00Z"
get the date as a datetime
use the above as the target
retrieve some records from servicenow whose "sys_created_on" is greater than the target
... the table name is "incident"

Retrieve 5 incidents from the 'incident' table.

retrieve some records from servicenow
... the table name is "incident"
... the limit is "5"

to update a record

Updates a record in ServiceNow, identified by its incident number, with specified attributes and their new values.

Input Concepts

Concept
Description
Type
Required
Default Value

The ServiceNow Record object to be updated.

servicenow record

Yes

Output Concepts

Concept
Description
Type

The updated record from ServiceNow.

servicenow record

Examples

Update an incident in the 'incident' table with the specified attributes.

...
use the above as the record
set the record's "short_description" to "Updated Incident"
set the record's urgency to "2"
set the record's impact to "2"
update the record

Last updated

Was this helpful?