# Connectors & instances introduction

## Introduction

Understanding the relationship between **connectors** and **instances** is key when you are working with process flows. In short:&#x20;

* A [connector](#connectors) is a generic integration of a third-party business system/application - it contains everything needed 'under the hood' (for example, endpoints, authentication methods, etc.) to sync data from/to the associated application.&#x20;
* An [instance](#instances) of a connector is unique to your company, personalised with your own credentials and settings. Any instances that you add are available for use in [process flows](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/about-process-flows) when you add a [connection shape](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape).

These relationships are illustrated below:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FqT4oSQmsEjY9ticTXqjl%2Fconnectors%20instances%20process%20flows.png?alt=media&#x26;token=22f61827-83e2-4ab4-8386-fed955d1351e" alt="" width="563"><figcaption></figcaption></figure></div>

## Connectors

The chances are that your business uses a range of third-party applications - for example, you might take sales orders in Shopify, manage customer data in Voyado, and handle financial accounts in NetSuite.&#x20;

In Patchworks, a **connector** is an integration of a third-party business system/application that you can [install](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/connectors-and-instances/working-with-connectors/installing-a-connector) if you need to sync data from/to the associated application. A curated library of **prebuilt connectors** can be found in the [Patchworks marketplace](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/marketplace/the-patchworks-marketplace).

{% hint style="info" %}
If you need to integrate a third-party application that doesn't have a prebuilt connector in the [Patchworks marketplace](#patchworks-marketplace) - and if you have technical knowledge of APIs and working with data structures - you can use the [connector builder](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/developer-hub/connector-builder) to integrate any application with a REST API.&#x20;
{% endhint %}

When you [install a connector](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/connectors-and-instances/working-with-connectors/installing-a-connector), you are installing a package of generic configuration and setup that's required to integrate the associated third-party application in Patchworks. You only need to install a given **connector** once. After that, you can add as many [instances](#instances) of it as you need for use in your [process flows](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/about-process-flows).&#x20;

Similarly, if you [update an installed connector](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/connectors-and-instances/working-with-connectors/updating-a-connector), that update is applied to all associated instances automatically.

{% hint style="info" %}
The Patchworks development team maintains all prebuilt connectors in the marketplace. If you have installed a connector, you may find that updates become available in the marketplace - you can decide if/when you apply these updates.
{% endhint %}

## Instances

An **instance** is the mechanism used to configure a **connector** for your own use in [process flows](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/about-process-flows).&#x20;

{% hint style="info" %}
**Instances** are added to process flows via the [connection shape](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape).
{% endhint %}

Every instance requires authentication credentials that allow you to access the associated third-party application. Typically, you'll create one instance for each set of credentials that you have for a given connector that you want to use in [process flows](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/process-flows/about-process-flows). The examples below show how this might work in practice.

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FuKTXJEY34CVnak6PxrOz%2Fexample%20icon%202.svg?alt=media&#x26;token=7c8af2c5-9519-4757-bea9-172569a023bd" alt="" data-size="line"> Example 1: simple </summary>

In the simplest scenario, you might have one UK Shopify store which needs to sync orders to NetSuite. In this case, you would:

* Install the Shopify **connector** (once)
* Add one **instance** of your Shopify connector&#x20;
* Install the NetSuite **connector** (once)
* Add one **instance** of your NetSuite connector&#x20;

This is illustrated below:&#x20;

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FQKtBCegZ0hHvOVIqj8HB%2Fconnectors%20and%20instances%20-%20single.png?alt=media\&token=f1cda140-d997-4d4c-ab18-8524c3452ced)

</details>

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FuKTXJEY34CVnak6PxrOz%2Fexample%20icon%202.svg?alt=media&#x26;token=7c8af2c5-9519-4757-bea9-172569a023bd" alt="" data-size="line"> Example 2: complex</summary>

For a more complex scenario, let's say you have three Shopify stores - UK, EU and US (each with its authentication credentials) which need to sync orders to NetSuite. In this case, you would:

* Install the Shopify **connector** (once)
* Add three **instances** of your Shopify connector - one for each store
* Install the NetSuite **connector** (once)
* Add one instance of your NetSuite connector&#x20;

This is illustrated below:

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FPWgSU9CeA87kksqLnom6%2Fconnectors%20and%20instances%20-%20multi.png?alt=media\&token=065390d3-d266-46ba-a57a-c3a0e6fb0560)

</details>

## Event connectors

Event connectors are a different sort of connector, used to configure listeners for message brokers such as RabbitMQ. For more information please see the [Event connectors](https://doc.wearepatchworks.com/product-documentation/~/changes/J8IbZkP6ASUZu2oBhGi2/connectors-and-instances/event-connectors-beta) section.


---

# 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/~/changes/J8IbZkP6ASUZu2oBhGi2/connectors-and-instances/connectors-and-instances-introduction.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.
