# Integration Best Practices

In addition to checking the below, please review the [integration check list](/best-practice-guides/integration-check-list.md).

### 1. CRM synchronizations (leads / contacts / companies / accounts)

* Mapping **contacts** - ideally via email, as it is unique
* Mapping **companies** and accounts - ideally via VAT ID or trade registration numbers; alternatively name and country combination, however, this is error-prone
* How to deal with **duplicates** in two systems? Either merge and take one of the two as the leading entity or ignore records and send an email

### 2. Sales Funnel synchronizations&#x20;

Objects: deals / opportunities / orders / invoicing / configure price quote (CPQ)

* **CPQ** - multiple line items per invoice
* Mapping **product ids** ideally based on a common number
* **Currency** - Either use currency symbols or ideally unique three letter-codes (EUR, USD, …)
* **Discounts** - ideally in both systems as a percentage or integer number, being a percentage; mixed spellings need a mapping table (Env Variables)&#x20;
* **Tax rates** - ideally in both systems as a percentage or integer number, being a percentage; mixed spellings need a mapping table (Env Variables)

### 3. Advertising systems

(e.g. Facebook, Google Ads, ... )

* Classical **object hierarchy**: Advertisers > Campaigns > Line Items  > Creatives - Ideally systems have `external_id` fields in order to store your internal IDs there for later reference.
* **Audiences** - Usually IDFA, AAID, cookies, or similar internal identifier

### Considerations for real-time sync vs. daily (scheduled)

* For **real-time** syncs, either webhooks ([Webhook Helper](/connectors/helpers/webhook-helper.md) or [Webhook Trigger for Connector](/connectors/webhook-trigger-for-connectors.md)) need to be available on both systems, informing the other system that something changed, or a scheduler needs to be run every five minutes and be able to only check for recently updated records, and no one should have worked in the other system in parallel.
* If the before mentioned options are not available, e.g., due to an old system that doesn’t have updated timestamps nor webhooks, a leading system should be determined and ideally, synchronizations should happen less frequently e.g. daily and scheduled (using the [Schedule Helper](/connectors/helpers/scheduler-helper.md)), and all data entry and updates should be done in the leading system.


---

# 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://docs.locoia.com/best-practice-guides/integration-best-practices-and-considerations-before-starting.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.
