# Adding entity schemas (services)

## Introduction

When the SFTP connector is used to sync data, Patchworks needs to know the expected data structure (i.e. the schema) of the payload for any entity/entities that you wish to sync. This is achieved by adding entity data structures to the SFTP connector.

## The steps

**Step 1**\
Access [settings](/product-documentation/patchworks-services/service-connectors/the-anatomy-of-a-service-connector.md#connector-settings) for the SFTP connector.

**Step 2**\
Scroll down to the **entities** section and click the **add custom entity** button:&#x20;

<figure><img src="/files/zV517YypGCoSVmOZ3DGt" alt=""><figcaption></figcaption></figure>

**Step 3**\
Click the **entity type** field and use the dropdown list to choose the entity that you wish. sync:

<figure><img src="/files/WnRMr6ktjf3Xx7XxGhO7" alt=""><figcaption></figcaption></figure>

**Step 4**\
Enter a display **name** for this entity.

**Step 5**\
To add the required data structure you can either:

* click the **upload csv** button and select a file to update

or

* paste the required structure into the **enter CSV payload** panel

{% hint style="info" %}
You can download a sample payload from the **entities** panel.
{% endhint %}

**Step 6**\
Whichever method you choose to add the required schema, identified fields are displayed in the **detected fields** panel.

<figure><img src="/files/7BtXT6YokLkXnUaoYVLY" alt=""><figcaption></figcaption></figure>

**Step 7**\
If you are satisfied that the data structure is correct, **save** the entity.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/patchworks-sftp-service-connector/adding-entity-schemas-services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
