---
schema_version: "1"
id: 28617fd48f3408daeaec54d42e95cc73fb2634d858df84b8fef7e55398637dd8
title: Veeva Vault Connector 1.5 Additional Configuration Information
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/veevavault-connector/latest/veevavault-connector-config-topics.md
canonical_url: https://docs.mulesoft.com/veevavault-connector/latest/veevavault-connector-config-topics
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 613b6d9542787dea49e7b080588a2c3f62ed88e6dbd53452c3b7b280677548f0
description: MuleSoft Documentation Site
release: "1.5"
latest: true
---
---
product: Veeva Vault Connector
version: 1.5
is-latest-version: true
---

# Veeva Vault Connector 1.5 Additional Configuration Information

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## Invoke Rest API

The **Invoke Rest API** operation sends the Mule message payload as the request body.

In addition to the request body, you can configure the following using a DataWeave script or
expression:

- [Headers](#headers)

- [URI Parameters](#uri-parameters)

- [Query Parameters](#query-parameters)

### Configure a Header

1.  In Anypoint Studio, head to **General > Request > Query Parameters**.

2.  Click the plus icon (+) to add headers to the request.

    For example, you can add header names `HeaderName1` and `HeaderName2`, and header values
    `HeaderValue1` and `HeaderValue2`, by using DataWeave expressions:

    #\[{'HeaderName1' : 'HeaderValue1', 'HeaderName2' : 'HeaderValue2'}\].

### Configure a URI Parameter

Configure a URI parameter when you want to use a placeholder, such as `/objects/documents/{doc_id}`,
in the path of your request.

1.  In Anypoint Studio, type a placeholder enclosed in curly brackets in the **Path** field.

2.  Select **URI Parameters**.

3.  Click the plus sign (+) to enter a name and value.

### Configure a Query Parameter

1.  In Anypoint Studio, head to **General > Request > Query Parameters**.

2.  Click the plus icon (+) to add a parameter to a request. Type a name and value for the parameter
    or use a DataWeave expression to define the name and value.

#### Sending Form Parameters in a POST Request

To send parameters in a POST request:

1.  In **General > Request**, select the **POST** method.

2.  In **Body**, construct the payload of the Mule message.

    1.  Enter the names and the values of the parameters to send, for example, for
        **application/x-www-form-urlencoded**:

        #\[output application/x-www-form-urlencoded --- {'key1':'value1', 'key2':'value2'}\]

    2.  In **multipart/form-data**, ensure that the **Content-Type** value contains a boundary
        attribute with the same value as the DataWeave output as shown, for example
        `multipart/form-data; boundary=abcdefg`.

        %dw 2.0 output multipart/form-data boundary='abcdefg'
        ---

        { parts: { file: { headers: { "Content-Disposition": { "name": "file", "filename":
        attributes.fileName }, "Content-Type": payload.^mimeType }, content : payload }, name\_\_v:
        { headers: {

            		},
            		content: 'Test Document'
            	},
            	type\_\_v: {
            		headers: {

            		},
            		content: 'Trial Management'
            	},
            	subtype\_\_v: {
            		headers: {

            		},
            		content: 'Meetings'
            	},
            	classification\_\_v: {
            		headers: {

            		},
            		content: 'Kick-off Meeting Material'
            	},
            	lifecycle\_\_v: {
            		headers: {

            		},
            		content: 'Base Doc Lifecycle'
            	},
            	study\_\_v: {
            		headers: {

            		},
            		content: '0ST000000000301'
            	},
            	comments\_\_c: {
            		headers: {

            		},
            		content: 'Test Document'
            	}
            }

        }

## Connector Operations SUCCESS and FAILURE Response

Veeva Vault Connector operation responses are based on the Veeva Vault API success or failure
responses with an error.

The connector returns a `SUCCESS` response at `HIGH LEVEL` and `SUCCESS` or `FAILURE` at
`LOW LEVEL`. This means the connector operation is successful but some document or object records
failed to create or update due to some irrelevant metadata being passed in the request.

### Examples

**SUCCESS with a SUCCESS response**:

{ "responseStatus": "SUCCESS", "data": \[{ "id": 239026, "name\_\_v": "E22611234--38483",
"responseStatus": "SUCCESS" }, { "id": 239025, "name\_\_v": "Kick-off Meeting Material
Updated12341234--81032", "responseStatus": "SUCCESS" } \] }

**SUCCESS with a FAILURE response**:

{ "data": \[ { "external\_id\_\_v": "TEST-238924", "rendition\_type\_\_v":
"imported\_rendition\_\_c", "id": 238924, "responseStatus": "FAILURE",
"minor\_version\_number\_\_v": 1, "errors": \[ { "type": "INVALID\_DATA", "message": "Document not
found \[238924/0/1\]." } \], "major\_version\_number\_\_v": 0 }, { "external\_id\_\_v":
"TEST-238925", "rendition\_type\_\_v": "imported\_rendition\_\_c", "id": 238925, "responseStatus":
"FAILURE", "minor\_version\_number\_\_v": 1, "errors": \[ { "type": "INVALID\_DATA", "message":
"Document not found \[238925/0/1\]." } \], "major\_version\_number\_\_v": 0 } \], "responseStatus":
"SUCCESS" }

Veeva Vault Connector operations throw an exception when Veeva Vault APIs return a `FAILURE`
response, for example:

**FAILURE with an ERROR response**

{ "responseStatus": "FAILURE", "errors": \[ { "type": "INVALID\_DATA", "message": "Unknown
relationship \[reviewer\_\_v\]" } \] }

Upon receiving the `FAILURE` response from the Veeva Vault APIs, the connector operations throw an
exception, which is caught in the **Error Handling** component within the Mule flow:

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
Message : An error occurred from the Veeva Vault API. Error Code: INVALID\_DATA. Original Error
Message: Unknown relationship \[reviewer\_\_v\]. Error type : VEEVAVAULT:INVALID\_DATA
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

The following error codes are caught in the **Error Handling** component:

- VEEVAVAULT:API\_LIMIT\_EXCEEDED

- VEEVAVAULT:ATTRIBUTE\_NOT\_SUPPORTED

- VEEVAVAULT:INACTIVE\_USER

- VEEVAVAULT:INVALID\_DATA

- VEEVAVAULT:INVALID\_DOCUMENT

- VEEVAVAULT:INSUFFICIENT\_ACCESS

- VEEVAVAULT:MALFORMED\_URL

- VEEVAVAULT:METHOD\_NOT\_SUPPORTED

- VEEVAVAULT:NO\_PERMISSION

- VEEVAVAULT:OPERATION\_NOT\_ALLOWED

- VEEVAVAULT:PARAMETER\_REQUIRED

## Streaming and Pagination

With the exception of **Download Document**, all connector operations return an input stream as a
payload, with respective results based on operation output. Because of this, by default Mule applies
streaming strategies. See [Mule Streaming Strategies](https://docs.mulesoft.com/mule-runtime/latest/streaming-about) for
more details. The streaming strategies configuration fields are in the **Advanced** tab of the
connector operations.

![Streaming strategy configuration fields](/mulesoft/current/en-us/veevavault-connector/latest/_images/veevavault-connector-streaming-pagination.png)

The following operations in the connector provide a pagination mechanism based on Mule standard
pagination.

- **Get Documents**

- **Get Object Records**

- **Query**

- **Get Audit Details**

While using the paginated operations, make sure to include a `For-Each/Splitter` element to retrieve
each object. The pagination operations have **Fetch Size** and **Batch Size** fields.

- **Fetch Size**  
  A limited number of records that can be retrieved in a single page. The operation returns the
  pages with the fetch size number of JSON object records.  
  In some cases, Veeva APIs auto-calculate the fetch size (number of records on each page) based on
  record size and the calculation exceeds the standard record size. The operation returns calculated
  records on each page.

- **Batch Size**  
  The number of pages to return in each batch. Each page contains the fetch size number of records.
  The operation returns a number of records (metadata in JSON format) per batch, and is calculated
  like in the following example:

Fetch Size set as \*1000\* Batch Size set as \*10\*

If the total records in the vault are \*100,000\*, then:

Number of pages = Total records/Fetch Size = 100000/1000 = 100 pages.

Number of pages per batch = Number of pages/Batch Size = 100/10 = 10 pages per batch.

Number of Records per batch = Number of pages per batch \* Fetch Size = 10 \* 1000 = 10,000 records.

Therefore, the number of records returned per batch would be 10,000 records.

The repeatable streams measure the buffer size in byte measurements. When handling objects, the
runtime measures the buffer size using instance counts.

In non-repeatable streams, connector operations return streams as the number of records per batch.
Repeatable streams return all records at once, so when calculating the in-memory buffer size for
repeatable auto-paging, you need to estimate how much memory space each instance takes to avoid
running out of memory.

## Next Step

After you complete configuring the connector, you can try the
[Examples](https://docs.mulesoft.com/veevavault-connector/latest/veevavault-connector-examples).

## See Also

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

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