# Building your own connector

## Introduction

The connector builder walks you through a series of configuration pages so you can complete all required setup that's needed to make your connector available in Patchworks.&#x20;

Once your connector is built, it is displayed in the [Patchworks marketplace](https://doc.wearepatchworks.com/product-documentation/marketplace/the-patchworks-marketplace), so users **associated with your company profile** can add [instances](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/working-with-instances) of it.&#x20;

{% hint style="info" %}
Prebuilt connectors must be installed before instances can be added for them. However, when you build your own connector it's automatically installed, ready for instances to be added.
{% endhint %}

## Preparation

Before you start work with the connector builder, make sure that you have the API documentation to hand for whichever third-party application you're building.

We also recommend that you fire up [Postman](https://www.postman.com/), so you can test any API requests that you're adding to the connector builder.

## Required setup

As you step through the connector builder, you are prompted to complete the following configuration steps.&#x20;

{% hint style="info" %}
Make sure that you have the API documentation to hand for whichever third-party application you're building!
{% endhint %}

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fu4hlSUN67apO4ByLzAe1%2F1.png?alt=media&#x26;token=21293c5f-14dd-4eca-b7f5-592abfe0a165" alt="" data-size="line">  Basic details</summary>

Provide a name and other basic details for your new connector. For guidance on completing this page please see [1: Basic details](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/1-basic-details).

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FSVL21izQ9y5i1VjIbH2Q%2Fconnector%20builder%20-%201.png?alt=media\&token=272f2a34-885a-417b-b4c7-60874ffc6b02)

</details>

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FD3f5lNNHEhAu8Zn0Ggs6%2F2.png?alt=media&#x26;token=68f611dd-945e-4e24-9233-f803ae441e98" alt="" data-size="line">  Variables</summary>

Add variables that you might use in multiple places in your connector setup (i.e. variables used for authentication method and endpoint configuration). For guidance on completing this page please see [2: Connector variables](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/2-connector-variables).

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FUiU9BWoVoTT7JG6sC025%2Fconnector%20builder%20-%202.png?alt=media\&token=ed8626d3-d1cb-4897-965e-0ad6250501aa)

</details>

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FVCQL42m29ZL1W1x3Q9aW%2F3.png?alt=media&#x26;token=7b70814f-ab70-4b5f-9cae-65c9dcf89da7" alt="" data-size="line">  Authentication methods</summary>

How would you like users to authorise any instances that they add for this connector? Every connector requires at least one authorisation method. For guidance on completing this page please see [3: Authentication methods](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods).

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FCSgx71kyfoeYZcqmTTT6%2Fconnector%20builder%20-%203.png?alt=media\&token=b2efb19a-bad1-41f3-8775-8121cdf26c8e)

</details>

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fj27NPzQQFoRlKRDAmmsj%2F4.png?alt=media&#x26;token=482820e7-110b-4469-9da4-88339e687f6c" alt="" data-size="line">  Endpoints</summary>

Define the API requests for any endpoints you want to make available for this connector. For example, if you want to pull/push products then you'll need a 'products' endpoint; if you want to pull/push orders then you'll need an 'orders' endpoint, etc. For guidance on completing this page please see [4: Endpoints](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints).

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FTT0zcM4ojbxlDn67voZT%2Fconnector%20builder%20-%204.png?alt=media\&token=9007a73e-251e-4275-b969-a931d4ad94a1)

</details>


---

# 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/developer-hub/connector-builder/building-your-own-connector.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.
