
ServiceNow Connector 4.0
Standard
The ServiceNow connector facilitates connections between Mule integration and ServiceNow applications. The ServiceNow connector currently provides access to standard tables in the ServiceNow database, enabling you to perform the following set of operations on them: Insert, Delete Record, Delete Multiple, Update, Get, Get Keys, and Get Record.
Release Notes: ServiceNow Connector Release Notes
Before You Begin
This document assumes that you are familiar with Mule, Anypoint Connectors, Anypoint Studio essentials, elements in a Mule flow, and global elements.
If you don’t use Anypoint Studio for development, view ServiceNow reference to set dependencies in your pom.xml
file.
For ServiceNow connector v5.0 to function properly, the namespace for locally declared elements must be qualified by the target namespace. Make the following change in your ServiceNow instance to do so:
-
Go to System Properties > Web Services
-
Click Properties
-
De-select the YES|NO box for the elementFormDefault property as shown below.
Note that the box is selected by default, setting the elementFormDefault property to true. By de-selecting the box, we set the property to false thereby specifying that locally declared elements must be qualified by the target namespace.
To Install this Connector
-
In Anypoint Studio, click the Exchange icon in the Studio taskbar.
-
Click Login in Anypoint Exchange.
-
Search for the connector and click Install.
-
Follow the prompts to install the connector.
When Studio has an update, a message displays in the lower right corner, which you can click to install the update.
To use the ServiceNow connector in a production environment, you must have either:
-
An Enterprise license to use Mule
-
A CloudHub Starter, Professional, or Enterprise account
Contact the MuleSoft Sales Team to obtain either of these.
Configuration
To use the ServiceNow connector in your Mule application, you must configure:
-
A global ServiceNow element to be used by all the ServiceNow connectors in the application.
-
Parameters of each ServiceNow connector instance in the flow.
Studio Visual
Follow these steps to create a global ServiceNow configuration in a Mule application:
-
Click the Global Elements tab at the base of the canvas, then click Create.
-
In the Choose Global Type wizard, use the filter to locate and select, ServiceNow, then click OK.
-
Configure the parameters according to instructions below.
Field Description Name
Enter a name for the configuration so it can be referenced later.
Username
Username for connecting to the ServiceNow instance
Password
Password to log into the ServiceNow instance
Service Endpoint
The URL of the ServiceNow instance.
Format:` https://<instancename>.service-now.com` -
Access the Pooling Profile tab to configure any settings relevant to managing multiple connections via a connection pool.
-
Access the Reconnection tab to configure any settings relevant to reconnection strategies that Mule should execute if it loses its connection to ServiceNow.
-
Click OK to save the global connector configurations.
-
Return to the Message Flow tab in Studio.
Follow these steps to configure the parameters of a ServiceNow connector in the flow:
-
Drag the ServiceNow connector onto the canvas, then select it to open the properties editor.
-
Configure the connector’s parameters according to the table below.
Field Description Display Name
Enter a unique label for the connector in your application.
Connector Configuration
Connect to a global element linked to this connector. Global elements encapsulate reusable data about the connection to the target resource or service. Select the global ServiceNow connector element that you just created.
Operation
Select the action this component must perform: Insert, Delete Record, Delete Multiple, Update, Get, Get Keys, and Get Record.
Type
Select the ServiceNow table to act upon. For a complete list, see the ServiceNow Release Notes.
<Operation> Request
From Message: Select this option to define the operation based on the incoming payload.
Create Object manually: Select this option to define the search values manually. Mule provides an editor to facilitate this task. -
Save your configurations.
XML Editor
-
Include the ServiceNow namespaces in your configuration file.
http://www.mulesoft.org/schema/mule/servicenow http://www.mulesoft.org/schema/mule/servicenow/current/mule-servicenow.xsd
Create a global ServiceNow configuration outside and above your flows, using the following global configuration code.
<servicenow:config name="ServiceNow" username="YOUR_USERNAME" password="YOUR_PASSWORD" serviceEndpoint="YOUR_SERVICENOW_URI"/>
Attribute Description name
Enter a name for the configuration so it can be referenced from within the flow.
username
Username for connecting to the ServiceNow instance.
password
Password to log into the ServiceNow instance.
serviceEndpoint
The URL of the ServiceNow instance.
Format:https://<instancename>.service-now.com
-
Build your application flow, then add a ServiceNow connector using one of the following operations.
Operation Description Delete multiple records from the targeted table by example values.
Delete a record from the targeted table by supplying its sys_id.
Query a single record from the targeted table by sys_id and return the record and its fields.
Query the targeted table by example values and return a comma delimited list of sys_id.
Query the targeted table by example values and return all matching records and their fields.
Creates a new record for the targeted table.
Updates a existing record in the targeted table in the URL, identified by the mandatory sys_id field.
Follow the links in the table above to access detailed configuration reference for each of these operations.
See Also
-
Learn more about working with Anypoint Connectors.