# Operation Configuration in ERP Bridge

[Please refer to this section](https://app.gitbook.com/s/8aXoI2Tlg6UeyOnlRKhV/the-operation) for technical details on how to configure ERP Bridge.

## Database Mapping

In the Database Mapping section you decide which fields to connect from the SQL view to HubSpot.

On the left-hand column select the data from SQL that you want to synchronize and link it with the related property on HubSpot. For more information about which properties to synchronize, please refer to the [synchronization section](https://howto.erpbridge.io/readme/companies/synchronization-from-erp-to-hubspot/sql-recommended-synchronization).

<figure><img src="https://489586434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fft3Wb1b95o4TJkgnx8qk%2Fuploads%2Fgit-blob-9e2e289a890c1c04814fc11ca0eda0342d4d9c8f%2Fimage%20(9).png?alt=media" alt=""><figcaption><p>On the left-hand column select the data from SQL, on the right-hand column select the properties on HubSpot</p></figcaption></figure>

{% hint style="info" %}
We recommend to create custom section for the new properties:

* Create a property group called ERP Information for all custom company properties
* Create a custom section called ERP Information on the left sidebar of the companies record, where insert all the created custom properties
  {% endhint %}

## Decision rules

The following section is Decisions rules, where you set all the actions that the agent will perform once the synchronization will be on. For general guidelines, please refer to the [specific section](https://app.gitbook.com/s/8aXoI2Tlg6UeyOnlRKhV/the-operation/3-decision-rules).

<figure><img src="https://489586434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fft3Wb1b95o4TJkgnx8qk%2Fuploads%2Fgit-blob-c5ecdc1382c10763c1f314315a919ea69a549bb1%2Fimage%20(10).png?alt=media" alt=""><figcaption></figcaption></figure>

If you set ERP Code as primary key:

* Insert =0 in the first line means that if the ERP code does not exist, the agent will update the record,
* With several records with the same ERP code (=1), the agent will update the record,
* if there are several identical records (>1), the agent will skip the record.

{% hint style="danger" %}
It's fundamental to choose a field as 'primary key' that will always be uniquely populated, otherwise records will be duplicated in the next synchronization.
{% endhint %}

## Associations

In the [Associations section](https://app.gitbook.com/s/8aXoI2Tlg6UeyOnlRKhV/the-operation/4-db-greater-than-hs-associations) for the Companies object, the advice is to leave the fields empty and click on Done.

<figure><img src="https://489586434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fft3Wb1b95o4TJkgnx8qk%2Fuploads%2Fgit-blob-0eae9f74c74a231019fbbaf013a9b8a8f24a9681%2Fimage%20(5).png?alt=media" alt=""><figcaption></figcaption></figure>

Now the new operation Company will appear on the Homepage, to activate the synchronization make sure the button is on.

<figure><img src="https://489586434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fft3Wb1b95o4TJkgnx8qk%2Fuploads%2Fgit-blob-9f92800ff3b7c134378db567de6f24ecaeb6ec4f%2Fimage%20(19).png?alt=media" alt="" width="375"><figcaption></figcaption></figure>
