> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/patchworks-connectors/descartes-peoplevox-prebuilt-connector/the-peoplevox-setdata-script/using-the-peoplevox-setdata-script-in-process-flows.md).

# Using the Peoplevox setData script in process flows

## Introduction

Having installed the Peoplevox connector and applied pre and post request scripts, you're ready start using the connector in process flows.

If you build a process flow with Peoplevox defined as a **target** [connection shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md), you must always include a [script shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/script-shape.md) immediately before the connection shape, and associate this with the [setData custom script](/product-documentation/connectors-and-instances/patchworks-connectors/descartes-peoplevox-prebuilt-connector/the-peoplevox-setdata-script.md#stage-3-create-a-setdata-script). This script takes care of data conversions that are required before sending data into Peoplevox.

{% hint style="info" %}
You should have already created all required custom scripts but if you haven't, please complete steps detailed on [this page](/product-documentation/connectors-and-instances/patchworks-connectors/descartes-peoplevox-prebuilt-connector/the-peoplevox-setdata-script.md) before proceeding.
{% endhint %}

## The steps

**Step 1**\
[Build your process flow](/product-documentation/process-flows/building-process-flows.md) in the usual way, including a [connection shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) configured for Peoplevox as a target.

**Step 2**\
Immediately before the Peoplevox connection, add a [script shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/script-shape.md) - for example:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FkjysEQdlkJq2heVXHyOj%2Fflow%202.png?alt=media&amp;token=d0336ebe-2055-405b-a743-ff8f59ffbd5b" alt=""><figcaption></figcaption></figure>

**Step 3**\
In **custom script settings**, select the **PVX setData** script:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F4p3CQMrzOFrWHQ8HlPVc%2Fflow%203.png?alt=media&amp;token=698a08fd-bf6b-4f02-89da-9ae307279cf4" alt=""><figcaption></figcaption></figure></div>

**Step 4**\
Save the shape - the script is added to you flow:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FH1Cqc57aESQUemkuZlw5%2Fflow%204.png?alt=media&amp;token=68431e09-24c9-45da-ad8a-38da371cecc1" alt="" width="276"><figcaption></figcaption></figure></div>
