# Welcome to ERP Bridge

ERP Bridge is a no coding platform that easily integrate HubSpot data with major on-premises applications and ERPs

[Login in Application](https://admin.erpbridge.io/auth/sign-up)

{% embed url="<https://www.youtube.com/watch?t=117s&v=S6QBV1eVon4>" %}


# Software & Hardware requirements

The software right now supports only **Windows** operating system (Windows Server included) that are still supported by Microsoft (No EOL Windows versions).

**Linux** support is planned and we are actively developing it, but it's not available at the moment.

{% hint style="info" %}
If you cannot or you don't want to install ERP Bridge on the same server where the ERP is installed, **you can always install our software on a different machine**!

The only requirement for ERP Bridge is to have access to the ERP database, but it can be in a different machine/server.

That is especially useful when the ERP database is installed on a not supported OS or in case of strict security policy.
{% endhint %}

There is no need to install additional runtimes or third party software in order to run ERP Bridge.

The agent and the wizard software are extremely light and there are no minimum requirements for CPU performance and RAM quantity, however, because the agent runs queries on your database, if the volume of extracted data is high and the server has slow hardware, the extraction phase will be slow as well.

ERP Bridge supports only CPU with x86 architecture at 64 bits. ARM and RISC architectures are not officially supported.


# Environment Configuration

Microsoft SQL Server and Management Studio installation

**ERP Bridge supports potentially every on-premises ERPs.**

If you have an ERP based on Microsoft SQL Server (including Express version) or SAP Hana DBMS, you can create a new database for ERP Bridge on the SQL server or SAP Hana instance.

{% hint style="info" %}
It's possible to use a docker container with a SQL Server or SAP Hana image inside.
{% endhint %}

If the ERP relies on a database other than SQL Server or SAP Hana, our recommendation is to use an instance of Microsoft SQL Server - including  Express version - to create a linked server to the ERP database. In the table below you will find the official documentation for each database:

| Database of ERP | Connector type       | Documentation for create Linked Server                                                                                                            |
| --------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Oracle          | Microsoft SQL Server | [Link](https://blogs.oracle.com/cloud-infrastructure/post/how-to-create-linked-server-from-microsoft-sql-server-to-an-oracle-autonomous-database) |
| DB2 / AS400     | Microsoft SQL Server | [Link](https://www.ibm.com/support/pages/configuring-ole-db-provider-sql-server)                                                                  |
| PostgreSQL      | Microsoft SQL Server | [Link](https://www.mssqltips.com/sqlservertip/3662/sql-server-and-postgresql-linked-server-configuration-part-2/)                                 |
| MySQL           | Microsoft SQL Server | [Link](https://www.mssqltips.com/sqlservertip/4577/create-a-linked-server-to-mysql-from-sql-server/)                                              |
| ElasticSearch   | Microsoft SQL Server | [Link](https://www.cdata.com/kb/tech/elasticsearch-odbc-linked-server.rst)                                                                        |

Both SQL Server and SAP HANA do not need Linked Server to proceed.

## ERP Bridge database creation on Microsoft SQL Server

After installing Microsoft SQL Server Management Studio, we create a new database.

1. Right-click > New Database<br>

   <figure><img src="https://lh7-us.googleusercontent.com/Kq5Ol1KMQcMxkMFx1XPbD1laXLKRE5DUWHSWcDg4_RxxN8wQkc3WBJA_zdxBmxp0QRb01s7r1u4zPMGRliTPBh-JC90Y4_TMBAnCRpEX4yLe_36CUJaYqbYJSxyDHiji9HKK_n_00_wy0464_WmES9E" alt="" width="375"><figcaption></figcaption></figure>
2. In the Database name box, enter ERPBridge<br>

   <figure><img src="https://lh7-us.googleusercontent.com/UVkqWhVamAR0LYOjdiqOOR0WvZ4UY8kvErUl1qfXkE0Xn7hFLuSF4ZCjcXhmYo5wz--TKT7Df86ByQeuJlDe1ld-kBdwWXA4arTTPoEU1U5teDiUeyFHAxWD5rwy7jIGnZpVUyLNrszChjPN7Ok9bfM" alt="" width="375"><figcaption></figcaption></figure>

It follows a diagram of how the integration technique via ERP Bridge works.

<figure><img src="https://lh7-us.googleusercontent.com/2YQ6yjxMEx9P7HqWDsiDW6Dq39uu5lKMS07AWMiC0Pj4dwou7MUfIBPfUQ8bpjAK6snhA-KKhEgr3eaVbyjf23No1Ap6SuV0xTzKEDPL_TMottC9KxaSN58q_jXhBnS5KjTGn6MEfQ4y_4rmpS8ZndE" alt=""><figcaption></figcaption></figure>


# Data Preparation

Properties of the following types: checkbox, multiple checkboxes, dropdown select, radio select and HubSpot user, the data should match one of the internal values of the property.

When you are in the phase of preparation of data to be inserted in HubSpot, please consider the data-format that is accepted by HubSpot itself ([official documentation](https://developers.hubspot.com/docs/api/overview)).

### Database Tables

Database tables must not contain spaces or special characters other than the underscore character ("\_").

Here some example of good and bad table names:

✅ CONTACTS\
✅ ERP\_CONTACTS\
❌ ERP CONTACTS\
❌ ERP\&CONTACTS

### Date & DateTime

In HubSpot there are 2 types to handle the time:

* **Date**: it contains just the date (day, month and year) and the time is fixed at midnight. *(Ex: 2020-02-10)*
* **DateTime:** it contains both the date and the time part. *(Ex: 2020-02-10 06:10:00)*

In order to successfully transfer date and datetime data from the database, ERP Bridge try to convert the value you have in the database to UNIX Timestamp at UTC timezone.\
Even if the software will infer most of date formats, we suggest always to use the most common and international date format (**ISO 8601**): *dd-mm-yyyy.*

If you have a date already in UNIX Timestamp format, the software will bypass the conversion and it will just push the value to HubSpot.

{% hint style="warning" %}
**Be careful about the last point:** HubSpot requires the UNIX Timestamp in milliseconds format, if you will send it in seconds, it will not accept the value.
{% endhint %}

### Single Checkbox

This type of property has only 2 possible values. The only possible internal values of the property are "**true**" and "**false**" interdependently from the labels.

### Multiple Checkboxes & Selects

These types of properties are very customizable and the user can decide multiple entries with custom labels and internal values.

The important thing here is that your database value must match the **internal value** of every single option, **NOT the label**! If you will try to push an option non-present in the HubSpot property options, the request will be rejected by HubSpot and it will be logged  in logs file.


# Overview

ERP Bridge by DMA is an HubSpot App that allows users to integrate and bring to HubSpot CRM data that are on **different on-premises apps** such as ERPs, CRMs, PIMs.

Using this app, you will be able to map and sync to HubSpot data that are commonly stored, for instance, in ERPs, such as order status, payment status of the latest order, etc.

This unlock a complete new set of information that can help users that normally **use HubSpot but have no access to info of ERPs**.

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


# Registration and first login

[After purchasing a subscription to ERP Bridge](https://www.erpbridge.io/#pricing), you will enter our onboarding process. It will guide you through the account registration and your initial login to the platform.

The subsequent onboarding email will assist you in connecting your database and installing our agent on your server.

At that point, you will finally receive instructions on how to create your first synchronization operation and some of the synchronization operations that we at ERP Bridge recommend setting up to make the most of our software.

<figure><img src="/files/BodwDYn4PgGuoImOYCHC" alt=""><figcaption><p>The ERP Bridge login form</p></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?t=25s&v=S6QBV1eVon4>" %}
Account registration
{% endembed %}


# The Installation

In the following sections, you will be guided through all the steps required to create a new installation. If you find yourself stuck in a step or in trouble, you can always contact our support or watch our detailed videos ([Youtube](https://www.youtube.com/@erpbridgedma/videos)).&#x20;

Before to go deep and create a new installation step-by-step, let's explain what an installation is for us and which concepts are behind this essential element.

An "**Installation**" is identified by a specific name, it correspond directly to an agent installed inside a server machine that works to manage Hubspot objects and database records.

Every "Installation" has its own properties, the most important are:

* The name of the installation itself.
* The access to your Hubspot account via OAuth authentication.
* The frequency the software use to transfer Hubspot objects and database records.
* A list of "Operation" objects, more of that in next steps.

At any time the user can delete the "Installation" object and all its logs and properties, obviously, this action is permanent and not reversible!


# 0 - Prerequisites

ERP Bridge Technical Requirements:<br>

* **Operating System**: 64-bit system, Windows Server 2016 or higher.
* **Browser Component**: “Microsoft Edge WebView2 - Evergreen bootstrap” must be installed.
* **Agent Network Access**: The ERP Bridge agent requires the ability to make outbound HTTP calls to the following endpoints:
  * [https://api.erpbridge.io](https://api.erpbridge.io/)
  * [https://agent-erp2hubspot.s3.eu-central-1.amazonaws.com](https://agent-erp2hubspot.s3.eu-central-1.amazonaws.com/)
  * [https://3740acp04l.execute-api.eu-central-1.amazonaws.com](https://3740acp04l.execute-api.eu-central-1.amazonaws.com/)
  * [https://logs.eu-central-1.amazonaws.com](https://logs.eu-central-1.amazonaws.com/)
  * [https://cognito-idp.eu-central-1.amazonaws.com](https://cognito-idp.eu-central-1.amazonaws.com/)
  * [https://a15ipmcwfdb1yi-ats.iot.eu-central-1.amazonaws.com](https://a15ipmcwfdb1yi-ats.iot.eu-central-1.amazonaws.com/)
  * <https://erpbridge-update-data-prod.s3.eu-central-1.amazonaws.com>
  * **Firewall Note**: If a firewall is enabled, ensure access is granted to these URIs.
* **Agent File System Access**: The agent requires permission to write files to disk within the temporary folder of the user account running the service.
* **MS SQL Server Connection**: A dedicated local SQL user with username and password must be used for authentication. Windows user authentication is not supported. Only specific fixed port are currently supported.
* **Database Management Systems (DBMS) Connection**: In collaboration with your ERP specialist, identify the tables relevant to the data you wish to transfer. Create database views to aggregate and transform these records as needed before integration with ERP Bridge.
* **HubSpot Application Installation**: The HubSpot application installation requires logging in with a HubSpot user that has Super Admin permissions.


# 1 - Go to Installation wizard

In order to create a new "Installation" you have to be logged into our platform and be positioned on your administration dashboard ([https://admin.erpbridge.io](https://admin.erpbridge.io/)).

At this point you can see at the top-right of your screen a "**Create new installation**" button: click it to initiate the creation online wizard.

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

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=25s>" %}


# 2 - Name

In this step you have to choose the "Installation" name. There are no constrains, you can choose the name you prefer.\
If you are an agency, we suggest you to use your client name.

This property will be editable in the future at the end of the wizard.

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


# 3 - Hubspot Login

During this step you will choose the Hubspot account to connect the software with, basically, the Hubspot instance where the software will read/write objects when will be executed.

<mark style="color:orange;background-color:yellow;">**Note**</mark><mark style="color:orange;background-color:yellow;">: In order to connect the ERP Bridge (or any Hubspot app) to an Hubspot account, you</mark> <mark style="color:orange;background-color:yellow;"></mark><mark style="color:orange;background-color:yellow;">**MUST**</mark> <mark style="color:orange;background-color:yellow;"></mark><mark style="color:orange;background-color:yellow;">be "</mark><mark style="color:orange;background-color:yellow;">**Super Admin**</mark><mark style="color:orange;background-color:yellow;">" of that particular account.</mark>\ <mark style="color:orange;background-color:yellow;">Read</mark> [<mark style="color:orange;background-color:yellow;">this</mark>](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot) <mark style="color:orange;background-color:yellow;">(</mark>[<mark style="color:orange;background-color:yellow;">https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot</mark>](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot)<mark style="color:orange;background-color:yellow;">) Hubspot article to know more about that.</mark>

By pressing the "**Connect to Hubspot**" button you will temporary exit from our platform and you will see a list of all Hubspot instances you are administrator in. Here you have to check and choose  the instance you want connect ERP Bridge to.

After that, you will see all the permissions the software ask in order to perform all the actions needed to read and write data (depending on your tier): read all if you are interest and don't hesitate to ask to our support if you have doubts.

When finish the authentication step and came back to ERP Bridge interface, you will see the Hubspot account ID and a "Connected" green label: the precedure gone successfully!

If you encounter errors, please, contact our technical support, they will troubleshoot the problem with you and they will provide you all the instructions necessary to perform the procedure successfully.

<mark style="color:red;background-color:red;">**Attention**</mark><mark style="color:red;background-color:red;">: the account you choose here, is not editable! If you need to change the Hubspot account or you have selected the wrong one,</mark> <mark style="color:red;background-color:red;"></mark><mark style="color:red;background-color:red;">**you will need to delete and recreate the entire installation**</mark><mark style="color:red;background-color:red;">!</mark>

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

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=64s>" %}
HubSpot Login
{% endembed %}


# 4 - Sync Frequency

In this step you have to choose the frequency your data will be retrieved and write from your source to the destination.

Based on your tier, you can choose from:

* **Free Tier**: just once a week
* **Standard Tier**: from once a month to once an hour
* **Professional Tier**: from once a month to once every 15 minutes

The important thing to understand is that the sync frequency value represent the time between the start of an installation run and another.

**Let's make an example**: Let's say that you set the ERP Bridge sync frequency at 15 minutes and the installation with all its operations takes 20 minutes to be performed. This means that the installation will run every operations in sequential order and as soon as the last ends, a new run will start. That's because the sync frequency is less then the complete run's duration.

**Let' make a different example**: Let's say that you set the ERP Bridge sync frequency at 15 minutes and the installation with all its operations takes 5 minutes to be performed. This means that the installation will run every operations in sequential order, then waits for 5 minutes and then start a new run.

This property will be editable in the future at the end of the wizard.

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

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

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=90s>" %}
Sync Frequency
{% endembed %}


# 5 - Download Wizard

In this step you have to perform a critical action and a change of context, so please, pay more attention and make sure you understand what to do.

By clicking the "**Download the Wizard**" button, you will download a file: that's the **ERP Bridge Agent Wizard**.\
You need to bring that file to the server where the agent will run and perform the database connection.

When you will be logged inside the server where the agent will run with the downloaded file on the file system, you can proceed to the next step.

<figure><img src="/files/21nRBDghIf4VuIGDDlZa" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**You don't have access to the server right now?** No problem, don't go away! You can still see what's next by watching this video: [Youtube Link](https://www.youtube.com/watch?v=S6QBV1eVon4)
{% endhint %}

{% hint style="info" %}
**Do you want a real demo done by our experts?** No problem, request a **free** demo here: [https://www.erpbridge.io/get-a-free-demo](https://www.erpbridge.io/get-a-free-demo/)
{% endhint %}


# ERP Bridge Wizard - On-Premise


# 1 - Install the wizard on-premise (.msi)

Now that you are logged inside your server, you can open the installer file (.msi file) and follow the guided procedure.

<figure><img src="/files/9518V7ajt1CYWgAS8XsT" alt=""><figcaption></figcaption></figure>

This step will install on your operating system a software called "**ERP Bridge Agent Wizard**".\
This software is able to guide you during some critical steps of the installation such as database connection, table choice and start of the real service agent.

You can think the installer as the Visual Studio installer where its purpose is not just install the software but also add functionalities at post-install time and update the main software.

If you open the installer file (.msi) you will find the following very simple steps:

* **Just click "Next" button**

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

* **Choose the wizard installation path**: you can decide where the ERP Bridge Wizard files will be located. You have no constrains.

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

* **Just click "Install" button**

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

* **The installation is finished:** you can tick the "Launch ERP Bridge" flag in order to open immediately the ERP Bridge Wizard software

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

Now you have installed the ERP Bridge Wizard software.

You can find it by searching "ERPBridge" inside Windows search bar if you want to open it later.

In order to proceed to the next step, open it the ERP Bridge Wizard and continue to the next step.

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=120s>" %}
Install the wizard on-premise (.msi)
{% endembed %}


# 2 - Welcome screen

In this step you have just to press "Continue" in the bottom-right corner of the window.

After you will finish the all installation, this screen will prompt you the manual update of the agent, but for now, just click "Continue".

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


# 3 - Login

Perform the login to ERP Bridge

In this step you will find a login form, here, you need to insert you ERP Bridge account username and password, the same you enter to access the online ERP Bridge admin panel.

{% hint style="info" %}
If you don't remember the password, you can follow the "**Forgot password**" procedure here: <https://admin.erpbridge.io/auth/forgot-password>
{% endhint %}


# 4 - Select Installation

In this step you can see a list of all your installations.\
You have to select the installation you want to connect the server and the agent with.

Click on the name label to select one and the "Continue" button on the bottom-right of the window to proceed to the next step.

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


# 5 - Database

In this step you have to perform the connection to the database where there are the tables or the views where the agent will retrieve the data from.

Choose the technology of your database in order to follow the specific instructions:

<details>

<summary>Microsoft SQL Server</summary>

* **Instance Name / IP Address**: you can choose from:
  * the local IP of your database server if it's on the same network and you network policies let you reach that. You can find your local IP address going to **Windows Settings** -> **Network and Internet** -> **View your network properties** -> **IPv4 address**.
  * the database instance name if the database is on the same server of the current wizard.
  * the public IP of your database server if it's publicly or whitelist-accessible (**not recommended for security reasons**).
* **Port**: the static port used to access your database. The default port for Microsoft SQL Server is "**1433**".
* **DB Name**: the main database name used by your ERP
* **Username** & **Password**: the credentials connected to a local DB user that have read permissions to access your database

</details>

<details>

<summary>SAP Hana</summary>

* **Instance Name / IP Address**: you can choose from:
  * the local IP of your database server if it's on the same network and you network policies let you reach that. You can find your local IP address going to **Windows Settings** -> **Network and Internet** -> **View your network properties** -> **IPv4 address**.
  * the database instance name if the database is on the same server of the current wizard.
  * the public IP of your database server if it's publicly or whitelist-accessible (**not recommended for security reasons**).
* **Port**: the static port used to access your database. The default port for SAP Hana is "30015".
* **DB Name**: the main database name used by your ERP
* **Username** & **Password**: the credentials connected to a user that have right permissions to access your database

</details>

<details>

<summary>OData V4</summary>

* **Base Url**: The OData base URL with the Company you would like to sync. Currently we only support the OData V4 version.
* **URL Metadata**: OData Base URL with `/$metadata` added to the end.
* **Authorization:** we currently support only `Basic` and `OAuth2` auth method, depending on which one is set up on your ERP, choose the appropriate one:
  * **Basic Auth:**&#x20;
    * **Username:** This is the username assigned to you for accessing the system.
    * **Password:** This password accompanies your username to verify your identity.
  * **OAuth2:**
    * **Authorization URL**: This is the endpoint you access to authenticate and obtain an access token.
    * **Client ID**: This unique identifier is issued to the client application requesting access.
    * **Client Secret**: A secret known only to the client and the authorization server, used to authenticate the client.
    * **Scope**: Defines the level of access the application is requesting, which can include permissions or resources the client seeks access to.

</details>

<details>

<summary>SAP OData</summary>

* **Base Url**: The OData base URL with the Company you would like to sync. Currently we only support the OData V4 format.
* **URL Metadata**: OData Base URL with `/$metadata` added to the end.
* **Username & Password:** an account username and password that will be used to connect to the DB, the user must be have the right permissions to read/write on the DB.
* **Company DB:** Insert the Company DB name that you want to use.

</details>

<details>

<summary>I Don't Know</summary>

If you know the name of your ERP but don't know the database technology, the most of the time the vendor make public the database technology via documentation, try to contact the support or google for it.

If you don't find your ERP documentation online or you have a custom ERP, you can contact your ERP consultant asking which DBMS technology your ERP has as main database.

</details>

<details>

<summary>My DBMS is not listed</summary>

**You don't see your database technology listed?** Don't worry there is a solution, find the right tech in our "How To", **you can connect ERP Bridge to almost all databases!**

Follow this link to know how to do it: [https://howto.erpbridge.io](https://howto.erpbridge.io/)

</details>

After you fill all the form fields, you can press "**Test DB connection**" button to perform a test connection with your database.

If the result is a green light and a message with "Great, credentials are valid" message, you are good to go to the next step by clicking "Continue" button at the bottom-right of the window.

{% hint style="info" %}
**Issues during database connection?** you can visit go to the following page of the documentation in order to find out if your issue is been mapped: [Troubleshoot -> Database connection errors](broken://pages/Y9Qf7DBaTp6oedmFqT6F)
{% endhint %}

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

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

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=182s>" %}
Database
{% endembed %}


# 6 - Database Tables

In this step you will see a paginated list of all your ERP's database tables.

You have to select all the database tables you want to synchronize from/to HubSpot during the next steps.

You can modify this selection adding new tables in the future by re-doing this on-premise process, so, be careful to select all database table you might want to synchronize, but don't panic if you miss some.

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


# 7 - (Optional) User Setup

To set up the ERP Bridge agent service under a specific user, provide the following details:

* **Username**: The account name that will run the service.
* **Password**: The password for authentication.
* **Domain**: The domain to which the user account belongs.

Ensure the user account has the necessary permissions to run the service.

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


# 8 - Download the agent

In this step you can see a download button at the center of the screen.

By clicking the button the software will download the agent files and put them in a standard directory:

<details>

<summary>Micr osoft Windows (Desktop/Server)</summary>

`%appdata%\com.diemmea.erp2hubspot` . If you want to use another path, you can follow this documentation advanced guide here: Change agent location&#x20;

</details>

<details>

<summary>GNU/Linux</summary>

Coming soon a GNU/Linux version, stay tuned.

</details>

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

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

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=265s>" %}
Download Agent
{% endembed %}


# 9 - Start Agent

This is the final step before to return again on the browser left before the on-premise part.

At this point you will see possible choices:

<details>

<summary>Start the service (with default)</summary>

With this configuration the service will start with the following default configuration:

* **Service user**: Local System
* **User domain**: N/D
* **Startup type**: Automatic

</details>

<details>

<summary>Use advanced configuration</summary>

Following this additional step you will be able to choose a custom service user with a custom domain

* **Service user**: You choose
* **User domain**: You choose
* **Startup type**: Automatic

</details>

{% hint style="info" %}
If you are not sure about the user to choose, the permissions and your company internal network domain, we suggest you to go with the first default way.
{% endhint %}

After choose the service configuration, the wizard will start the service and send informations collected during the wizard process to our cloud platform.

If the starting process gone successfully you will see 3 green check-marks: in this case the next step is to return back to the browser and continue with the next documentation page ([CLICK HERE TO GO](/the-installation/back-to-the-cloud)).

If you have some issue about the starting process you can try to find your error in this documentation page "[Agent service starting errors](broken://pages/yoOtR55lej0Px4KPG5dP)" or contact the technical support using this form:  [https://www.erpbridge.io/support](https://www.erpbridge.io/support/)

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

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

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=282s>" %}


# Back to the cloud

Now that you have finished the on-premise installation, **you have completed the installation creation**, the most difficult part of the startup process!

You now can return to the cloud ERP Bridge admin dashboard and click the on the installation you previously created. As you can see it's empty because now you have to create at least one Operation, but the installation is complete.

In order to know how to create your first "Operation", continue to read the documentation "[The Operation](/the-operation)" chapter.


# The Operation

An operation represent the synchronization 1-to-1 from a single database table to a specific HubSpot object.

An operation can act in both ways, depending on your price tier.

The operation main characteristics are:

* The selected HubSpot object
* The selected database table/view
* The transcoding table
* The decision rules
* The association configuration (optional)


# 0 - Choose direction

The operation direction can be:

* From database to HubSpot
* From HubSpot to database

The first direction is available to all pricing tiers, the second one is reserved only for "Professional" tier installations.

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

{% hint style="info" %}
**Do you want to try the second direction?** Ask for a demo and a trial period via [support form](https://www.erpbridge.io/support/) (<https://www.erpbridge.io/support/>), our experts will evaluate with you the better solution for your needs
{% endhint %}


# 1 - Default settings

In this step you have to set-up 3 important operation's properties:

* The operation's name
* The database table/view
* The HubSpot object

For **the name**, there are not particular constrains, just try to choose a name more clear and intuitive as possible.

**The database tables/views** you see in the drop-down menu contains all the tables selected during the installation on-premise wizard. If you miss one or more tables, just run the installation wizard again and choose the tables you missed before.

**The HubSpot objects** you see in the menu are all the objects retrieved via API. If you don't see a particular object, contact our support, we will try to understand with you which eventual permission is missing.

The custom HubSpot objects are reserved to "Standard" and "Business" pricing tiers.

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=312s>" %}
Default settings
{% endembed %}

{% hint style="info" %}
**Do you want to try the sync with custom objects?** Ask for a demo and a trial period via [support form](https://www.erpbridge.io/support/) (<https://www.erpbridge.io/support/>), our experts will evaluate with you the better solution for your needs
{% endhint %}


# 2 - \[HS -> DB] Filters

This step is only for **\[HS -> DB]** operations

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

This step aims to filter HubSpot data at operation start-time in order to optimize the run performance and avoid the HubSpot maximum search result limit of 10k objects.

The filters system reflect as-is the HubSpot Search API filters system. Using this page you can set AND and OR filters, but with some limitation:

* The maximum number of AND filters per single group is: 6
* The maximum number of OR filter groups are: 5
* The maximum number of results is: 10.000 (10k)

These limits are HubSpot hard-limits and, unfortunately, they are not avoidable in any way.


# 2 - Database Mapping

This step let you build a translation layer that permit the agent to properly retrieve data from a source and send it to the destination without the need to use the exact same database columns and HubSpot properties names.

Every row can be enabled/disabled using the toggle at the start of the row. When the toggle is OFF, the specific property or database column will be ignored when the data will be sent to the destination.

The central and core drop-down menus representing the database column and the HubSpot object property.

<mark style="color:orange;background-color:orange;">**IMPORTANT**</mark>: In case of HubSpot Drop-Down property make sure every internal value share the same value of the database data or it will return an error when the software will try to send data to HubSpot. For instance: if you have a drop-down property with values "lorem", "ipsum", "dolor" but in the database you have a different value or the same value but with different cases (like "Lorem"), the software will not save/update that record on HubSpot at all.

**\[Only for Database -> HubSpot operations] :** At the end of the row, is present a file checkbox. If it's checked the database column selected the software will read the data (file path or blob), upload the  file to HubSpot media and associate the media as attachment to the created/updated object.\
When the checkbox is checked, the HubSpot property is automatically disabled.

<figure><img src="/files/8iOkznW4xQOEZoqXYclp" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=327s>" %}
Database Mapping
{% endembed %}


# 3 - Decision Rules

In this step you can program the logic behind the decisions made for each record.\
The system is basically a list of if-then conditions based of how many records or object are found in the destination data after searching for a specific property/column.

{% hint style="info" %}
Let's explore a simple example with just 1 decision rule: [**CLICK HERE!**](/the-operation/3-decision-rules/example-with-1-decision-rule)
{% endhint %}

When there are more than one decisions, it's important to set the right "**Decision Algorithm**", this setting let you choose from 2 options:

### Decision Algorithm

* **Funnel**: the decision rule will filter the results already filtered from the decision rule before.
* **Isolate**: the decision rule will always filter the results from the total, discarding every prior filter and evaluating every rule as separated/isolated.

{% hint style="info" %}
Let's explore a simple example with just 2 decision rules and the decision algorithm set on "Funnel": [**CLICK HERE!**](/the-operation/3-decision-rules/example-with-2-decision-rules)**Let's do another example**:
{% endhint %}

### The difference between NEXT and STOP

When you have just one decision rule, there is no difference between one and other.

When you have more than one decision rule, the NEXT rule will skip the current decision rule and bring the software to the next decision, so if we say that we are on the first rule of three, the NEXT rule will skip the current decision and jump to the second rule. With the STOP rule the software will skip all the rules for the current record and will go to the next record starting again from the first rule.

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=350s>" %}
Decision Rules
{% endembed %}


# Example with 1 decision rule

Let's say that you are creating a **Database -> HubSpot** and you have companies store in the following table and want to send this data to HubSpot Companies using the name as key to know if the current company in the database is already present in HubSpot:

| ID   | Name     | City  |
| ---- | -------- | ----- |
| 1234 | Acme Ltd | Milan |

We can build our decision rule like this:

IF \[ **Company Name** ]\
\= 0: **ADD**\
\= 1: **UPDATE**\
\> 1: **STOP**

This decision rule can be read as:\
If you search in HubSpot for "Company Name" equals to "Acme Ltd." and you **find 0 results**, then add the record as new object using the "Database mapping" as translation layer. If you find **exactly 1 result**, update it. If you find **more than 1 results**, skip this record and go to the next.

You can concatenate more than one decision rules, they will be evaluated in cascade using the "NEXT" decision to jump from one decision rule to the next one.


# Example with 2 decision rules

Let's say that you are creating a **Database -> HubSpot** and you have companies store in the following table and want to send this data to HubSpot Companies. Our database store companies with same ID and same name for each subsidiary but with different "City".

| ID   | Name     | City  |
| ---- | -------- | ----- |
| 1234 | Acme Ltd | Milan |
| 1234 | Acme Ltd | Rome  |

Let's say that on HubSpot we already have the current data:

| ID   | Name     | City  |
| ---- | -------- | ----- |
| 1234 | Acme Ltd | Milan |

We can build our decision rules like this:

IF \[ **Company Name** ]\
\= 0: **ADD**\
\= 1: **NEXT**\
\> 1: **NEXT**

IF \[ **City** ]\
\= 0: **ADD**\
\= 1: **UPDATE**\
\> 1: **STOP**

And choosing as **Decision Algorithm** the "**Funnel**" option.

The cases for each of the 2 records on database will be:

* *For the first record*: The first IF will trigger the "= 1" rule and the second the "=1" rule and it will result in an UPDATE decision.
* *For  the second record*: The first IF will trigger the "= 1" as well, but the second will trigger the "= 0" rule and it will result in an ADD decision.


# 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) step using the rules configured in [Decision Rules](/the-operation/3-decision-rules) 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>


# Start to Synchronize

In order to start to synchronize objects, you must have already created successfully an installation with at least an operation.

If you match this situation you will also notice that the installation is in "**Pending**" state in the dashboard and if you read the logs that already started to come from the agent, you see a log that say:

```
[WARN] The installation is in "PENDING" state, the agent will wait for a different state 
```

So, in order to start the synchronization you have to enter in the installation page and click the button "**Sync now**" in the top-right corner, the button highlighted in red in the screenshot below.

<figure><img src="/files/3K0qhUHoCcWRVf9vbUaC" alt="" width="563"><figcaption><p>A screenshot of the installation page with "Sync now" button highlighted</p></figcaption></figure>

After successfully clicked the button, the agent installed in the server will start to run operation-by-operation after few seconds. To check the agent behavior and the operations progress, you can read the installation's logs updated almost in real-time.


# Uninstall

You may refer to [HubSpot guidelines](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot#uninstall-an-app) to uninstall the app from your account.

You may want to consider to kill all process, beside.

#### Windows <a href="#unistall-windows" id="unistall-windows"></a>

**Delete application:**

Search in the search bar for *Add or remove programs*, look for the **ERPBridge** app, click on the result found and press *Uninstall*.

**Delete service:**

Search in the search bar for *Services* and click on *Run as administrator*. Search for **ErpBridge Agent Service**, right-click on the following line and press **Stop**. The system will now display a warning dialogue indicating that the service has been stopped unexpectedly.

Now, to permanently delete the service, go back to the search bar of your computer and search for *Command Prompt* and select *Run as administrator*. Write the following line of code and press *enter*:

`sc delete "ErpBridge Agent Service"`

If you go back into the services application, right-click and select *Refresh* you will no longer see the **ErpBridge Agent Service**.

Open the file explorer and go to the following path: `%appdata%`

Delete the directory **com.diemmea.erp2hubspot**


# Change ERP Bridge Agent path

{% hint style="info" %}
**NOTE**: This is an advanced topic and during the following article we will assume the reader already has familiarity with CLI commands and operating system services management.&#x20;
{% endhint %}

In order to change the ERP Bridge agent path you need first to stop the agent service.

Depending on your operating system you can follow one of the following guide accordingly.

### Microsoft Windows

Go to the start menu and searching "Services" open the first result.

Now you have to find a service called "**ERP Bridge Agent Service**". It's possible depending of your current software version that the service name contains also an UUID corresponding with your installation ID.

Now, you have to stop the service by selecting the service and press "Stop" on the left window panel.

Now you have stopped the service you can edit the service executable path, but unfortunately, not using the GUI.

Open the CMD or the Powershell and execute the following command:

```
sc config <service name> binPath= <binary path>
```

The executable to select and use in this command is named "erp2hubspot.exe" and it's in the root of the agent directory.

So, if the service name is "ERP Bridge Agent Service" and your path to the executable file is "C:\example\erpbridge\erp2hubspot.exe", the command will be:

```
sc config "ERP Bridge Agent Service" binPath= C:\example\erpbridge\erp2hubspot.exe
```

If the command completed successfully, you can start the service again using the services window used before to stop but pressing the "Start" button instead.

You can also check the updated service path by reading the service properties after a reload of the services' window.

### GNU/Linux

Coming soon...


# ERP Bridge Agent Logs

The ERPBridge agent logs are essential for troubleshooting and monitoring the performance of the ERPBridge service. Depending on your Windows Server version and the configuration of the service, these logs can be found in different locations. Below are the potential directories where you can locate these logs:

1. **If the ERP Bridge service is running on Local System:**

   * Depending on your Windows Server version, the logs can generally be found in:
     * `C:\Windows\Temp\erpbridge\logs`
     * `C:\Windows\SystemTemp\erpbridge\logs`

2. **If the ERP Bridge service is running under a specified user:**

   * If you are using a typical system configuration, the logs can generally be found in:
     * `C:\User\{user}\AppData\Local\Temp\erpbridge\logs`

   **Replace** `{user}` **with the Windows user specified during the agent installation process**

These logs can provide valuable insight into the operation of the ERPBridge service, including errors, warnings, and other informational messages. Regularly checking these logs can help in identifying issues early and ensuring the smooth functioning of the service.

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

#### Log Maintenance

Currently, the logs are stored on a daily basis and the agent does not automatically delete them. It is recommended to implement a routine for log maintenance to avoid storage issues.


# On-Premise wizard errors

### Code 32

```
{ code: 32, kind: Uncategorized, message: "The file is used by another process" }
```

If you encounter this error, you are probably manulally updating the agent via the wizard. In order to solve the issue, you need to:

* Navigate to the Microsoft Windows Services utility
* Search for the ERP Bridge Agent service
* Stop it right-clicking on it and pressing on "Stop"
* Waiting until it's stopped
* Retry the operation in the wizard

If you are still unable to proceed to the next step, please check your anti-malware software or, if you can, reboot the OS. &#x20;


# Handling empty fields

How empty HubSpot field (HubSpot field with no value) are handled in the sync?

HubSpot fields with no value, are inserted as `null`, in database table.


# 1. Product Access Control

A subset of ERP Bridge’s personnel has access to the products and to customer data via controlled interfaces. The intent of providing access to a subset of personnel is to provide effective customer support, troubleshoot potential problems, detect and respond to security incidents, and implement data security.\
\
Customer data is intended as:

* preferences and settings of Installations;
* preferences and settings of Operations;
* names of columns of on premises’ selected software tables;
* names of views of on premises’ selected software databases;
* names of selected HubSpot objects;
* names of selected HubSpot properties;
* HubSpot portal ID;
* HubSpot OAuth token.

\
ERP Bridge’s personnel will not and will never have access to:

* on-premises database data;
* any information of HubSpot account beside the ones stated above;

\
For data transfer policy from on premise application to HubSpot, please do refer to HubSpot data transfer policy directly ([link](https://legal.hubspot.com/privacy-policy#:~:text=HubSpot%20is%20a%20business%2C%20and,disclosure%20of%20such%20Personal%20Information.) - [link](https://developers.hubspot.com/legal/developer-policy)).<br>


# 2. Rate Limit

ERP Bridge software has to respect the standard HubSpot API Rate limit for public applications ([link](https://developers.hubspot.com/docs/api/usage-details)).

That means roughly 1 database record synchronized with HubSpot every 700-800ms because for each every single database record, the software call HubSpot multiple times to perform the appropriated checks before to push the update or the add request.

The time may vary based on your connection speed and hardware limitations.


# 3. Authentication Resources

* OAuth authentication to ERP Bridge in on premise installer;
* OAuth authentication to HubSpot in ERP Bridge web application.


# 4. Encryption

### HubSpot and ERP Bridge API

The connection between the ERP Bridge agent and HubSpot API is secured by using an encrypted HTTPS connection with a trusted SSL certificate.

The same thing is valid for the connection between the ERP Bridge agent and the ERP Bridge API hosted by us.

Both the connections are secured by trusted certificates that maintain data encrypted using AES 256-bit encryption.

### Database connection

The connection between the customer database and the ERP Bridge agent is performed using official supported and first party libraries.

The ERP Bridge software support both encrypted and unencrypted connections with the database so it's up to the customer to setup and use one or another.

### Data Storage

We do not store your data. ERP Bridge is not a middle layer. It provides direct sync between your ERP and HubSpot.

We just retained your logs for 3 days for support pourposes.

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


# 5. Change Management

* Continuous integration and delivery: we use GitHub for our Continuous Integration tooling.
* Robust unit testing.
* Integration tests.
* An updater of the on premise wizard and agent, guarantees that any further release of the Installer software, will be automatically applied to remote servers where the software is installed into.


# 6. Cloud Security

ERP Bridge utilizes Amazon Web Services (AWS) as its cloud service provider and leverages AWS' security and compliance controls for data center physical security and cloud infrastructure. Further resources for this service provider can be found on the [AWS Security Cloud](https://aws.amazon.com/security/) website.


# 7. Security certification

ERP Bridge utilizes EV Certificate to guarantee that the piece of softwares (installer, agent and updater) installed on Microsoft Windows servers are compliant to security measurements required by Microsoft.


# 8. Availability

ERP Bridge maintains a [Status page](https://statuspage.freshping.io/63899-ERPBridge).


# 9. Logging

ERP Bridge maintains a comprehensive log of all user and Bridge activities. Bridges activities are extensively logged internally for troubleshooting and support, and presented in summary in ERP Bridge History to inform users directly.\
\
ERP Bridge adopts Bugsnag for bug tracking and stack trace logging.No user data is stored in this log.


# 10. Installer Desktop

The installer is a desktop application that allows you to download the agent, from an AWS S3 bucket, that will communicate with HubSpot. At start-up, it is run as an administrator and presents a Wizard which takes care of:

* setting up the agent among the Windows System Services;
* obtaining table names, table column names and their dataType which are selected by the user by entering the connection parameters;
* retrieve user installations via an authenticated HTTP GET request.

\
Finally, it executes a Bearer Token-authenticated HTTP POST request to the ERP Bridge API to send the schema for the database tables that the user has selected. Authentication to ERP Bridge takes place via the AWS Cognito service.


# 11. Server Agent

The agent installed by the “ERP Bridge Installer” it’s executed by the operating system as a service bind with the OS user selected during the installation and it has the same level of permissions.\
\
The software executes the connection with the ERP database using OIDC drivers accordingly with the DBMS technology selected during the installation wizard.<br>

![HOW ERP Bridge Server Agent works](https://www.erpbridge.io/images/HOW-ERP-Bridge-Server-Agent-works-Security.png)

\
The agent send data to our “ERP Bridge” cloud API only for the following specific cases:

* retrieve and refresh of HubSpot API auth token;
* refresh of “ERP Bridge” API auth token;
* retrieve the transcoding informations;
* check of the last run to match the installation scheduler settings;
* update of the last run’s timestamp;
* send logs and telemetry.

\
The sensitive information retrieved from the ERP database are sent directly to HubSpot using their HTTP REST API without sending a single customer data piece of information to the “ERP Bridge” cloud API. The same thing is true for files, they are uploaded directly to HubSpot using the HubSpot “Files API”.\
\
Logs and telemetry information sent to the “ERP Bridge” cloud are free of sensitive customer data but maintain useful information about crashes, HubSpot API errors, malformed data and more.\
\
The logs are stored using AWS CloudWatch service and it is configured with a retention of 2 weeks independently of the schedule set, in this manner the user can be sure that nobody will have access to the logs after that short period of time.<br>


