# mulesoft ServiceNow Connector - Full Documentation
---
product: ServiceNow Connector
version: 6.17
---
# ServiceNow Connector 6.17
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime
engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables,
along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
- Anypoint Connectors
- Mule runtime engine (Mule)
- Elements in a Mule flow and global elements
- How to create a Mule app using Anypoint Studio
Before creating an app, you must have access to the ServiceNow target resource and Anypoint
Platform.
## Common Use Cases for the Connector
Common use cases for ServiceNow Connector include:
- **IT Service Management (ITSM)**
Sync ServiceNow data and extend IT service management (ITSM) capabilities to SaaS and on-premises
applications, such as Salesforce, SAP, Workday, and Microsoft Dynamics 365, to help with data
migration and replication, application integration, and consolidation. For example, you can
bidirectionally sync workers data between Workday and ServiceNow or aggregate employees from
Workday and users from ServiceNow into a CSV file.
- **Integrated Business Processes**
Fully integrate business processes across HR, legal, procurement, operations, marketing, and
facilities departments.
- **Record Creation and Retrieval**
Transform enterprise IT by automating and managing IT service relationships to create a single
system of records that you can retrieve.
For examples of these use cases, refer to
[ServiceNow Connector Examples](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-examples).
## Audience
- New users, read:
- [Using Anypoint Studio to Configure the Connector](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-studio) to create your
Mule app
- Advanced users, read:
- [XML and Maven Support](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-xml-maven)
- [Examples](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-examples), which provides one or more use cases for the
connector
## Connection Types
The following authentication types are supported:
- Basic
- OAuth 2.0 Authorization Code
### Limitations
- OAuth 2.0 Authorization Code authentication works only with the following versions of Mule:
- 4.1.5
- 4.2.1 and later
- Metadata does not work with OAuth 2.0 Authorization Code authentication.
## Use Exchange Templates and Examples
[Anypoint Exchange](https://www.mulesoft.com/exchange/) provides templates you can use as a starting
point for your app, as well as examples that illustrate a complete solution.
- [Workday and ServiceNow Worker Bidirectional Sync](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-worker-bidirectional-sync)
- [Workday Worker to ServiceNow Service Request Migration](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-workerservicerequest-migration/)
- [Workday and ServiceNow Employee Aggregation](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-employee-aggregation/)
- [Workday to ServiceNow Service Worker Migration](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-worker-migration/)
- [Workday Worker to ServiceNow Service Request Broadcast](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-worker2servicerequest-broadcast/)
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to
create an app with [Anypoint Studio](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-studio).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Use Anypoint Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange)
- [ServiceNow Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/servicenow-connector-release-notes-mule-4)
- [ServiceNow Connector on Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-servicenow-connector/)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.17
---
# ServiceNow Connector 6.17 Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
To fully benefit from using Anypoint Connector for ServiceNow (ServiceNow Connector), see the
following examples.
## Retrieve Records from a ServiceNow Incident Table
This example creates a Mule flow that retrieves records from the `Incident` table. The following
screenshot shows the Studio app flow for this example:

Figure 1. App flow for the Retrieve Records example
1. Create a Mule project in Studio.
2. Add and configure an **HTTP Listener** trigger for your flow with this path:
`getrecords`

