The ERP integration is the one every growing company eventually asks for, and the one most likely to go wrong in a way nobody notices for months. On day one it looks like a mapping exercise: this field in HubSpot goes to that field in the ERP. Six months later, the sales team has stopped trusting the customer records, finance has two versions of every invoice total, and a nightly job is quietly overwriting corrections someone made by hand. Nothing crashed. The architecture was simply never decided.
An ERP integration is not a field mapping, it is a set of ownership decisions, and the mapping is the last step. In this guide, I will go through the decisions in the order they need to be made: which system owns each kind of data, how records are matched so nothing duplicates, how picklists are translated, when the sync should be real-time and when it should be a batch, and what to do with the records that fail. These patterns are the same whether the ERP is NetSuite, SAP, Dynamics, Sage or a billing system, because the problems are the same.
Part of the guide: HubSpot implementation: the guide and checklist
Decide the system of record per domain, not per integration
The first decision is the one teams skip because it feels obvious: for each kind of data, which system is the source of truth? The common and sensible split is that HubSpot owns leads, contacts, companies as commercial entities, and deals through the sales process, while the ERP owns customers as billing entities, products and price lists, orders, invoices and payments. The rule of thumb that resolves most arguments is to ask who edits the data day to day. The team that edits it is the team whose system should own it.
Ownership has to be decided per domain, and sometimes per field, not once for the whole integration. A company record can have commercial fields HubSpot owns and billing fields the ERP owns, living on the same object. Writing that down, field by field, before any code is what prevents the tug-of-war where two systems keep overwriting each other and the value depends on which sync ran last.
One direction per domain
Once ownership is decided, direction follows from it. Data flows from the owner to the other system, and the other system treats it as read-only. Deals won in HubSpot flow to the ERP to become orders; invoices and payment status flow from the ERP back to HubSpot so sales and support can see them. A field should have one direction. Two-way sync on the same field is where the loops come from, and it should be the rare, deliberate exception, never the default.
HubSpot's native data sync is worth checking before you build anything, because it implements exactly this: you choose the direction per object, and a conflict resolution setting decides which app wins when values diverge. The NetSuite data sync app, for instance, is available across HubSpot plans, with custom field mappings requiring a paid Data Hub tier. If your ERP has a native data sync app and your rules fit mapping and filtering, you may not need a custom integration at all. The choice between a native connector, middleware and a custom API build is the same one you face when integrating HubSpot with external tools of any kind, and the ERP is just the case where a wrong choice costs the most.
Match records with a unique id property, then upsert
Duplicates are the most visible failure of an ERP integration, and they come from matching by name. Names differ by a space or an accent, companies have subsidiaries, and people change email. The durable way to match is a stable identifier: the ERP customer id stored in HubSpot as a property flagged as a unique identifier, created with hasUniqueValue set to true. HubSpot already treats email as the unique key for contacts and name or domain for companies, so for many cases you combine the native key with the ERP id.
With the unique property in place, writes become upserts instead of a fragile search-then-create dance. The CRM batch upsert, with idProperty pointing at your ERP id property, creates the record if it does not exist and updates it if it does, in one call, up to one hundred records per batch. That is the structural defense against duplicates, and it also makes reconciliation possible, because every record on both sides carries the same key you can cross-check.
POST /crm/v3/objects/companies/batch/upsert { "inputs": [ { "idProperty": "erp_customer_id", "id": "C-10482", "properties": { "name": "Acme Ltda", "erp_payment_terms": "30 days" } } ] }
Translate picklists with a value map
Every ERP and every CRM has its own enumerations: payment terms, industry codes, currencies, statuses. They almost never match, and silently mapping one to another by label is how an integration starts writing wrong values. Build an explicit value map per picklist you sync, and decide in advance what happens to a value that has no match: reject the record into the error queue, map it to a default, or create the option. Whatever you choose, make it deliberate and logged, never implicit.
Dates deserve the same care, especially around revenue. A deal close date, a revenue start date and a revenue end date are three different things, and collapsing them into one field is how a renewal shows up in the wrong quarter. Keep them as separate fields and map each to its own counterpart in the ERP.
Real-time for events, batch for reconciliation
The question of real-time versus batch has a clean answer when you split it by purpose. Events that someone is waiting on should be real-time: a deal closed-won that needs to become an order, a payment received that unblocks delivery. Those flow through HubSpot webhooks or the automation triggers, so the other system reacts within seconds. Reconciliation should be a batch: a nightly job that compares the two systems on the shared key and heals the differences, including anything an event missed. That job depends on reading and syncing CRM data through the HubSpot API without skipping records, otherwise it reports differences that do not exist.
Both are needed. A real-time-only integration loses events during an outage and never notices. A batch-only integration makes sales wait until tomorrow for an order number. Real-time for the moments that matter and a scheduled reconciliation that keeps the two systems honest is the shape that survives production. And when you backfill history, limit the window, typically twelve to twenty-four months, instead of migrating a decade of orders nobody will open.
A tip from someone who has been burned: write down the owner of every field before you map a single one, and make the person who owns each domain sign off on it. The integrations that break are not the ones with a code bug; they are the ones where two teams quietly believed they owned the same field. Five minutes with a spreadsheet of owners saves months of oscillating data.
An error queue, because records will fail
Some records will not sync: a company with no email and no domain, a picklist value with no map, an ERP record that fails validation. Native connectors often skip those silently, which is the worst outcome, because the operation believes the systems are aligned when they are not. Your integration needs an error queue: failed records parked with the reason attached, an alert when the queue grows, and a way to reprocess once the data is fixed.
Treat the queue as a product, not a log. Someone owns it, it is reviewed on a cadence, and the common reasons feed back into the value maps and the data quality rules upstream. An integration with a visible, owned error queue degrades gracefully. One without it degrades invisibly.
Why this matters for your operation
A well-designed ERP integration is what lets sales quote from real prices, support see whether an invoice was paid, and finance trust that the pipeline in HubSpot matches the orders in the ledger. Each of those depends on the data flowing the right way between two systems that were never built to talk. When the ownership is clear and the matching is by key, the integration becomes invisible, which is the highest compliment an integration can receive.
When it is improvised, it becomes a recurring source of doubt. Every number has to be checked against the other system before anyone acts on it, which quietly doubles the work the integration was supposed to remove. The patterns here, ownership, direction, unique ids, value maps, real-time plus reconciliation, an error queue, are not advanced engineering. They are the decisions that have to be made, and making them first is what separates the integrations that last from the ones that get rebuilt.
In practice: the customer record that changed every night
A company integrated HubSpot and its ERP two-way on the company object without deciding who owned which field. A rep would correct a company's trade name in HubSpot in the afternoon, the nightly sync would push it to the ERP, the ERP's own rule would normalize it back to the legal name, and the next sync would overwrite the rep's correction in HubSpot. The name oscillated every night, and the team concluded that the integration could not be trusted.
The fix was architectural. The trade name became HubSpot's field and the legal name became the ERP's, each flowing in one direction to a separate property on the other side, matched by the ERP customer id stored as a unique property. The oscillation stopped the same night. Nothing about the sync technology changed. The only thing that changed was that every field finally had one owner.
Checklist for a HubSpot to ERP integration
- Is the system of record decided per domain, and per field where the same object spans both?
- Does each field flow in one direction, with two-way sync as a deliberate exception?
- Did you check whether a native data sync app covers the ERP before building custom?
- Are records matched by a unique id property and written with batch upsert on idProperty?
- Is there an explicit value map per picklist, with a decided rule for unmatched values?
- Do events flow in real time and does a scheduled reconciliation heal the gaps?
- Is there an owned error queue with alerts and a reprocessing path?
Frequently asked questions
Which system should own customer data, HubSpot or the ERP?
Split it by domain. HubSpot typically owns leads, contacts, companies as commercial entities and deals; the ERP owns billing customers, products, orders, invoices and payments. The team that edits a field day to day is the one whose system should own it.
How do I stop duplicates between HubSpot and the ERP?
Store the ERP id in HubSpot as a property flagged as a unique identifier, and write with batch upsert using idProperty, so each record is updated if it exists and created only if it does not. Never match by name alone.
Should the integration be real-time or batch?
Both, by purpose. Real-time through webhooks for events someone is waiting on, such as a closed deal becoming an order, and a scheduled batch reconciliation that compares both systems on the shared key and fixes what an event missed.
Do I need a custom integration or does a native connector work?
Check the native data sync first. If your ERP has a data sync app and your rules fit field mapping, filters and conflict resolution, it may be enough. Custom integration earns its cost when the rules are more complex than mapping or the volume is high.
What happens to picklist values that do not exist on the other side?
Decide it in advance with a value map: reject the record to the error queue, map to a default, or create the option. The failure mode to avoid is an implicit label match that writes wrong values without anyone noticing.
How much history should I migrate?
Usually twelve to twenty-four months. Migrating years of orders nobody will open adds volume and risk without adding value. Keep the older history in the ERP where it already lives.
Let's talk? Connecting HubSpot to your ERP and want it to work without duplicates or data fights? At Insight Sales we design the integration architecture and stand it up. Talk to our team and find out how we can help.