ServiceNow actions reference

5 minute read

ServiceNow actions in CloudBees Unify provide programmatic access to change request management operations through four distinct action types. Use this reference when configuring ServiceNow integrations, setting up workflow parameters, or troubleshooting action configurations.

Action types

ServiceNow integration supports four action types for change request lifecycle management. Each action requires specific input parameters and produces defined outputs for workflow integration.

  • create: Creates new ServiceNow change requests with configurable properties and optional blackout window validation

  • get: Retrieves current state and conflict status of existing change requests

  • update: Modifies existing change request properties or closes change requests with completion codes

  • poll-for-approval: Continuously monitors change request approval status with configurable polling intervals

Authentication requirements

All ServiceNow actions require authentication credentials and ServiceNow host URL. Two authentication methods are supported with different parameter requirements.

Basic authentication

Required parameters: username, password. Uses ServiceNow user account credentials for API access.

OAuth authentication

Required parameters: username, password, client-id, client-secret. Provides OAuth-based authentication with client credentials for enhanced security.

Create change request action

The create action generates new ServiceNow change requests with specified properties and optional blackout window conflict validation.

Input parameters

Parameter Data type Required Description

action-type

String

Yes

The operation type must be "create"

url

String

Yes

The ServiceNow host URL

username

String

Yes

The username used for authentication

password

String

Yes

The password used for authentication

client-id

String

OAuth only

The unique identification number of the client

client-secret

String

OAuth only

The client secret used for authentication

short-description

String

No

A brief title to identify the change request

long-description

String

No

Additional information about the change request ticket

cr-type

String

No

The type of change request. Default: "normal"

state

String

No

The current status of the change request

priority

String

No

The priority of the change request

risk

String

No

The risk involved in the change request

impact

String

No

The impact of the change request

category

String

No

The change request ticket category

requested-by

String

No

The user that requested the change

assignment-group

String

No

The assignment group to which the change request must be mapped

assigned-to

String

No

The user to whom the change request ticket must be assigned in the assignment group

validate-blackout-window-conflict

Boolean

No

Whether to check if there is a blackout window conflict. Default: false

planned-start-date

String

If blackout validation enabled

The scheduled start date and time of the change request, formatted as yyyy-mm-dd hh:mm:ss

planned-end-date

String

If blackout validation enabled

The scheduled end date and time of the change request, formatted as yyyy-mm-dd hh:mm:ss

additional-parameters

JSON string

No

Any additional parameters apart from the list provided above

Output parameters

Parameter Data type Description

number

String

The unique change request number auto-generated during change request creation

sys_id

String

The identifier auto-generated during change request creation

state

String

The current status of the change request

Get change request action

The get action retrieves the current state and conflict status of existing ServiceNow change requests.

Input parameters

Parameter Data type Required Description

action-type

String

Yes

The type of operation must be "get"

url

String

Yes

The ServiceNow host URL

username

String

Yes

The username used for authentication

password

String

Yes

The password used for authentication

client-id

String

OAuth only

The unique identification number of the client

client-secret

String

OAuth only

The client secret used for authentication

cr-number

String

Yes

The unique number auto-generated during change request creation

Output parameters

Parameter Data type Description

number

String

The change request number

sys_id

String

The identifier used to update the change request

state

String

The current status of the change request

conflict_status

String

The current conflict status of the planned dates

Update change request action

The update action modifies existing change request properties or closes change requests with completion codes and notes.

Input parameters

Parameter Data type Required Description

action-type

String

Yes

The type of operation must be "update" for both updating and closing a change request

url

String

Yes

The ServiceNow host URL

username

String

Yes

The username used for authentication

password

String

Yes

The password used for authentication

client-id

String

OAuth only

The unique identification number of the client

client-secret

String

OAuth only

The client secret used for authentication

sys-id

String

Yes

The identifier auto-generated during change request creation

close-code

String

Close operation only

The code assigned to the change request by the user closing it. Required if configured as mandatory in ServiceNow

close-notes

String

Close operation only

The notes entered by the user closing the change request. Required if configured as mandatory in ServiceNow

short-description

String

No

A short title for easy identification

description

String

No

Additional information about the change request ticket

cr-type

String

No

The type of change request. Default: "normal"

state

String

No

The current status of the change request (matches the ServiceNow configuration)

priority

String

No

The priority of the change request

risk

String

No

The risk involved in the change request

impact

String

No

The impact of the change request

category

String

No

The change request ticket category

requested-by

String

No

The user that requested the change

assignment-group

String

No

The assignment group to which the change request must be mapped

assigned-to

String

No

The user to whom the change request ticket must be assigned in the assignment group

additional-parameters

JSON string

No

Any additional parameters apart from the list provided above

Output parameters

Parameter Data type Description

sys_id

String

The identifier used for change request updates

state

String

The current status of the change request

Poll for approval action

The poll for approval action continuously monitors change request approval status with configurable polling intervals and timeout constraints.

Input parameters

Parameter Data type Required Description

url

String

Yes

The ServiceNow host URL

username

String

Yes

The username used for authentication

password

String

Yes

The password used for authentication

client-id

String

OAuth only

The unique identification number of the client

client-secret

String

OAuth only

The client secret used for authentication

cr-number

String

Yes

The unique number auto-generated during change request creation

poll-interval

String

No

The polling interval, in minutes, for the action to periodically check the approval status in ServiceNow. Default: 3, Maximum: 5760 minutes

poll-duration

String

No

The maximum time duration, in minutes, for the action to continue polling for approval status in ServiceNow. Default: 60, Maximum: 5760 minutes

state-field-value

String

Conditional

The value of the state field in ServiceNow. Required if approval field values are not specified. Action continues polling until state field matches this value

approval-field-value-approved

String

Conditional

The value of the approval field in ServiceNow that indicates the change request is approved. Required if approval-field-value-rejected is specified

approval-field-value-rejected

String

Conditional

The value of the approval field in ServiceNow that indicates the change request is rejected. Required if approval-field-value-approved is specified

Output parameters

Parameter Data type Description

number

String

The unique change request number auto-generated during change request creation

sys_id

String

The identifier auto-generated during change request creation

approval

String

The value of the approval field in ServiceNow

state

String

The current status of the change request

Workflow integration patterns

ServiceNow actions support parameter referencing between workflow steps for seamless change request lifecycle management. Output parameters from previous steps can be referenced as inputs in subsequent steps.

Cross-action parameter references

Use sys_id output from create action as input for update operations. Use number output from create action as input for get and poll operations. Reference outputs using ${{ fromJSON(steps.STEP_ID.outputs.servicenow_output).PARAMETER }} syntax.

Blackout window validation

Enable validation using validate-blackout-window-conflict: true. Requires both planned-start-date and planned-end-date parameters. Action fails if blackout window conflict detected during specified timeframe. Date format: yyyy-mm-dd hh:mm:ss (evaluated in UTC or ServiceNow-configured timezone).

Polling behavior constraints

Poll interval range: 1-5760 minutes (default: 3 minutes). Poll duration range: 1-5760 minutes (default: 60 minutes). Action requires at least one polling condition: state field value OR approval field values. Polling continues until specified condition met or duration timeout reached.