# Split shape

## Introduction

The **split** shape is used to split out a given payload element. When data is split, the specified element (including any nested elements) is extracted for onward processing.

For example, your process flow might receive customer data from a source connection, but you need to send address details to a different endpoint. In this case, you'd use the [route shape](route-shape) to create two different routes, mapping just customer data down one, and splitting out addresses for the other.

{% hint style="info" %}
A single incoming payload for [any process flow shape](https://open.gitbook.com/~site/site_dIV1g/~/revisions/9dTvdvRJIRVZQXuBMMnJ/process-flows/building-process-flows/process-flow-shapes) should not exceed 500MB.

We recommend processing multiple, smaller payloads rather than one single payload (1000 x 0.5MB payloads are more efficient than 1 x 500MB payload!).

For payloads up to 500MB, consider adding a[ flow control shape](https://open.gitbook.com/~site/site_dIV1g/~/revisions/9dTvdvRJIRVZQXuBMMnJ/process-flows/building-process-flows/process-flow-shapes/standard-shapes/flow-control-shape) to batch data into multiple, smaller payloads. Payloads exceeding 500MB should be batched at source.
{% endhint %}

## Adding & configuring a split shape

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FpLMO12yvTCxi9PorCt53%2Ficons8-film.svg?alt=media&#x26;token=e59864bc-2d97-4f98-966c-a083c18e60db" alt="" data-size="line"> Show me</summary>

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FWFgpgnhmZXZnH4Aau1Tz%2Fdemo%20split%20shape.gif?alt=media\&token=b03bdf59-f487-46cc-86d7-f7ee4d63d4b5)

</details>

**Step 1**\
In your process flow, add the **split** shape in the usual way:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FFys9R3K6ImvMrrV65We0%2Fsplit%200.png?alt=media&#x26;token=75f16db4-f956-4da6-a7ad-021e00f88bd7" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 2**\
Select a **source integration** and **endpoint** to determine where the incoming payload to be split originates:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FyyzPGlDnP2cPFQMQX3Uz%2Fsplit%201b.png?alt=media&#x26;token=ec2d1798-bec6-4c5b-a4f2-88e90f766cba" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 3**\
Move down to the **level to split** section and use the dropdown data path to select the required data element to split - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FbHnuhcgVJlZQaX28g0Le%2Fsplit%201c.png?alt=media&#x26;token=37af2d3c-e3c0-4616-b695-1e1c88777afe" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
Remember - any data (including nested data) within the selected element will be split out into a new payload.
{% endhint %}

**Step 4**\
If required, you can add a **wrapper key**. This wraps the entire payload in an element of the given name - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F0Xrx0yg7R521DnerqCxP%2Fsplit%201D.png?alt=media&#x26;token=1fadb364-55ca-4a88-85aa-b9222fa59189" alt="" width="375"><figcaption></figcaption></figure></div>

...would wrap the payload as shown below:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F88gH5sudCsBStNoAv4mW%2Fsplit%201e.png?alt=media&#x26;token=af682428-865c-4a40-9caf-f173a8a8ee3b" alt="" width="327"><figcaption></figcaption></figure></div>

**Step 5**\
Save the shape.
