---
schema_version: "1"
id: bca21550882347298703f64f7f2f4759ed0ddc042c4a126e1c5d65e3f522ad80
title: Using Anypoint Studio to Configure Veeva Vault Connector 1.5
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/veevavault-connector/latest/veevavault-connector-studio.md
canonical_url: https://docs.mulesoft.com/veevavault-connector/latest/veevavault-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 89202663a538c4a8c2bf1c9ec8ec7c72f06e0ae073a6e927a95c97a44c1786b4
description: MuleSoft Documentation Site
release: "1.5"
latest: true
---
---
product: Veeva Vault Connector
version: 1.5
is-latest-version: true
---

# Using Anypoint Studio to Configure Veeva Vault Connector 1.5

> 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-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 in real time, 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
[Veeva Vault Reference](https://docs.mulesoft.com/veevavault-connector/latest/veevavault-connector-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 Veeva Vault Connector to your Mule project to automatically populate the XML code with the
connector’s namespace and schema location and add the required dependencies to the project’s
`pom.xml` file:

1.  In **Mule Palette**, click **(X) Search in Exchange**.

2.  In **Add Dependencies to Project**, type `veeva vault` in the search field.

3.  Click Veeva Vault 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 Veeva Vault 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 source, follow these steps:

1.  In **Mule Palette**, 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 source in the app.

6.  On the **General** tab, specify 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 are specifying an action for that connector to
perform.

To add an operation for Veeva Vault Connector, follow these steps:

1.  In **Mule Palette**, select **Veeva Vault** and then select the desired operation.

2.  Drag the operation onto the Studio canvas, next to the input source.

## Configure a Global Element for the Connector

When you configure a connector, 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 Veeva Vault system. Veeva Vault Connector supports
Basic authentication.

To configure the global element for Veeva Vault Connector, follow these steps:

1.  Select the operation in the Studio canvas.

2.  In the **General** configuration screen for the operation, click the **Add** icon to access the
    global element configuration fields.

3.  In the **General** tab, in **Connection**, select the authentication method to configure:

    - [Basic Connection](#basic_auth)

    - [OAuth 2.0 / Open ID Connection Provider](#oauth2-oidc-connection)

      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.  In 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 Connection

Enter the following information in the **General** tab of the **Global Element Properties** screen
to configure Basic authentication:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>Configuration name</p></div></div></td></tr><tr><td><p><strong>Vault URL</strong></p></td><td><div><div><p>URL of the Veeva Vault instance required for the connection</p></div></div></td></tr><tr><td><p><strong>Username</strong></p></td><td><div><div><p>Username used to initialize the session</p></div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>Password used to authenticate the user</p></div></div></td></tr><tr><td><p><strong>Client Id</strong></p></td><td><div><div><p>Client ID to send with each request header to the Veeva Vault instance for tracking purposes, in the format <code>{organization}-{company/team}</code>.<br></p></div><div><p>The client ID has the prefix <code>mulesoft</code> and the suffix <code>client-vaultconnector</code>, for example, <code>mulesoft-abcpharma-clinicalprod-client-vaultconnector</code>.</p></div></div></td></tr></tbody></table>

The following image shows an example of configuring the **General** tab for Basic authentication:

![Authentication fields completed in the General tab for Basic authentication](/mulesoft/current/en-us/veevavault-connector/latest/_images/basic-auth.png)

Enter the following information in the **Advanced** tab of the **Global Element Properties** screen
to configure the burst API limit for Basic authentication:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Response Timeout</strong></p></td><td><div><div><p>Maximum amount of time, in milliseconds, that the connector waits for the Veeva Vault response. If the maximum amount of time is exceeded, a timeout exception is thrown. The default is 30,000 milliseconds (30 seconds).</p></div></div></td></tr><tr><td><p><strong>Burst API Limit Profile</strong></p></td><td><div><div><p>Burst API limit profile configuration to act upon if the specified burst API limit of the Veeva Vault API reaches or exceeds the configured threshold.<br></p></div><div><p>If <strong>Burst API limit config</strong> is enabled (default), then the connector evaluates the Veeva Vault API’s response header (<code>X-VaultAPI-BurstLimitRemaining</code>) value against the specified <strong>API Limit Threshold</strong> value. If the remaining burst API limit reaches or exceeds the specified <strong>API Limit Threshold</strong> value, the connector waits for the specified amount of time to restart the count of <strong>Burst Limit Remaining</strong>.<br></p></div><div><p>The following example shows an application log with a warning message at <code>2019-06-06 10:34:45,096</code>, halting the process for five minutes, as shown in the next message at <code>2019-06-06 10:39:45,098</code>:</p></div><div><div><pre>WARN 2019-06-06 10:34:45,096 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Burst API Limit remaining calls [1997] has exceeded/reached an API Limit Profile threshold set as [1997]. As per API Limit Profile, Veeva Vault Connector will wait for [5] MINUTES.

WARN 2019-06-06 10:39:45,098 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.operations.VeevaVaultOperations: Properties or Fields is not available for api [/api/v18.2/metadata/objects/documents/types/site_management__c] , will use input list [[name__v, type__v, subtype__v, classification__v, lifecycle__v, status__v, study__v, product__v, id]] if configured to build VQL query

INFO 2019-06-06 10:39:45,098 [[MuleRuntime].io.27:
[veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event:
99716950-8818-11e9-90e2-d61515f42856]
org.mule.extension.veevavault.internal.pagination.GetDocumentsPagingProvider: Query Build :: SELECT
name__v, type__v, subtype__v, classification__v, lifecycle__v, status__v, study__v, product__v, id
FROM documents WHERE name__v= 'F22611234--6764'

INFO 2019-06-06 10:39:46,024 [[MuleRuntime].io.27:
[veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event:
99716950-8818-11e9-90e2-d61515f42856]
org.mule.extension.veevavault.internal.service.HttpRequestService: Response received for sync http
request ::
'https://[vault-domain]/api/v18.2/query?q=SELECT+name__v%2C+type__v%2C+subtype__v%2C+classification__v%2C+lifecycle__v%2C+status__v%2C+study__v%2C+product__v%2C+id+FROM+documents+WHERE+name__v%3D+%27F22611234--6764%27++LIMIT+1000+OFFSET+0'
in 925 milliseconds.</pre></div></div></div></td></tr><tr><td><p><strong>API Limit
Threshold</strong></p></td><td><div><div><p>Veeva Vault API limit threshold for <strong>Burst API
Limit Profile</strong>. When the specified limit is reached or exceeded, the connector waits for the
specified amount of time. The default is
<code>200</code>.</p></div></div></td></tr><tr><td><p><strong>Wait
Time</strong></p></td><td><div><div><p>Amount of time that the connector waits if the <strong>API
Limit Threshold</strong> is reached or exceeded. The default is
<code>5</code>.</p></div></div></td></tr><tr><td><p><strong>Time
Unit</strong></p></td><td><div><div><p>Time unit for the wait time. The default is
<code>MINUTES</code>.</p></div></div></td></tr><tr><td><p><strong>Daily API Limit
Profile</strong></p></td><td><div><div><p>Daily API limit exceed profile configuration to use if the
daily API limit of the Veeva Vault API reaches or exceeds the configured threshold. The daily limit
is the total number of API calls within any 24-hour window.<br></p></div><div><p>The following
example shows an application log with a warning message at <code>2019-06-06 10:47:31,698</code> and
an error message at <code>2019-06-06 10:47:31,699</code>:</p></div><div><div><pre>WARN 2019-06-06
10:47:31,698 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING
@108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856]
org.mule.extension.veevavault.internal.service.HttpRequestService: Veeva Daily API Limit remaining
calls [10000] has exceeded/reached an Daily API Limit Profile threshold set as [10000]. As per API
Limit Profile, Veeva Vault Connector will throw an exception.

ERROR 2019-06-06 10:47:31,699 [[MuleRuntime].io.44:
[veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event:
624cfa50-881a-11e9-90e2-d61515f42856]
org.mule.extension.veevavault.internal.service.HttpRequestService: Exception caught while processing
Sync request ::: https://xxxxx-xxxxx.veevavault.com/api/v20.1/metadata/vobjects/site__v, Exception
::: \{"responseStatus":"FAILURE","errors":[\{"type":"API_LIMIT_EXCEED","message":"The Veeva Vault
Connector has reached/exceeded daily API limit remaining calls [10000]. The configured daily api
limit threshold is \(10000\)"}\]}

ERROR 2019-06-06 10:47:31,767 [[MuleRuntime].io.44:
[veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event:
624cfa50-881a-11e9-90e2-d61515f42856]
org.mule.runtime.core.internal.exception.OnErrorPropagateHandler:

---

Message : An error occurred from the Veeva Vault API. Error Code: API_LIMIT_EXCEED. Original Error
Message: The Veeva Vault Connector has reached/exceeded daily API limit remaining calls [10000]. The
configured daily api limit threshold is (10000). Error type : VEEVAVAULT:API_LIMIT_EXCEED

**********************************************************************************</pre></div></div></div></td></tr><tr><td><p><strong>API
Limit Threshold</strong></p></td><td><div><div><p>Veeva Vault API limit threshold for <strong>Daily
API Limit Profile</strong>. When the specified limit is reached or exceeded, the connector waits for
the specified amount of time. The default is
<code>10000</code>.</p></div></div></td></tr></tbody></table>

The following image shows an example of configuring the **Advanced** tab for Basic authentication:

![Authentication fields completed in the Advanced tab for Basic authentication](/mulesoft/current/en-us/veevavault-connector/latest/_images/basic-auth-adv.png)

### OAuth 2.0 / Open ID Connection Provider

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

Veeva Vault supports several OAuth providers, such as Azure AD, Ping Federate, and any other
provider that supports OIDC (OpenID Connect).

> [!NOTE] Currently, Okta and any other providers that require PKCE are not supported.

Configure the OAuth provider for Veeva Vault Connector. The following steps show how to configure
the Veeva service to communicate with the OAuth provider:

1.  In the Veeva Vault Admin panel, navigate to the **Settings** tab.

2.  In **Domain Settings**, select **OAuth 2.0 / OpenID Connect Profiles**.

3.  Click **Create**.

4.  Configure your profile. Enter values for **Label** and **Name**, set **Status** to `Active`, and
    set **Authorization Server Provider** to the provider you are using, or select `Other` if your
    provider is not in the list. You can also uncheck the **Perform strict Audience Restriction
    validation** checkbox.

5.  Enter information for **AS Metadata**. All OpenID Connect providers have a URL ending with
    `/.well-known/openid-configuration`, which contains this metadata. For example:

    - Okta: `https://{OKTA_INSTANCE}.okta.com/.well-known/openid-configuration`

    - Azure: `https://login.microsoftonline.com/{TENANT}/v2.0/.well-known/openid-configuration`

    - PingFederate: `https://{YOUR_INSTANCE}/.well-known/openid-configuration`

      Use this metadata to configure **AS Metadata** by clicking the **Upload AS Metadata** button
      and selecting the **Provide Authorization Server Metadata URL** option. This enables you to
      paste the above URL into **AS Metadata**.

      ![OAuth 2.0/OpenID Connect Profile configuration window with completed fields from the steps above](/mulesoft/current/en-us/veevavault-connector/latest/_images/oauth-veeva-config-profile.png)

6.  Click **Save**. Now, you can see the created profile.

    ![Vault Session ID URL and AS Metadata URL fields in a new window after creating the profile](/mulesoft/current/en-us/veevavault-connector/latest/_images/oauth-veeva-config-session-id.png)

    Note down the **Vault Session ID URL** for further use when you configure the connector. To
    fully configure Veeva with OpenID, you must provision users to use this new profile. Refer to
    the [Provision Users to Use SSO](https://platform.veevavault.help/en/gr/13977/) for more
    information.

Now, you can configure Veeva Vault Connector with OAuth 2.0.

Enter the following information in the **General** tab of the **Global Element Properties** screen
to configure OAuth 2.0 / Open ID connection:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>Configuration name</p></div></div></td></tr><tr><td><p><strong>Vault URL</strong></p></td><td><div><div><p>Veeva Vault instance URL required for connection.</p></div></div></td></tr><tr><td><p><strong>Version</strong></p></td><td><div><div><p>Version for the Veeva Vault instance required.</p></div></div></td></tr><tr><td><p><strong>Client Id</strong></p></td><td><div><div><p>Client ID required to send with each request header to the Vault instance.</p></div></div></td></tr><tr><td><p><strong>OIDC Profile ID</strong></p></td><td><div><div><p>OIDC profile ID generated by Veeva when creating a new OIDC profile. To configure the OIDC profile ID, use the ID in your OIDC profile in Veeva. Your OIDC profile contains a <strong>Vault Session ID URL</strong>, for example, <code>https://login.veevavault.com/auth/oauth/session/_00000000-aaaa-bbbb-cccc-111111111111</code>, in which <code>_00000000-aaaa-bbbb-cccc-111111111111</code> is the OIDC profile ID. Use this value for the <strong>OIDC Profile ID</strong> field.</p></div></div></td></tr><tr><td><p><strong>Consumer Key</strong></p></td><td><div><div><p>OAuth consumer key, as registered with the service provider. This is your IdP client ID, assuming you already have a client application registration created at the ID provider of your choice, for example, PoneOne or PingFederate.</p></div></div></td></tr><tr><td><p><strong>Consumer Secret</strong></p></td><td><div><div><p>OAuth consumer secret, as registered with the service provider. This is your IdP client secret, assuming you already have a client application registration created at the ID provider of your choice, for example, PoneOne or PingFederate.</p></div></div></td></tr><tr><td><p><strong>Authorization Url</strong></p></td><td><div><div><p>OAuth 2.0 authorization URL, such as <code>https://{your-instance}/as/authorization.oauth2</code> for PingFederate.</p></div></div></td></tr><tr><td><p><strong>Access Token Url</strong></p></td><td><div><div><p>OAuth 2.0 token URL, such as <code>https://{your-instance}/as/token.oauth2</code>.</p></div></div></td></tr><tr><td><p><strong>Scopes</strong></p></td><td><div><div><p>You can set up your OAuth 2.0 scopes as necessary, but the important ones <code>openid</code> and <code>offline_access</code> are already pre-filled.</p></div></div></td></tr><tr><td><p><strong>Resource Owner Id</strong></p></td><td><div><div><p>Depending on your IdP configuration, you can leave it blank.</p></div></div></td></tr><tr><td><p><strong>Listener Config</strong></p></td><td><div><div><p>Create a new HTTP Listener or use an existing one if you have one, for example, <code>http://localhost:8081/</code>.</p></div></div></td></tr><tr><td><p><strong>Callback Path</strong></p></td><td><div><div><p>Callback path of your application. If you set it to <code>callback</code>, your full callback path is <code>http://localhost:8081/callback</code>. Do not forget to add your callback path to the IdP’s redirect URLs.</p></div></div></td></tr><tr><td><p><strong>Authorize Path</strong></p></td><td><div><div><p>Authorize path. You will navigate to this path when starting the OAuth 2.0 dance, for example, <code>authorize</code> means the full path is <code>http://localhost:8081/authorize</code>.</p></div></div></td></tr><tr><td><p><strong>External Callback Url</strong></p></td><td><div><div><p>You can set this directly to <code>http://localhost:8081/callback</code>.</p></div></div></td></tr></tbody></table>

Here is the XML for the OAuth 2.0 configuration for Veeva Vault Connector:

```xml
<configuration-properties file="application.properties" />

<http:listener-config name="HTTP_Listener_config" >
    <http:listener-connection host="localhost" port="${http.port}" >
    </http:listener-connection>
</http:listener-config>

<veevavault:config name="Veeva_Vault_Config">
    <veevavault:oauth2-oidc-connection vaultURL="https://${veeva.instance}.veevavault.com" clientId="${veeva.client.id}" oidcProfileId="${veeva.oidc.profile}">
        <veevavault:oauth-authorization-code consumerKey="${azure.client.id}" consumerSecret="${azure.client.secret}" authorizationUrl="https://login.microsoftonline.com/${azure.tenant}/oauth2/v2.0/authorize" accessTokenUrl="https://login.microsoftonline.com/${azure.tenant}/oauth2/v2.0/token" scopes="${azure.appid}/.default"/>
        <veevavault:oauth-callback-config listenerConfig="HTTP_Listener_config" callbackPath="callback" authorizePath="authorize" externalCallbackUrl="${oauth2.callback_uri}"/>
    </veevavault:oauth2-oidc-connection>
</veevavault:config>
```

The above example uses the Salesforce authentication provider and requires you to create an
`application.properties` file in your resources folder with this format:

http.port = 8080 oauth2.callback\_uri = http://localhost:8080/callback

veeva.instance = your-veeva-instance veeva.client.id = your-veeva-client-id veeva.oidc.profile =
your-oidc-id

azure.tenant = azure-tenant-id azure.appid = azure-app-id azure.client.id = azure-oauth-client-id
azure.client.secret = azure-oauth-client-secret

> [!NOTE] Azure AD is a special case in which you must set the scope as `{app_id}/.default`. With
> other OAuth providers, you can use the predefined `openid offline_access` scopes unless other
> scopes are required.

## 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 app log output goes to the Anypoint Studio
  console window.

- If you’re running the app using Mule from the command line, the app log output goes to your
  operating system console.

Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also access the
app log in the default location `MULE_HOME/logs/<app-name>.log`. You can configure the location of
the log path in the app log file `log4j2.xml`.

## Next Step

See [Additional Configuration Information](https://docs.mulesoft.com/veevavault-connector/latest/veevavault-connector-config-topics) for more
configuration steps.

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)

- [Veeva Vault Connector Reference](https://docs.mulesoft.com/veevavault-connector/latest/veevavault-connector-reference)

- [Salesforce Help](https://help.salesforce.com)
