Nav

ServiceNow Connector 4.0

Select

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, and the Anypoint Studio interface. To increase your familiarity with Studio, consider completing one or more Anypoint Studio Tutorials. Further, this page assumes that you have a basic understanding of Mule flows and Mule Global Elements

This document describes implementation examples within the context of Anypoint Studio, Mule’s graphical user interface, and, also includes configuration details for doing the same in the XML Editor. 

If you don’t use Anypoint Studio for development, follow the instructions to http://mulesoft.github.io/servicenow-connector/4.0.1/mule/servicenow-config.html[install the ServiceNow Maven dependencies] into your pom.xml file.

For ServiceNow connector v4.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. (Read more about Installing an Enterprise License.)

Configuration Using Anypoint Studio

To use the ServiceNow connector in your Mule application, configure:

  • If needed, a global ServiceNow element to be used by all the ServiceNow connectors in the application.

  • Parameters of each ServiceNow connector instance in the flow.

Configure a Global Element

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.

Configure Connector Properties

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.

Configuration from the XML Editor

  1. To use the ServiceNow connector in your Mule application, configure:

    • If needed, a global ServiceNow element to be used by all the ServiceNow connectors in the application.

    • Parameters of each ServiceNow connector instance in the flow.

  2. Ensure that you have included 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
  3. Create a global ServiceNow configuration outside and above your flows, using the following global configuration code.

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

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

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.

+