3. Add a **Transform Message** component after the HTTP connector and provide a transformation
script similar to this:
%dw 2.0 output application/xml ns ns0 http://www.service-now.com/incident
---
{ ns0#getRecords: { ns0#description: 'Test WSDL QA' } }
> [!NOTE] Add a description that matches records in your ServiceNow incident table.
4. Add the **Invoke** operation from ServiceNow after the **Transform** component.
5. Set up, test, and save a ServiceNow configuration for the connection to the ServiceNow server.
If the connection is unsuccessful, correct any invalid connection parameters, and test again.


6. In the **General** tab in the navigation, set **Service** to `incident` and **Operation** to
`getRecords`.
7. Optionally, choose **Show Reference Values** from the values (`ALL`, `TRUE`, `FALSE`)
> [!IMPORTANT] In Studio 7.5.0 and later, you can choose the `service` and `operation` keys
> without specifying the `Show Reference Values` key to resolve the metadata. However, in
> earlier Studio versions, metadata won’t be loaded until you specify all of the metadata keys,
> and if you don’t specify all of the metadata keys, it results in a tooling exception.

8. Set the Message Body to `payload`.
9. Add the **Transform Message** component to `transform XML to JSON` for better readability. For
example:
%dw 2.0 output application/json
---
payload
10. Add a **Logger** component to the end of your flow that takes a `payload` (or `#[payload]`) as
the message.
11. Deploy or run your app.
12. Test the app by navigating to `http://localhost:8081/getrecords`
The response should look similar to this example (several fields are omitted for brevity):
{ "headers": {
}, "attachments": {
}, "body": { "getRecordsResponse": { "getRecordsResult": { "active": "1", "activity\_due":
"2019-09-24 09:48:15", "approval": "not requested", "business\_stc": "0", "calendar\_stc": "0",
"category": "Software", "child\_incidents": "0", "description": "Test WSDL QA", "escalation": "0",
"hold\_reason": "0", "impact": "1", "incident\_state": "1", "knowledge": "0", "made\_sla": "1",
"notify": "1", "number": "INC0011616", "opened\_at": "2019-09-20 07:30:34", "opened\_by":
"6816f79cc0a8016401c5a33be04be441", "order": "0", "priority": "1", "reassignment\_count": "0",
"reopen\_count": "0", "severity": "3", "state": "1", "sys\_class\_name": "incident",
"sys\_created\_by": "admin", "sys\_created\_on": "2019-09-20 07:30:34", "sys\_domain": "global",
"sys\_domain\_path": "/", "sys\_id": "c03deab4db840010a0e6e04a48961999", "sys\_mod\_count": "47",
"sys\_updated\_by": "system", "sys\_updated\_on": "2019-09-24 07:48:15", "upon\_approval":
"proceed", "upon\_reject": "cancel", "urgency": "1", } } } }
If you use `ALL` for `Show Reference Values`, the response is similar to this abbreviated output, in
which the response element name for the display value field begins with `dv`:
{ "headers": {
}, "attachments": {
}, "body": { "getRecordsResponse": { "getRecordsResult": { "active": "1", "dv\_active": "true",
"activity\_due": "2020-05-07 13:14:19", "dv\_activity\_due": "2020-05-07 06:14:19",
"additional\_assignee\_list": null, "dv\_additional\_assignee\_list": null, "approval": "not
requested", "dv\_approval": "Not Yet Requested", } } } }
The response element name for the display value field is prefixed with `dv`.
## Retrieve ServiceNow Incident Table Keys
This example creates a Mule flow that retrieve keys from the Incident table in a ServiceNow
instance:
1. Create a Mule application as a project in Studio.
2. Add and configure an HTTP **Listener** trigger for your flow, and set the **Path** to
`/getkeys`.
3. Add a **Transform Message** component after the HTTP **Listener** operation.
4. Provide a transformation script similar to this (use a description that matches records in your
ServiceNow incident table):
%dw 2.0 output application/xml ns ns0 http://www.service-now.com/incident
---
{ ns0#getKeys: { ns0#description: 'Test WSDL QA' } }
5. Add the ServiceNow **Invoke** operation after the **Transform Message** component.
6. Set up, test, and save a ServiceNow configuration for the connection to the ServiceNow server.
If the connection is unsuccessful, correct any invalid connection parameters and test again.
7. In the **General** tab navigation, set **Service** to `incident` and **Operation** to `getKeys`.
8. Set the Message Body to `payload`.
9. Add the **Transform Message** component to transform XML to JSON for better readability. For
example:
%dw 2.0 output application/json
---
payload
10. Add a **Logger** component to the end of your flow that takes a `payload` (or `#[payload]`) as
the message.
11. Deploy or run your app.
12. To test the app, navigate to: `http://localhost:8081/getkeys`
13. The response should look similar to this:
{ "headers": {
}, "attachments": {
}, "body": { "getKeysResponse": { "sys\_id":
"c03deab4db840010a0e6e04a48961999,0f517ab8db840010a0e6e04a489619bc,6f1236f8db840010a0e6e04a489619f5",
"count": "3" } } }
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Using Anypoint Studio to Configure ServiceNow Connector](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-studio)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.17
---
# ServiceNow Connector 6.17 Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime
engine (Mule) and ServiceNow apps.
## Configuration
Default Configuration for ServiceNow Connector.
| Name | Type | Description | Default Value | Required |
|---|
Name | | Name for this configuration. Connectors reference the configuration with this name. | | |
Connection | | Connection types for this configuration. | | |
Name | | ID used to reference this configuration. | | |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
### Basic Authentication Connection Type
| Name | Type | Description | Default Value | Required |
|---|
Service Address | | Address of the ServiceNow service. | | |
ServiceNow Version | EUREKA FUJI GENEVA HELSINKI ISTANBUL JAKARTA KINGSTON MADRID NEW_YORK ORLANDO PARIS QUEBEC ROME SAN_DIEGO TOKYO UTAH VANCOUVER WASHINGTON
| | | |
User Tables List | | List of user-defined tables. | | |
Encoding | | | | |
User Name | | | | |
Password | | | | |
Transport Configuration | | | | |
Sign Security Strategy | | WSS configuration for the signature security strategy. | | |
Username Token Security Strategy | | WSS configuration for the username token security strategy. | | |
Reconnection | | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | | |
Pooling Profile | | Characteristics of the connection pool. | | |
### OAuth 2.0 Authorization Code Connection Type
Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).
| Name | Type | Description | Default Value | Required |
|---|
Service Address | | Address of ServiceNow service. | | |
ServiceNow Version | EUREKA FUJI GENEVA HELSINKI ISTANBUL JAKARTA KINGSTON MADRID NEW_YORK ORLANDO PARIS QUEBEC ROME SAN_DIEGO TOKYO UTAH VANCOUVER WASHINGTON
| | | |
User Tables List | | List of user-defined tables. | | |
Encoding | | | | |
Custom Transport Configuration | | Custom transport configuration. | | |
State | | String value that you send when the OAuth dance is initiated and that is returned back by the service provider with the token callback. | | |
Sign Security Strategy | | WSS configuration for the signature security strategy. | | |
Username Token Security Strategy | | Username token WSS configuration. | | |
Reconnection | | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | | |
Consumer Key | | OAuth consumer key, as registered with the service provider. | | |
Consumer Secret | | OAuth consumer secret, as registered with the service provider. | | |
Authorization Url | | URL of the service provider’s authorization endpoint. | https://{instance-id}.service-now.com/oauth_auth.do
| |
Access Token Url | | URL of the service provider’s access token endpoint. | https://{instance-id}.service-now.com/oauth_token.do
| |
Scopes | | OAuth scopes to request during the OAuth dance. This value defaults to the scopes in the annotation. | | |
Resource Owner Id | | Resource owner ID to use with the authorization code grant type. | | |
Before | | Name of the flow to execute immediately before starting the OAuth dance. | | |
After | | Name of the flow to execute immediately after receiving an access token. | | |
Listener Config | | Configuration for the HTTP listener that listens for requests on the access token callback endpoint. | | |
Callback Path | | Path of the access token callback endpoint. | | |
Authorize Path | | Path of the local HTTP endpoint that triggers the OAuth dance. | | |
External Callback Url | | URL that the OAuth provider uses to access the callback endpoint if the endpoint is behind a proxy or accessed through an indirect URL. | | |
Object Store | | Configures the object store that stores data for each resource owner. If not configured, Mule uses the default object store. | | |
## Sources
- [New / Updated Record](#new-or-updated-record-listener)
> [!NOTE] To view custom or extended parent tables in ServiceNow Connector, select the **Allow
> access to this table via web services** and **Allow configuration** options in the table
> definition.
### New / Updated Record
``
Efficiently polls periodically for changes in the selected table and accepts only new records into
the flow.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
ServiceNow Time Zone | | | | |
Table name | | Name of the table from which to retrieve the records. | | |
Query | | Optional query that filters the result set. The syntax is sysparm_query=. All parameters are case-sensitive. Queries can contain more than one entry, such as []. | | |
Display System References | | Data retrieval operation for reference and choice fields. Retrieves the display value or the actual value from the database. Valid values are: true
Returns the display values for all fields. false
Returns the actual values from the database. all
Returns both the actual and display values.
| | |
Exclude Reference Links | | Flag that indicates whether to exclude table API links for reference fields. | | |
Config Ref | | Name of the configuration to use to execute this component. | | |
Primary Node Only | | Determines whether to execute this source on only the primary node when running Mule instances in a cluster. | | |
Scheduling Strategy | | Configures the scheduler that triggers the polling. | | |
Streaming Strategy | | Configures how Mule processes streams. The default is to use repeatable streams. | | |
Redelivery Policy | | Defines a policy for processing the redelivery of the same message. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
## Operations
- [Invoke](#invoke)
- [Unauthorize](#unauthorize)
> [!NOTE] To view custom or extended parent tables in ServiceNow Connector, select the **Allow
> access to this table via web services** and **Allow configuration** options in the table
> definition.
### Invoke
``
Default operation for ServiceNow SOAP invocations.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Allow Empty Value | | Option that enables users to clear a specific field with a null or empty value for the update operation. | | |
Config Ref | | Name of the configuration to use to execute this component. | | |
Service | | | | |
Operation | | Operation name of the service. | | |
Show Reference Values | | Chooses which values are returned for reference fields. Possible options are to return sys_ids or display value or both. Use this option only for get and getRecords operations. | | |
Body | | XML body to include in the SOAP message, with all the required parameters, or null if no parameters are required. | | |
Headers | | XML headers to include in the SOAP message. | | |
Attachments | | Attachments to include in the SOAP request. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SERVICENOW:RETRY\_EXHAUSTED
- SERVICENOW:SOAP\_FAULT
- SERVICENOW:PROCESSING\_ERROR
- SERVICENOW:BAD\_RESPONSE
- SERVICENOW:TIMEOUT
- SERVICENOW:CONNECTIVITY
- SERVICENOW:BAD\_REQUEST
- SERVICENOW:CANNOT\_DISPATCH
- SERVICENOW:INVALID\_WSDL
- SERVICENOW:ENCODING
### Unauthorize
``
Deletes all the access token information of a given resource owner ID so that it is impossible to
execute any operation for that user without repeating the OAuth dance.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Resource Owner Id | | ID of the resource owner for whom to invalidate access. | | |
Config Ref | | Name of the configuration to use to execute this component. | | |
#### Associated Configurations
- [Configuration](#config)
## Object Types
- [Basic Authentication HTTP Message Dispatcher Provider](#basic-auth-http-message-dispatcher-provider)
- [Expiration Policy](#ExpirationPolicy)
- [HTTP Requester Based Transport Provider](#http-requester-based-transport-provider)
- [OAuth2 HTTP Message Dispatcher Provider](#oauth2-http-message-dispatcher-provider)
- [Pooling Profile](#PoolingProfile)
- [Reconnect](#reconnect)
- [Reconnect Forever](#reconnect-forever)
- [Reconnection](#Reconnection)
- [Redelivery Policy](#RedeliveryPolicy)
- [Redelivery Policy Message Identifier](#RedeliveryPolicyMessageIdentifier)
- [Repeatable File Store Stream](#repeatable-file-store-stream)
- [Repeatable In Memory Stream](#repeatable-in-memory-stream)
- [SOAP Attributes](#SoapAttributes)
- [SOAP Output Envelope](#SoapOutputEnvelope)
- [Wss Key Store Configuration](#wss-key-store-configuration)
- [Wss Sign Security Strategy Adapter](#WssSignSecurityStrategyAdapter)
- [WSS Signing Configuration Adapter](#WssSignConfigurationAdapter)
- [WSS Username Token Security Strategy Adapter](#WssUsernameTokenSecurityStrategyAdapter)
### Basic Authentication HTTP Message Dispatcher Provider
Default HTTP transport configuration.
| Field | Type | Description | Default Value | Required |
|---|
Username | | | | |
Password | | | | |
Read Timeout | | | | |
Read Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Read Timeout field. | | |
### Expiration Policy
Configures an expiration policy strategy.
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Max Idle Time field. | | |
### HTTP Requester Based Transport Provider
Custom HTTP transport configuration.
| Field | Type | Description | Default Value | Required |
|---|
Requester Config | | | | |
### OAuth2 HTTP Message Dispatcher Provider
OAuth transport configuration.
| Field | Type | Description | Default Value | Required |
|---|
Read Timeout | | | | |
Read Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Read Timeout field. | | |
### Pooling Profile
Pooling profile type.
| Field | Type | Description | Default Value | Required |
|---|
Max Active | | Controls the maximum number of Mule components that is borrowed from a session at one time. When set to a negative value, there is no limit to the number of components that is active at one time. When the specified value for Max Active is exceeded, the pool is considered exhausted. | | |
Max Idle | | Controls the maximum number of Mule components that sits idle in the pool at any time. When set to a negative value, there is no limit to the number of Mule components that is idle at one time. | | |
Max Wait | | Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the Exhausted Action is set to WHEN_EXHAUSTED_WAIT. | | |
Min Eviction Millis | | Determines the minimum amount of time an object sits idle in the pool before it is eligible for eviction. When non-positive, no objects are evicted from the pool due to idle time alone. | | |
Eviction Check Interval Millis | | Specifies the number of milliseconds between runs of the object evictor. When non-positive, no object evictor is executed. | | |
Exhausted Action | WHEN_EXHAUSTED_GROW WHEN_EXHAUSTED_WAIT WHEN_EXHAUSTED_FAIL
| Specifies the behavior of the Mule component pool when the pool is exhausted: WHEN_EXHAUSTED_GROW Creates a new Mule instance and returns it, which makes Max Active ineffective.
WHEN_EXHAUSTED_WAIT Blocks by invoking Object.wait(long) until a new or idle object is available.
WHEN_EXHAUSTED_FAIL Throws a NoSuchElementException.
If a positive Max Wait value is supplied, it blocks for, at most, that many milliseconds, after which a NoSuchElementException is thrown. If Max Thread Wait is a negative value, it blocks indefinitely. | | |
Initialisation Policy | INITIALISE_NONE INITIALISE_ONE INITIALISE_ALL
| Determines how to initialize components in a pool: INITIALISE_NONE Does not load any components into the pool on startup.
INITIALISE_ONE Loads one initial component into the pool on startup.
INITIALISE_ALL Loads all components in the pool on startup.
| | |
Disabled | | Determines whether to disable pooling. | | |
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts the Mule app can make. | | |
### Reconnect Forever
Configures a forever reconnection strategy by which the connector source or operation attempts to
reconnect at a specified frequency for as long as the Mule app runs.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Reconnection
Configures a reconnection strategy for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Redelivery Policy
Configures the redelivery policy for executing requests that generate errors. You can add a
redelivery policy to any source in a flow.
| Field | Type | Description | Default Value | Required |
|---|
Max Redelivery Count | | Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error. | | |
Message Digest Algorithm | | Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned. | | |
Message Identifier | Redelivery Policy Message Identifier | One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false. | | |
Object Store | | Configures the object store that stores the redelivery counter for each message. | | |
### Redelivery Policy Message Identifier
Configures how to identify a redelivered message and how to find out when the message was
redelivered.
| Field | Type | Description | Default Value | Required |
|---|
Use Secure Hash | | If true, Mule uses a secure hash algorithm to identify a redelivered message. | | |
Id Expression | | One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false. | | |
### Repeatable File Store Stream
Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream
content in memory. If the stream content is larger than the configured buffer size, Mule backs up
the buffer’s content to disk and then clears the memory.
| Field | Type | Description | Default Value | Required |
|---|
In Memory Size | | Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance: Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory. Configure a smaller buffer size to decrease memory load at the expense of response time.
| | |
Buffer Unit | | Unit for the In Memory Size field. | | |
### Repeatable In Memory Stream
Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX
buffer size. Always run performance tests to find the optimal buffer size for your specific use
case.
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value. | | |
Buffer Size Increment | | Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand. | | |
Max Buffer Size | | The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit. | | |
Buffer Unit | | Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields. | | |
### SOAP Attributes
Attributes returned by the consume operation. Carries the protocol specific headers (such as HTTP
headers) and additional transport data (such as the HTTP status line) bounded to the response.
| Field | Type | Description | Default Value | Required |
|---|
Additional Transport Data | | Additional transport data bundled in the response. | | |
Protocol Headers | | Protocol headers bundled in the response. | | |
### SOAP Output Envelope
Represents the response of the consume operation. Bundles the SOAP body, SOAP headers, and MIME
attachments if there are any.
| Field | Type | Description | Default Value | Required |
|---|
Attachments | | Set of attachments bounded to the response, or an empty map if there are no attachments. | | |
Body | | XML response body. Represents the <SOAP:BODY> element. | | |
Headers | | Set of XML SOAP headers. Represents the content in the <SOAP:HEADERS> element. | | |
### Wss Key Store Configuration
Implementation for keystores, used for encryption, decryption, and signing.
| Field | Type | Description | Default Value | Required |
|---|
Key Store Path | | Location of the keystore file. | | |
Alias | | Alias of the private key to use. | | |
Password | | Password to access the store. | | |
Key Password | | Password used to access the private key. | | |
Type | | Type of store, such as fjks, pkcs12, jceks, and so on. | | |
### Wss Sign Security Strategy Adapter
Signs the SOAP request that is sent, using the private key of the keystore in the provided TLS
context.
| Field | Type | Description | Default Value | Required |
|---|
Key Store Configuration | | Keystore to use when signing the message. | | |
Sign Algorithm Configuration | | Algorithms to use on the signing. | | |
### WSS Signing Configuration Adapter
Group that holds the configuration for signing algorithms used in the sign security strategy.
| Field | Type | Description | Default Value | Required |
|---|
Signature Key Identifier | DIRECT_REFERENCE X509_KEY_IDENTIFIER
| Key identifier type to use for the signature. | | |
Signature Algorithm | RSAwithSHA1 RSAwithSHA224 RSAwithSHA256 RSAwithSHA384 RSAwithSHA512
| Signature algorithm to use. The default is set by the data in the certificate. | | |
Signature Digest Algorithm | SHA1 SHA256 SHA224 SHA384 SHA512
| Signature digest algorithm to use. | | |
Signature C14n Algorithm | | Defines which signature c14n (canonicalization) algorithm to use. | ExclusiveXMLCanonicalization_1_0
| |
### WSS Username Token Security Strategy Adapter
Provides the capability to authenticate with a SOAP service using a username and a password by
adding the UsernameToken element in the SOAP request.
| Field | Type | Description | Default Value | Required |
|---|
Username | | Username required to authenticate with the service. | | |
Password | | Password for the provided username required to authenticate with the service. | | |
Password Type | | | | |
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.17
---
# ServiceNow Connector 6.17 XML and Maven Support
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio:
- If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML
editor or from a text editor, you can access the connector from your app by adding reference
statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
- If you add the connector in Studio, Studio automatically populates the XML code with the
connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `mule` tag of the header of your configuration XML:
```xml
http://www.mulesoft.org/schema/mule/servicenow
http://www.mulesoft.org/schema/mule/servicenow/current/mule-servicenow.xsd
```
This example shows how the namespace statements are placed in the XML:
```xml
```
## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app.
If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to
this connector:
```xml
com.mulesoft.connectors
mule-servicenow-connector
x.x.x
mule-plugin
```
Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/).
2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
3. In Exchange, search for `serviceNow`.
4. Select the connector.
5. Click **Dependency Snippets** near the upper right of the screen.
## Next Step
After completing your namespace and `pom.xml` file, you can try the
[Examples](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-examples).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.18
is-latest-version: true
---
# ServiceNow Connector 6.18
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime
engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables,
along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
- Anypoint Connectors
- Mule runtime engine (Mule)
- Elements in a Mule flow and global elements
- How to create a Mule app using Anypoint Studio
Before creating an app, you must have access to the ServiceNow target resource and Anypoint
Platform.
## Common Use Cases for the Connector
Common use cases for ServiceNow Connector include:
- **IT Service Management (ITSM)**
Sync ServiceNow data and extend IT service management (ITSM) capabilities to SaaS and on-premises
applications, such as Salesforce, SAP, Workday, and Microsoft Dynamics 365, to help with data
migration and replication, application integration, and consolidation. For example, you can
bidirectionally sync workers data between Workday and ServiceNow or aggregate employees from
Workday and users from ServiceNow into a CSV file.
- **Integrated Business Processes**
Fully integrate business processes across HR, legal, procurement, operations, marketing, and
facilities departments.
- **Record Creation and Retrieval**
Transform enterprise IT by automating and managing IT service relationships to create a single
system of records that you can retrieve.
For examples of these use cases, refer to
[ServiceNow Connector Examples](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-examples).
## Audience
- New users, read:
- [Using Anypoint Studio to Configure the Connector](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-studio) to create your
Mule app
- Advanced users, read:
- [XML and Maven Support](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-xml-maven)
- [Examples](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-examples), which provides one or more use cases for the
connector
## Connection Types
The following authentication types are supported:
- Basic
- OAuth 2.0 Authorization Code
### Limitations
- OAuth 2.0 Authorization Code authentication works only with the following versions of Mule:
- 4.1.5
- 4.2.1 and later
- Metadata does not work with OAuth 2.0 Authorization Code authentication.
## Use Exchange Templates and Examples
[Anypoint Exchange](https://www.mulesoft.com/exchange/) provides templates you can use as a starting
point for your app, as well as examples that illustrate a complete solution.
- [Workday and ServiceNow Worker Bidirectional Sync](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-worker-bidirectional-sync)
- [Workday Worker to ServiceNow Service Request Migration](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-workerservicerequest-migration/)
- [Workday and ServiceNow Employee Aggregation](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-employee-aggregation/)
- [Workday to ServiceNow Service Worker Migration](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-worker-migration/)
- [Workday Worker to ServiceNow Service Request Broadcast](https://anypoint.mulesoft.com/exchange/org.mule.templates/template-wday2snow-worker2servicerequest-broadcast/)
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to
create an app with [Anypoint Studio](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-studio).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Use Anypoint Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange)
- [ServiceNow Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/servicenow-connector-release-notes-mule-4)
- [ServiceNow Connector on Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-servicenow-connector/)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.18
is-latest-version: true
---
# ServiceNow Connector 6.18 Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
To fully benefit from using Anypoint Connector for ServiceNow (ServiceNow Connector), see the
following examples.
## Retrieve Records from a ServiceNow Incident Table
This example creates a Mule flow that retrieves records from the `Incident` table. The following
screenshot shows the Studio app flow for this example:

Figure 1. App flow for the Retrieve Records example
1. Create a Mule project in Studio.
2. Add and configure an **HTTP Listener** trigger for your flow with this path:
`getrecords`

3. Add a **Transform Message** component after the HTTP connector and provide a transformation
script similar to this:
%dw 2.0 output application/xml ns ns0 http://www.service-now.com/incident
---
{ ns0#getRecords: { ns0#description: 'Test WSDL QA' } }
> [!NOTE] Add a description that matches records in your ServiceNow incident table.
4. Add the **Invoke** operation from ServiceNow after the **Transform** component.
5. Set up, test, and save a ServiceNow configuration for the connection to the ServiceNow server.
If the connection is unsuccessful, correct any invalid connection parameters, and test again.


6. In the **General** tab in the navigation, set **Service** to `incident` and **Operation** to
`getRecords`.
7. Optionally, choose **Show Reference Values** from the values (`ALL`, `TRUE`, `FALSE`)
> [!IMPORTANT] In Studio 7.5.0 and later, you can choose the `service` and `operation` keys
> without specifying the `Show Reference Values` key to resolve the metadata. However, in
> earlier Studio versions, metadata won’t be loaded until you specify all of the metadata keys,
> and if you don’t specify all of the metadata keys, it results in a tooling exception.

8. Set the Message Body to `payload`.
9. Add the **Transform Message** component to `transform XML to JSON` for better readability. For
example:
%dw 2.0 output application/json
---
payload
10. Add a **Logger** component to the end of your flow that takes a `payload` (or `#[payload]`) as
the message.
11. Deploy or run your app.
12. Test the app by navigating to `http://localhost:8081/getrecords`
The response should look similar to this example (several fields are omitted for brevity):
{ "headers": {
}, "attachments": {
}, "body": { "getRecordsResponse": { "getRecordsResult": { "active": "1", "activity\_due":
"2019-09-24 09:48:15", "approval": "not requested", "business\_stc": "0", "calendar\_stc": "0",
"category": "Software", "child\_incidents": "0", "description": "Test WSDL QA", "escalation": "0",
"hold\_reason": "0", "impact": "1", "incident\_state": "1", "knowledge": "0", "made\_sla": "1",
"notify": "1", "number": "INC0011616", "opened\_at": "2019-09-20 07:30:34", "opened\_by":
"6816f79cc0a8016401c5a33be04be441", "order": "0", "priority": "1", "reassignment\_count": "0",
"reopen\_count": "0", "severity": "3", "state": "1", "sys\_class\_name": "incident",
"sys\_created\_by": "admin", "sys\_created\_on": "2019-09-20 07:30:34", "sys\_domain": "global",
"sys\_domain\_path": "/", "sys\_id": "c03deab4db840010a0e6e04a48961999", "sys\_mod\_count": "47",
"sys\_updated\_by": "system", "sys\_updated\_on": "2019-09-24 07:48:15", "upon\_approval":
"proceed", "upon\_reject": "cancel", "urgency": "1", } } } }
If you use `ALL` for `Show Reference Values`, the response is similar to this abbreviated output, in
which the response element name for the display value field begins with `dv`:
{ "headers": {
}, "attachments": {
}, "body": { "getRecordsResponse": { "getRecordsResult": { "active": "1", "dv\_active": "true",
"activity\_due": "2020-05-07 13:14:19", "dv\_activity\_due": "2020-05-07 06:14:19",
"additional\_assignee\_list": null, "dv\_additional\_assignee\_list": null, "approval": "not
requested", "dv\_approval": "Not Yet Requested", } } } }
The response element name for the display value field is prefixed with `dv`.
## Retrieve ServiceNow Incident Table Keys
This example creates a Mule flow that retrieve keys from the Incident table in a ServiceNow
instance:
1. Create a Mule application as a project in Studio.
2. Add and configure an HTTP **Listener** trigger for your flow, and set the **Path** to
`/getkeys`.
3. Add a **Transform Message** component after the HTTP **Listener** operation.
4. Provide a transformation script similar to this (use a description that matches records in your
ServiceNow incident table):
%dw 2.0 output application/xml ns ns0 http://www.service-now.com/incident
---
{ ns0#getKeys: { ns0#description: 'Test WSDL QA' } }
5. Add the ServiceNow **Invoke** operation after the **Transform Message** component.
6. Set up, test, and save a ServiceNow configuration for the connection to the ServiceNow server.
If the connection is unsuccessful, correct any invalid connection parameters and test again.
7. In the **General** tab navigation, set **Service** to `incident` and **Operation** to `getKeys`.
8. Set the Message Body to `payload`.
9. Add the **Transform Message** component to transform XML to JSON for better readability. For
example:
%dw 2.0 output application/json
---
payload
10. Add a **Logger** component to the end of your flow that takes a `payload` (or `#[payload]`) as
the message.
11. Deploy or run your app.
12. To test the app, navigate to: `http://localhost:8081/getkeys`
13. The response should look similar to this:
{ "headers": {
}, "attachments": {
}, "body": { "getKeysResponse": { "sys\_id":
"c03deab4db840010a0e6e04a48961999,0f517ab8db840010a0e6e04a489619bc,6f1236f8db840010a0e6e04a489619f5",
"count": "3" } } }
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Using Anypoint Studio to Configure ServiceNow Connector](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-studio)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.18
is-latest-version: true
---
# ServiceNow Connector 6.18 Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime
engine (Mule) and ServiceNow apps.
## Configuration
Default Configuration for ServiceNow Connector.
| Name | Type | Description | Default Value | Required |
|---|
Name | | Name for this configuration. Connectors reference the configuration with this name. | | |
Connection | | Connection types for this configuration. | | |
Name | | ID used to reference this configuration. | | |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
### Basic Authentication Connection Type
| Name | Type | Description | Default Value | Required |
|---|
Service Address | | Address of the ServiceNow service. | | |
ServiceNow Version | EUREKA FUJI GENEVA HELSINKI ISTANBUL JAKARTA KINGSTON MADRID NEW_YORK ORLANDO PARIS QUEBEC ROME SAN_DIEGO TOKYO UTAH VANCOUVER WASHINGTON XANADU YOKOHAMA ZURICH AUSTRALIA
| | | |
User Tables List | | List of user-defined tables. | | |
Encoding | | | | |
User Name | | | | |
Password | | | | |
Transport Configuration | | | | |
Sign Security Strategy | | WSS configuration for the signature security strategy. | | |
Username Token Security Strategy | | WSS configuration for the username token security strategy. | | |
Reconnection | | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | | |
Pooling Profile | | Characteristics of the connection pool. | | |
### OAuth 2.0 Authorization Code Connection Type
Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).
| Name | Type | Description | Default Value | Required |
|---|
Service Address | | Address of ServiceNow service. | | |
ServiceNow Version | EUREKA FUJI GENEVA HELSINKI ISTANBUL JAKARTA KINGSTON MADRID NEW_YORK ORLANDO PARIS QUEBEC ROME SAN_DIEGO TOKYO UTAH VANCOUVER WASHINGTON XANADU YOKOHAMA ZURICH AUSTRALIA
| | | |
User Tables List | | List of user-defined tables. | | |
Encoding | | | | |
Custom Transport Configuration | | Custom transport configuration. | | |
State | | String value that you send when the OAuth dance is initiated and that is returned back by the service provider with the token callback. | | |
Sign Security Strategy | | WSS configuration for the signature security strategy. | | |
Username Token Security Strategy | | Username token WSS configuration. | | |
Reconnection | | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | | |
Consumer Key | | OAuth consumer key, as registered with the service provider. | | |
Consumer Secret | | OAuth consumer secret, as registered with the service provider. | | |
Authorization Url | | URL of the service provider’s authorization endpoint. | https://{instance-id}.service-now.com/oauth_auth.do
| |
Access Token Url | | URL of the service provider’s access token endpoint. | https://{instance-id}.service-now.com/oauth_token.do
| |
Scopes | | OAuth scopes to request during the OAuth dance. This value defaults to the scopes in the annotation. | | |
Resource Owner Id | | Resource owner ID to use with the authorization code grant type. | | |
Before | | Name of the flow to execute immediately before starting the OAuth dance. | | |
After | | Name of the flow to execute immediately after receiving an access token. | | |
Listener Config | | Configuration for the HTTP listener that listens for requests on the access token callback endpoint. | | |
Callback Path | | Path of the access token callback endpoint. | | |
Authorize Path | | Path of the local HTTP endpoint that triggers the OAuth dance. | | |
External Callback Url | | URL that the OAuth provider uses to access the callback endpoint if the endpoint is behind a proxy or accessed through an indirect URL. | | |
Object Store | | Configures the object store that stores data for each resource owner. If not configured, Mule uses the default object store. | | |
## Sources
- [New / Updated Record](#new-or-updated-record-listener)
> [!NOTE] To view custom or extended parent tables in ServiceNow Connector, select the **Allow
> access to this table via web services** and **Allow configuration** options in the table
> definition.
### New / Updated Record
``
Efficiently polls periodically for changes in the selected table and accepts only new records into
the flow.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
ServiceNow Time Zone | | | | |
Table name | | Name of the table from which to retrieve the records. | | |
Query | | Optional query that filters the result set. The syntax is sysparm_query=. All parameters are case-sensitive. Queries can contain more than one entry, such as []. | | |
Display System References | | Data retrieval operation for reference and choice fields. Retrieves the display value or the actual value from the database. Valid values are: true
Returns the display values for all fields. false
Returns the actual values from the database. all
Returns both the actual and display values.
| | |
Exclude Reference Links | | Flag that indicates whether to exclude table API links for reference fields. | | |
Config Ref | | Name of the configuration to use to execute this component. | | |
Primary Node Only | | Determines whether to execute this source on only the primary node when running Mule instances in a cluster. | | |
Scheduling Strategy | | Configures the scheduler that triggers the polling. | | |
Streaming Strategy | | Configures how Mule processes streams. The default is to use repeatable streams. | | |
Redelivery Policy | | Defines a policy for processing the redelivery of the same message. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
## Operations
- [Invoke](#invoke)
- [Unauthorize](#unauthorize)
> [!NOTE] To view custom or extended parent tables in ServiceNow Connector, select the **Allow
> access to this table via web services** and **Allow configuration** options in the table
> definition.
### Invoke
``
Default operation for ServiceNow SOAP invocations.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Allow Empty Value | | Option that enables users to clear a specific field with a null or empty value for the update operation. | | |
Config Ref | | Name of the configuration to use to execute this component. | | |
Service | | | | |
Operation | | Operation name of the service. | | |
Show Reference Values | | Chooses which values are returned for reference fields. Possible options are to return sys_ids or display value or both. Use this option only for get and getRecords operations. | | |
Body | | XML body to include in the SOAP message, with all the required parameters, or null if no parameters are required. | | |
Headers | | XML headers to include in the SOAP message. | | |
Attachments | | Attachments to include in the SOAP request. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SERVICENOW:RETRY\_EXHAUSTED
- SERVICENOW:SOAP\_FAULT
- SERVICENOW:PROCESSING\_ERROR
- SERVICENOW:BAD\_RESPONSE
- SERVICENOW:TIMEOUT
- SERVICENOW:CONNECTIVITY
- SERVICENOW:BAD\_REQUEST
- SERVICENOW:CANNOT\_DISPATCH
- SERVICENOW:INVALID\_WSDL
- SERVICENOW:ENCODING
### Unauthorize
``
Deletes all the access token information of a given resource owner ID so that it is impossible to
execute any operation for that user without repeating the OAuth dance.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Resource Owner Id | | ID of the resource owner for whom to invalidate access. | | |
Config Ref | | Name of the configuration to use to execute this component. | | |
#### Associated Configurations
- [Configuration](#config)
## Object Types
- [Basic Authentication HTTP Message Dispatcher Provider](#basic-auth-http-message-dispatcher-provider)
- [Expiration Policy](#ExpirationPolicy)
- [HTTP Requester Based Transport Provider](#http-requester-based-transport-provider)
- [OAuth2 HTTP Message Dispatcher Provider](#oauth2-http-message-dispatcher-provider)
- [Pooling Profile](#PoolingProfile)
- [Reconnect](#reconnect)
- [Reconnect Forever](#reconnect-forever)
- [Reconnection](#Reconnection)
- [Redelivery Policy](#RedeliveryPolicy)
- [Redelivery Policy Message Identifier](#RedeliveryPolicyMessageIdentifier)
- [Repeatable File Store Stream](#repeatable-file-store-stream)
- [Repeatable In Memory Stream](#repeatable-in-memory-stream)
- [SOAP Attributes](#SoapAttributes)
- [SOAP Output Envelope](#SoapOutputEnvelope)
- [Wss Key Store Configuration](#wss-key-store-configuration)
- [Wss Sign Security Strategy Adapter](#WssSignSecurityStrategyAdapter)
- [WSS Signing Configuration Adapter](#WssSignConfigurationAdapter)
- [WSS Username Token Security Strategy Adapter](#WssUsernameTokenSecurityStrategyAdapter)
### Basic Authentication HTTP Message Dispatcher Provider
Default HTTP transport configuration.
| Field | Type | Description | Default Value | Required |
|---|
Username | | | | |
Password | | | | |
Read Timeout | | | | |
Read Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Read Timeout field. | | |
### Expiration Policy
Configures an expiration policy strategy.
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Max Idle Time field. | | |
### HTTP Requester Based Transport Provider
Custom HTTP transport configuration.
| Field | Type | Description | Default Value | Required |
|---|
Requester Config | | | | |
### OAuth2 HTTP Message Dispatcher Provider
OAuth transport configuration.
| Field | Type | Description | Default Value | Required |
|---|
Read Timeout | | | | |
Read Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Read Timeout field. | | |
### Pooling Profile
Pooling profile type.
| Field | Type | Description | Default Value | Required |
|---|
Max Active | | Controls the maximum number of Mule components that is borrowed from a session at one time. When set to a negative value, there is no limit to the number of components that is active at one time. When the specified value for Max Active is exceeded, the pool is considered exhausted. | | |
Max Idle | | Controls the maximum number of Mule components that sits idle in the pool at any time. When set to a negative value, there is no limit to the number of Mule components that is idle at one time. | | |
Max Wait | | Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the Exhausted Action is set to WHEN_EXHAUSTED_WAIT. | | |
Min Eviction Millis | | Determines the minimum amount of time an object sits idle in the pool before it is eligible for eviction. When non-positive, no objects are evicted from the pool due to idle time alone. | | |
Eviction Check Interval Millis | | Specifies the number of milliseconds between runs of the object evictor. When non-positive, no object evictor is executed. | | |
Exhausted Action | WHEN_EXHAUSTED_GROW WHEN_EXHAUSTED_WAIT WHEN_EXHAUSTED_FAIL
| Specifies the behavior of the Mule component pool when the pool is exhausted: WHEN_EXHAUSTED_GROW Creates a new Mule instance and returns it, which makes Max Active ineffective.
WHEN_EXHAUSTED_WAIT Blocks by invoking Object.wait(long) until a new or idle object is available.
WHEN_EXHAUSTED_FAIL Throws a NoSuchElementException.
If a positive Max Wait value is supplied, it blocks for, at most, that many milliseconds, after which a NoSuchElementException is thrown. If Max Thread Wait is a negative value, it blocks indefinitely. | | |
Initialisation Policy | INITIALISE_NONE INITIALISE_ONE INITIALISE_ALL
| Determines how to initialize components in a pool: INITIALISE_NONE Does not load any components into the pool on startup.
INITIALISE_ONE Loads one initial component into the pool on startup.
INITIALISE_ALL Loads all components in the pool on startup.
| | |
Disabled | | Determines whether to disable pooling. | | |
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts the Mule app can make. | | |
### Reconnect Forever
Configures a forever reconnection strategy by which the connector source or operation attempts to
reconnect at a specified frequency for as long as the Mule app runs.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Reconnection
Configures a reconnection strategy for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Redelivery Policy
Configures the redelivery policy for executing requests that generate errors. You can add a
redelivery policy to any source in a flow.
| Field | Type | Description | Default Value | Required |
|---|
Max Redelivery Count | | Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error. | | |
Message Digest Algorithm | | Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned. | | |
Message Identifier | Redelivery Policy Message Identifier | One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false. | | |
Object Store | | Configures the object store that stores the redelivery counter for each message. | | |
### Redelivery Policy Message Identifier
Configures how to identify a redelivered message and how to find out when the message was
redelivered.
| Field | Type | Description | Default Value | Required |
|---|
Use Secure Hash | | If true, Mule uses a secure hash algorithm to identify a redelivered message. | | |
Id Expression | | One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false. | | |
### Repeatable File Store Stream
Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream
content in memory. If the stream content is larger than the configured buffer size, Mule backs up
the buffer’s content to disk and then clears the memory.
| Field | Type | Description | Default Value | Required |
|---|
In Memory Size | | Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance: Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory. Configure a smaller buffer size to decrease memory load at the expense of response time.
| | |
Buffer Unit | | Unit for the In Memory Size field. | | |
### Repeatable In Memory Stream
Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX
buffer size. Always run performance tests to find the optimal buffer size for your specific use
case.
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value. | | |
Buffer Size Increment | | Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand. | | |
Max Buffer Size | | The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit. | | |
Buffer Unit | | Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields. | | |
### SOAP Attributes
Attributes returned by the consume operation. Carries the protocol specific headers (such as HTTP
headers) and additional transport data (such as the HTTP status line) bounded to the response.
| Field | Type | Description | Default Value | Required |
|---|
Additional Transport Data | | Additional transport data bundled in the response. | | |
Protocol Headers | | Protocol headers bundled in the response. | | |
### SOAP Output Envelope
Represents the response of the consume operation. Bundles the SOAP body, SOAP headers, and MIME
attachments if there are any.
| Field | Type | Description | Default Value | Required |
|---|
Attachments | | Set of attachments bounded to the response, or an empty map if there are no attachments. | | |
Body | | XML response body. Represents the <SOAP:BODY> element. | | |
Headers | | Set of XML SOAP headers. Represents the content in the <SOAP:HEADERS> element. | | |
### Wss Key Store Configuration
Implementation for keystores, used for encryption, decryption, and signing.
| Field | Type | Description | Default Value | Required |
|---|
Key Store Path | | Location of the keystore file. | | |
Alias | | Alias of the private key to use. | | |
Password | | Password to access the store. | | |
Key Password | | Password used to access the private key. | | |
Type | | Type of store, such as fjks, pkcs12, jceks, and so on. | | |
### Wss Sign Security Strategy Adapter
Signs the SOAP request that is sent, using the private key of the keystore in the provided TLS
context.
| Field | Type | Description | Default Value | Required |
|---|
Key Store Configuration | | Keystore to use when signing the message. | | |
Sign Algorithm Configuration | | Algorithms to use on the signing. | | |
### WSS Signing Configuration Adapter
Group that holds the configuration for signing algorithms used in the sign security strategy.
| Field | Type | Description | Default Value | Required |
|---|
Signature Key Identifier | DIRECT_REFERENCE X509_KEY_IDENTIFIER
| Key identifier type to use for the signature. | | |
Signature Algorithm | RSAwithSHA1 RSAwithSHA224 RSAwithSHA256 RSAwithSHA384 RSAwithSHA512
| Signature algorithm to use. The default is set by the data in the certificate. | | |
Signature Digest Algorithm | SHA1 SHA256 SHA224 SHA384 SHA512
| Signature digest algorithm to use. | | |
Signature C14n Algorithm | | Defines which signature c14n (canonicalization) algorithm to use. | ExclusiveXMLCanonicalization_1_0
| |
### WSS Username Token Security Strategy Adapter
Provides the capability to authenticate with a SOAP service using a username and a password by
adding the UsernameToken element in the SOAP request.
| Field | Type | Description | Default Value | Required |
|---|
Username | | Username required to authenticate with the service. | | |
Password | | Password for the provided username required to authenticate with the service. | | |
Password Type | | | | |
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.18
is-latest-version: true
---
# ServiceNow Connector 6.18 XML and Maven Support
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio:
- If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML
editor or from a text editor, you can access the connector from your app by adding reference
statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
- If you add the connector in Studio, Studio automatically populates the XML code with the
connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `mule` tag of the header of your configuration XML:
```xml
http://www.mulesoft.org/schema/mule/servicenow
http://www.mulesoft.org/schema/mule/servicenow/current/mule-servicenow.xsd
```
This example shows how the namespace statements are placed in the XML:
```xml
```
## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app.
If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to
this connector:
```xml
com.mulesoft.connectors
mule-servicenow-connector
x.x.x
mule-plugin
```
Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/).
2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
3. In Exchange, search for `serviceNow`.
4. Select the connector.
5. Click **Dependency Snippets** near the upper right of the screen.
## Next Step
After completing your namespace and `pom.xml` file, you can try the
[Examples](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-examples).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.17
---
# Troubleshooting ServiceNow Connector 6.17
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
To troubleshoot Anypoint Connector for ServiceNow (ServiceNow Connector), become familiar with the
information about interpreting commonly thrown exception messages.
## Enable Verbose Exception Logging
Enable verbose exception logs to show a complete stack trace of the error instead of the default
truncated output:
1. In Studio, right-click on the project and select **Run > Run Configurations**.
2. Go to the **Arguments** tab and append the arguments in the **VM arguments** section to add the
`mule.verbose.exceptions` property. For example:
`-XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true`
## Enable Verbose Logging
To get a better understanding of why an application’s interaction with ServiceNow Connector is
failing, temporarily enable verbose logging for the connector.
Remember to always disable enhanced verbosity after troubleshooting, because it can affect your Mule
application’s performance.
To enable verbose logging in the configuration file:
1. Access Anypoint Studio and navigate to the **Package Explorer** view.
2. Open your application’s project name.
3. Open the `src/main/resources` folder.
4. Open the `log4j2.xml` file inside the folder.
5. Add an `` tag inside the `` tag:
```xml
...
...
```
6. Save your application changes.
7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
Application**.
## Understand Commonly Thrown Exceptions
Here is a list of commonly thrown exception messages and how to interpret them:
- SERVICENOW:BAD\_REQUEST
The request is incorrect, for example, there are invalid input headers or the service does not
exist.
- SERVICENOW:CANNOT\_DISPATCH
An error occurs when sending the request.
- SERVICENOW:CONNECTIVITY
Either a connection could not be established or there is a connectivity error.
- SERVICENOW:ENCODING
There is an encoding error when parsing the request or the response.
- SERVICENOW:INVALID\_WSDL
The WSDL is invalid or inconsistent.
- SERVICENOW:PROCESSING\_ERROR
There is a processing error, for example, there is an interruption during initialization.
- SERVICENOW:RETRY\_EXHAUSTED
The maximum number of retries for the operation is reached.
- SERVICENOW:SOAP\_FAULT
There is a SOAP fault error.
- SERVICENOW:TIMEOUT
A specific request takes longer than the configuration timeout values.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [ServiceNow Connector Reference](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-reference)
- [Salesforce Help](https://help.salesforce.com)
- [Known Issues](https://help.salesforce.com/s/issues)
---
product: ServiceNow Connector
version: 6.18
is-latest-version: true
---
# Troubleshooting ServiceNow Connector 6.18
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
To troubleshoot Anypoint Connector for ServiceNow (ServiceNow Connector), become familiar with the
information about interpreting commonly thrown exception messages.
## Enable Verbose Exception Logging
Enable verbose exception logs to show a complete stack trace of the error instead of the default
truncated output:
1. In Studio, right-click on the project and select **Run > Run Configurations**.
2. Go to the **Arguments** tab and append the arguments in the **VM arguments** section to add the
`mule.verbose.exceptions` property. For example:
`-XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true`
## Enable Verbose Logging
To get a better understanding of why an application’s interaction with ServiceNow Connector is
failing, temporarily enable verbose logging for the connector.
Remember to always disable enhanced verbosity after troubleshooting, because it can affect your Mule
application’s performance.
To enable verbose logging in the configuration file:
1. Access Anypoint Studio and navigate to the **Package Explorer** view.
2. Open your application’s project name.
3. Open the `src/main/resources` folder.
4. Open the `log4j2.xml` file inside the folder.
5. Add an `` tag inside the `` tag:
```xml
...
...
```
6. Save your application changes.
7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
Application**.
## Understand Commonly Thrown Exceptions
Here is a list of commonly thrown exception messages and how to interpret them:
- SERVICENOW:BAD\_REQUEST
The request is incorrect, for example, there are invalid input headers or the service does not
exist.
- SERVICENOW:BAD\_RESPONSE
The response is incorrect, for example, the response is not in the expected format.
- SERVICENOW:CANNOT\_DISPATCH
An error occurs when sending the request.
- SERVICENOW:CONNECTIVITY
Either a connection could not be established or there is a connectivity error.
- SERVICENOW:ENCODING
There is an encoding error when parsing the request or the response.
- SERVICENOW:INVALID\_WSDL
The WSDL is invalid or inconsistent.
- SERVICENOW:PROCESSING\_ERROR
There is a processing error, for example, there is an interruption during initialization.
- SERVICENOW:RETRY\_EXHAUSTED
The maximum number of retries for the operation is reached.
- SERVICENOW:SOAP\_FAULT
There is a SOAP fault error.
- SERVICENOW:TIMEOUT
A specific request takes longer than the configuration timeout values.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [ServiceNow Connector Reference](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-reference)
- [Salesforce Help](https://help.salesforce.com)
- [Known Issues](https://help.salesforce.com/s/issues)
---
product: ServiceNow Connector
version: 6.17
---
# Using Anypoint Studio to Configure ServiceNow Connector 6.17
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.
To add and configure a connector in Studio:
1. [Create a Mule project](#create-mule-project).
2. [Add the connector to your Mule project](#add-connector-to-project).
3. [Configure a source for the connector’s flow](#configure-input-source).
4. [Add a connector operation to the flow](#add-connector-operation).
5. [Configure a global element for the connector](#configure-global-element).
When you run the connector, you can view the app log to check for problems, as described in
[View the App Log](#view-app-log).
If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
If, after reading this topic, you need additional information about the connector fields, see the
[ServiceNow Connector Reference](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-reference).
## Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
1. In Studio, select **File > New > Mule Project**.
2. Enter a name for your Mule project and click **Finish**.
## Add the Connector to Your Mule Project
Add ServiceNow Connector to your Mule project to automatically populate the XML code with the
connector’s namespace and schema location and to add the required dependencies to the project’s
`pom.xml` file:
1. In the **Mule Palette** view, click **(X) Search in Exchange**.
2. In the **Add Dependencies to Project** window, type `servicenow` in the search field.
3. Click **ServiceNow Connector** in **Available modules**.
4. Click **Add**.
5. Click **Finish**.
Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.
## Configure a Source
A source initiates a flow when a specified condition is met. You can configure one of these sources
to use with ServiceNow Connector:
- **HTTP > Listener**
Initiates a flow each time it receives a request on the configured host and port
- **Scheduler**
Initiates a flow when a time-based condition is met
For example, to configure an HTTP **Listener**, follow these steps:
1. In the **Mule Palette** view, select **HTTP > Listener**.
2. Drag **Listener** to the Studio canvas.
3. On the **Listener** configuration screen, optionally change the value of the **Display Name**
field.
4. Specify a value for the **Path** field.
5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global
element that can be used by all instances of the HTTP **Listener** in the app.
6. On the **General** tab, specify the connection information for the connector.
7. On the **TLS** tab, optionally specify the TLS information for the connector.
8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
9. Click **Test Connection** to confirm that Mule can connect with the specified server.
10. Click **OK**.
## Add a Connector Operation to the Flow
When you add a connector operation to your flow, you immediately define a specific operation for
that connector to perform.
To add an operation for ServiceNow Connector, follow these steps:
1. In the **Mule Palette** view, select **ServiceNow** and then select the desired operation.
2. Drag the operation onto the Studio canvas and to the right of the source.
## Configure a Global Element for the Connector
When you configure a connector, it’s best to configure a global element that all instances of that
connector in the app can use. Configuring a global element requires you to provide the
authentication credentials that the connector requires to access the target ServiceNow system.
ServiceNow Connector supports the Basic and OAuth2 authentication types.
To configure the global element for ServiceNow Connector, follow these steps:
1. Select the operation in the Studio canvas.
2. In the configuration screen for the operation, click the plus sign (**+**) next to the
**Connector configuration** field to access the global element configuration fields.
3. On the **General** tab, in **Connection**, select the authentication method to configure:
- [Basic Authentication](#basic-authentication)
- [OAuth 2.0 Authorization Code](#oauth-2-auth-code)
You can reference a configuration file that contains ANT-style property placeholders
(recommended), or you can enter your authorization credentials in the global configuration
properties. For information about the benefits of using property placeholders and how to
configure them, see
[Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview).
4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
5. Click **Test Connection** to confirm that Mule can connect with the specified server.
6. Click **OK**.
### Basic Authentication
1. In the ServiceNow Config **General** tab, select **Basic Authentication** from the
**Connection** drop-down list.
2. Provide the following values for Basic authentication:
| Field | Description |
|---|
Username | Name used to log in to ServiceNow |
Password | Password that corresponds to the user name |
Service Address | The WSDL endpoint |
ServiceNow Version | The ServiceNow version to use |
User table list | Custom tables for a user who is logged in |

3. Click **OK**.
#### Basic Authentication HTTP Message Dispatcher Provider
1. Click the **Transport** tab.
2. From **Transport Configuration**, select **Basic auth http message dispatcher provider**.
3. Enter the following required values:
| Field | Description |
|---|
User Name | Name used to log in to ServiceNow |
Password | Password that corresponds to the user name |
#### Basic Authentication HTTP Requester Based Transport Provider
1. Click the **Transport** tab.
2. From **Transport Configuration**, select **Http requester based transport provider**.
3. Select the **Requester config** or click the green plus sign to create a new one.

4. Specify the required values:
| Field | Description |
|---|
Host | The WSDL endpoint |
Username | User name for logging in to ServiceNow |
Password | Password that corresponds to the user name |
### OAuth2.0 Authentication
Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).
To set up OAuth 2.0 authentication:
1. In the ServiceNow Config **General** tab, select **OAuth 2.0 Authorization Code** from the
**Connection** drop-down list.
2. Specify the values for the OAuth connection:

| Field | Description |
|---|
Service Address | ServiceNow’s instance endpoint |
Consumer key | Client ID from the registered application |
Consumer secret | Client secret from the registered application |
Authorization url | Endpoint for initiating the OAuth dance |
Access token url | Endpoint for retrieving the access token |
Resource owner id | OAuth client ID configured in your instance’s application registries |
Listener config | HTTP Listener configuration |
Callback path | Path of the access token callback endpoint |
Authorize path | Path of the local HTTP endpoint that triggers the OAuth dance |
External callback url | If the callback endpoint is behind a proxy or should be accessed through a non-direct URL, use this parameter to specify the URL the OAuth provider should use to access the callback. |
To reach ServiceNow endpoints using an OAuth 2.0 connection, you must manually perform the OAuth
dance after starting your Mule app:
1. Start the OAuth dance by doing either of the following:
- If the Resource owner id parameter is set in the OAuth configuration, use the following URL in
the browser. Substitute `` with the correct value:
`http://localhost:8081 authorize?resourceOwnerId=`
- If the Resource owner id parameter is not set in the OAuth configuration, use the following
URL:
`http://localhost:8081/authorize`
2. On the Login screen, enter the login details for the ServiceNow instance and click **Login** .
3. On the **Authorize** screen, click **Allow**.
You should see a confirmation that the OAuth dance succeeded and the access token was retrieved.
## View the App Log
To check for problems, you can view the app log as follows:
- If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio
console window.
- If you’re running the app using Mule from the command line, the app log is visible in your OS
console.
Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/.log`.
## Next Step
After configuring ServiceNow Connector in Studio, see the [Examples](https://docs.mulesoft.com/servicenow-connector/6.17/servicenow-connector-examples)
to experiment with the connector.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: ServiceNow Connector
version: 6.18
is-latest-version: true
---
# Using Anypoint Studio to Configure ServiceNow Connector 6.18
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.
To add and configure a connector in Studio:
1. [Create a Mule project](#create-mule-project).
2. [Add the connector to your Mule project](#add-connector-to-project).
3. [Configure a source for the connector’s flow](#configure-input-source).
4. [Add a connector operation to the flow](#add-connector-operation).
5. [Configure a global element for the connector](#configure-global-element).
When you run the connector, you can view the app log to check for problems, as described in
[View the App Log](#view-app-log).
If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
If, after reading this topic, you need additional information about the connector fields, see the
[ServiceNow Connector Reference](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-reference).
## Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
1. In Studio, select **File > New > Mule Project**.
2. Enter a name for your Mule project and click **Finish**.
## Add the Connector to Your Mule Project
Add ServiceNow Connector to your Mule project to automatically populate the XML code with the
connector’s namespace and schema location and to add the required dependencies to the project’s
`pom.xml` file:
1. In the **Mule Palette** view, click **(X) Search in Exchange**.
2. In the **Add Dependencies to Project** window, type `servicenow` in the search field.
3. Click **ServiceNow Connector** in **Available modules**.
4. Click **Add**.
5. Click **Finish**.
Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.
## Configure a Source
A source initiates a flow when a specified condition is met. You can configure one of these sources
to use with ServiceNow Connector:
- **HTTP > Listener**
Initiates a flow each time it receives a request on the configured host and port
- **Scheduler**
Initiates a flow when a time-based condition is met
For example, to configure an HTTP **Listener**, follow these steps:
1. In the **Mule Palette** view, select **HTTP > Listener**.
2. Drag **Listener** to the Studio canvas.
3. On the **Listener** configuration screen, optionally change the value of the **Display Name**
field.
4. Specify a value for the **Path** field.
5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global
element that can be used by all instances of the HTTP **Listener** in the app.
6. On the **General** tab, specify the connection information for the connector.
7. On the **TLS** tab, optionally specify the TLS information for the connector.
8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
9. Click **Test Connection** to confirm that Mule can connect with the specified server.
10. Click **OK**.
## Add a Connector Operation to the Flow
When you add a connector operation to your flow, you immediately define a specific operation for
that connector to perform.
To add an operation for ServiceNow Connector, follow these steps:
1. In the **Mule Palette** view, select **ServiceNow** and then select the desired operation.
2. Drag the operation onto the Studio canvas and to the right of the source.
## Configure a Global Element for the Connector
When you configure a connector, it’s best to configure a global element that all instances of that
connector in the app can use. Configuring a global element requires you to provide the
authentication credentials that the connector requires to access the target ServiceNow system.
ServiceNow Connector supports the Basic and OAuth2 authentication types.
To configure the global element for ServiceNow Connector, follow these steps:
1. Select the operation in the Studio canvas.
2. In the configuration screen for the operation, click the plus sign (**+**) next to the
**Connector configuration** field to access the global element configuration fields.
3. On the **General** tab, in **Connection**, select the authentication method to configure:
- [Basic Authentication](#basic-authentication)
- [OAuth 2.0 Authorization Code](#oauth-2-auth-code)
You can reference a configuration file that contains ANT-style property placeholders
(recommended), or you can enter your authorization credentials in the global configuration
properties. For information about the benefits of using property placeholders and how to
configure them, see
[Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview).
4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
5. Click **Test Connection** to confirm that Mule can connect with the specified server.
6. Click **OK**.
### Basic Authentication
1. In the ServiceNow Config **General** tab, select **Basic Authentication** from the
**Connection** drop-down list.
2. Provide the following values for Basic authentication:
| Field | Description |
|---|
Username | Name used to log in to ServiceNow |
Password | Password that corresponds to the user name |
Service Address | The WSDL endpoint |
ServiceNow Version | The ServiceNow version to use |
User table list | Custom tables for a user who is logged in |

3. Click **OK**.
#### Basic Authentication HTTP Message Dispatcher Provider
1. Click the **Transport** tab.
2. From **Transport Configuration**, select **Basic auth http message dispatcher provider**.
3. Enter the following required values:
| Field | Description |
|---|
User Name | Name used to log in to ServiceNow |
Password | Password that corresponds to the user name |
#### Basic Authentication HTTP Requester Based Transport Provider
1. Click the **Transport** tab.
2. From **Transport Configuration**, select **Http requester based transport provider**.
3. Select the **Requester config** or click the green plus sign to create a new one.

4. Specify the required values:
| Field | Description |
|---|
Host | The WSDL endpoint |
Username | User name for logging in to ServiceNow |
Password | Password that corresponds to the user name |
### OAuth2.0 Authentication
Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).
To set up OAuth 2.0 authentication:
1. In the ServiceNow Config **General** tab, select **OAuth 2.0 Authorization Code** from the
**Connection** drop-down list.
2. Specify the values for the OAuth connection:

| Field | Description |
|---|
Service Address | ServiceNow’s instance endpoint |
Consumer key | Client ID from the registered application |
Consumer secret | Client secret from the registered application |
Authorization url | Endpoint for initiating the OAuth dance |
Access token url | Endpoint for retrieving the access token |
Resource owner id | OAuth client ID configured in your instance’s application registries |
Listener config | HTTP Listener configuration |
Callback path | Path of the access token callback endpoint |
Authorize path | Path of the local HTTP endpoint that triggers the OAuth dance |
External callback url | If the callback endpoint is behind a proxy or should be accessed through a non-direct URL, use this parameter to specify the URL the OAuth provider should use to access the callback. |
To reach ServiceNow endpoints using an OAuth 2.0 connection, you must manually perform the OAuth
dance after starting your Mule app:
1. Start the OAuth dance by doing either of the following:
- If the Resource owner id parameter is set in the OAuth configuration, use the following URL in
the browser. Substitute `` with the correct value:
`http://localhost:8081 authorize?resourceOwnerId=`
- If the Resource owner id parameter is not set in the OAuth configuration, use the following
URL:
`http://localhost:8081/authorize`
2. On the Login screen, enter the login details for the ServiceNow instance and click **Login** .
3. On the **Authorize** screen, click **Allow**.
You should see a confirmation that the OAuth dance succeeded and the access token was retrieved.
## View the App Log
To check for problems, you can view the app log as follows:
- If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio
console window.
- If you’re running the app using Mule from the command line, the app log is visible in your OS
console.
Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/.log`.
## Next Step
After configuring ServiceNow Connector in Studio, see the [Examples](https://docs.mulesoft.com/servicenow-connector/latest/servicenow-connector-examples)
to experiment with the connector.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)