> For the complete documentation index, see [llms.txt](https://docs.erpbridge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.erpbridge.io/the-operation/4-db-greater-than-hs-associations.md).

# 4 - \[DB -> HS] Associations

{% hint style="info" %}
This step is **optional** and only for **\[DB -> HS]** operations
{% endhint %}

In this step you are able to create associations between objects of the type you are trying synchronizing and a different one (*E.g., between Contacts and Companies*).\
You cannot associate objects of the same type because of limitations imposed by HubSpot.

The information required by this step is:

* **Destination Object**: the object type which you want to associate the current object with.
* **Database Field**: the database column name that will be used to retrieve the value to be used as the search value to obtain the objects to perform the association with.
* **HubSpot Field**: the property of the "Destination Object" used to search matches on HubSpot.

*Let's make an example*:

Let's say for instance that you have **deals** in a database table like the one below and you want to synchronize them to HubSpot as Deals object. On top of that, you want to associate every deal with the HubSpot **company** write in the "CompanyName" column.

| ID   | Title          | CompanyName | Amount |
| ---- | -------------- | ----------- | ------ |
| 1234 | My deal        | Acme Ltd    | 1000   |
| 4567 | My other deal  | Acme Ltd    | 2000   |
| 8901 | Fantastic deal | Lorem Ltd   | 5000   |

In order to do that, the association page will be like that:

* Destination Object: **Company**
* Database Field: **CompanyName**
* HubSpot Field: **Name**

If you take the first row as example, after adding or updating the deal object as configured in [Database Mapping](/the-operation/2-database-mapping.md) step using the rules configured in [Decision Rules](/the-operation/3-decision-rules.md) step, the software will try to search (with exact match) in HubSpot companies if there are objects with Name property valued as "Acme Ltd". If the search return one ore more results, ERP Bridge will associate them to the deal object.

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.erpbridge.io/the-operation/4-db-greater-than-hs-associations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
