Nav
You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

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.

Prerequisites

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:

  1. Go to System Properties > Web Services

  2. Click Properties

  3. De-select the YES|NO box for the elementFormDefault property as shown below.

    snow-screen 

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

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. 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:

  1. Click the Global Elements tab at the base of the canvas, then click Create.

  2. In the Choose Global Type wizard, use the filter to locate and select, ServiceNow, then click OK.

  3. Configure the parameters according to instructions below.

    serviceNowge

    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`

  4. Access the Pooling Profile tab to configure any settings relevant to managing multiple connections via a connection pool.

  5. Access the Reconnection tab to configure any settings relevant to reconnection strategies that Mule should execute if it loses its connection to ServiceNow.

  6. Click OK to save the global connector configurations.

  7. Return to the Message Flow tab in Studio.

Follow these steps to configure the parameters of a ServiceNow connector in the flow:

  1. Drag the ServiceNow connector onto the canvas, then select it to open the properties editor.

  2. 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.

  3. Save your configurations.

XML Editor

  1. Include the ServiceNow namespaces in your configuration file.

    
                 
              
    1
    2
    
    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

  2. Build your application flow, then add a ServiceNow connector using one of the following operations.

    Operation Description

    <servicenow:delete-multiple>

    Delete multiple records from the targeted table by example values.

    <servicenow:delete-record>

    Delete a record from the targeted table by supplying its sys_id.

    <servicenow:get>

    Query a single record from the targeted table by sys_id and return the record and its fields.

    <servicenow:get-keys>

    Query the targeted table by example values and return a comma delimited list of sys_id.

    <servicenow:get-records>

    Query the targeted table by example values and return all matching records and their fields.

    <servicenow:insert>

    Creates a new record for the targeted table.

    <servicenow:update>

    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

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+