ServiceNow Insert

ServiceNow Insert

In this article

 

Overview

You can use this Snap to insert the incoming records into a specified ServiceNow table.

sn-insert-overview.png

Snap Type

ServiceNow - Insert Snap is a Write-type Snap.

Prerequisites

A valid ServiceNow Account that can connect to the ServiceNow Platform.

Support for Ultra Tasks

Works in Ultra Tasks. However, set the Page size to 1 for the Snap to process one document/record at a time.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

 

  • Min: 1

  • Max: 1

  • Mapper

  • JSON Formatter

A table name and record details.

Output

Document

 

  • Min: 1

  • Max: 1

  • Mapper

  • Filter

  • JSON Formatter

Returns the complete response (including all fields of the inserted record) as output documents

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk ( * ): Indicates a mandatory field.

  • Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ( ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( ): Indicates that you can add fields in the fieldset.

  • Remove icon ( ): Indicates that you can remove fields from the fieldset.

  • Upload icon ( ): Indicates that you can upload files.

Field

Field Type

Description

Label

 

String

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Table name

 

String/Expression/Suggestion

Required. The specific ServiceNow table where records will be inserted. This field is suggestible and requires an account setting for the suggestions to appear.

Only accounts that have the 'Personalize dictionary' role can see the field labels associated with each table in the ServiceNow data dictionary. Therefore, accounts used with Snaps in this Snap Pack must have the ‘Personalize dictionary’ permission if you want to view the Table name suggestions.

Default value: [None]
Example: incident

Page size

Integer/Expression

Required. Number of documents for processing in a single batch.

Default value: 500
Example: 1000

Minimum Value: 1
Maximum Value: 500

Set the value as 1 when using the Snap in an Ultra Pipeline.

Number of retries

Integer/Expression

Maximum retry attempts on failure.

Default value: 0
Example: 3

Minimum value: 0

Retry interval (seconds)

Integer/Expression

Wait time between retry attempts in seconds.

Default value: 1
Example: 3

Minimum value: 1

Dropdown list


Example

Insert catalog categories into ServiceNow

This example pipeline demonstrates how to insert a new record in a ServiceNow table. It maps static data values for the name and price fields and inserts the formatted data into the ServiceNow catalog_category_request table.

ex1-sn-insert-pipe-overview.png

Prerequisite: A valid ServiceNow account (see Configuring ServiceNow Accounts) to be used with this Snap. 

Configure the Mapper Snap to map ServiceNow record details to the input fields of the ServiceNow Insert Snap.

ex1-sn-insert-mapper-config.png


Connect the ServiceNow - Insert Snap with the target table name (catalog_category_request). It inserts the mapped data into the ServiceNow catalog_category_request table

ex1-sn-insert-snap-config.png

Execute the pipeline to insert the records. Preview the data to verify successful insertion. 

ex1-sn-insert-output.png