HubSpot ↔ Priority ERP
When a HubSpot deal is won, Priority gets the order — line by line.
If you sell in HubSpot and run operations in Priority, the hand-off is usually a person copying a won deal, line by line, into a sales order. The two systems describe the same deal differently: HubSpot in pipelines, stage IDs and line items; Priority in forms, subforms and customer numbers. PartnerMCP translates between them — it finds each pipeline’s won stage from HubSpot’s pipeline metadata, turns line items into order lines Priority can price and tax, and puts delivery and invoice status back on the deal, where the account team works.
You
“When a HubSpot deal is won, create the customer and sales order in Priority ERP with its line items, and show delivery and invoice status on the deal.”
PartnerMCP· I will:
- Subscribe to deal.
propertyChange for dealstage and read every pipeline’s stages, so a move into a closed stage with probability 1.0 is the trigger — whatever that stage is called. - Look the company up in Priority by the customer number stored on it; failing that, by VAT number or website. A name-only match waits for your confirmation.
- Create or update the customer in CUSTOMERS — name to CUSTDES, domain to HOSTNAME — and store CUSTNAME on the company as a unique-identifier property.
- Read the deal’s own line items through its associations and create the sales order in ORDERS: each product’s hs_
sku as PARTNAME, quantity as TQUANT. - Let Priority price and tax the order, compare DISPRICE with the deal amount and send any difference to review.
- Follow shipments (DOCUMENTS_
D) with $since polling and invoices (AINVOICES) with filtered reads by customer — or BPM webhooks where the Webhooks module is installed. - Write the Priority order number, delivery status and final invoice number to deal properties your team can report on.
- Budget HubSpot calls within your app’s 10-second limits and Priority calls within its per-user limit; retry only rate-limit and server errors.
- Deal · Closed Won — HubSpot: Trigger · webhooks
- Customer lookup — PartnerMCP: companies ⇄ CUSTOMERS
- Schema mapping — PartnerMCP: fields · products · prices
- Create / update customer — Priority ERP: CUSTOMERS
- Create sales order — Priority ERP: ORDERS + ORDERITEMS_SUBFORM
- Monitor order — PartnerMCP: status · delivery · invoice
- Sync fulfillment — Priority ERP: DOCUMENTS_D
- Sync invoice status — Priority ERP: AINVOICES
- Update Deal — HubSpot: fulfillment · invoice status
What syncs, and which way.
Every record that moves between HubSpot and Priority: what starts it, and what it produces on the other side.
HubSpot to Priority ERP:
Deal → ORDERS + ORDERITEMS_SUBFORM- When
- deal.
propertyChange on dealstage, into a won stage - Result
- A sales order in Draft with one line per HubSpot line item; ORDNAME saved on the deal.
HubSpot to Priority ERP:
Company → CUSTOMERS- When
- First won deal for a company without a Priority customer number
- Result
- Customer created with CUSTDES and HOSTNAME; CUSTNAME stored on the company.
Priority ERP to HubSpot:
LOGPART → products- When
- Scheduled sync of active parts
- Result
- HubSpot products carry the Priority part number in hs_
sku, so every line item resolves to a real PARTNAME.
Priority ERP to HubSpot:
DOCUMENTS_D → Deal- When
- $since on Customer Shipments, or a BPM webhook on shipment status
- Result
- Delivery status and shipment number (DOCNO) on the deal.
Priority ERP to HubSpot:
AINVOICES → Deal- When
- Invoice finalized in Priority
- Result
- Final invoice number on the deal — temporary T-numbers are never written.
It maps meaning, not names.
Every mapping PartnerMCP proposes, with its transformation and confidence. Rules — keys, reconciliation, duplicate guards — carry no confidence: they’re decided and approved, not inferred.
HubSpot Priority· CUSTOMERS
Why not the look-alike
Not CUSTNAME, which is Priority’s customer number.
Where the key goes
A unique-identifier property, so later runs read companies by it (idProperty) instead of searching.
companies.name maps to CUSTOMERS.CUSTDES, not to CUSTOMERS.CUSTNAME. CUSTOMERS.CUSTNAME is written back to companies.priority_customer_no (custom) as the key.
companies.
name to CUSTOMERS.
CUSTDES CUSTOMERS.CUSTNAMERejected
Trim to the column’s length, read from metadata
97% confidenceNot CUSTNAME, which is Priority’s customer number.CUSTOMERS.
CUSTNAME to companies.
priority_ customer_ no (custom) Written back after create
95% confidenceA unique-identifier property, so later runs read companies by it (idProperty) instead of searching.companies.
domain to CUSTOMERS.
HOSTNAME Domain → website address
88% confidenceHubSpot treats the domain as a company’s primary unique identifier; Priority keeps the website in HOSTNAME.companies.
phone to CUSTOMERS.
PHONE Normalized format
94% confidencecompanies.
tax_ id (custom) to CUSTOMERS.
VATNUM Digits only; zero-padded to 9
70% confidenceVerify on tenantNeeded before an Israeli invoice can get an allocation number.products.
hs_ sku (via line_ items. hs_ product_ id) to ORDERITEMS_
SUBFORM. PARTNAME Must exist in LOGPART
94% confidenceline_
items. quantity to ORDERITEMS_
SUBFORM. TQUANT Decimal point; unit from TUNITNAME
97% confidenceline_
items. price to ORDERITEMS_
SUBFORM. PRICE Sent only when HubSpot owns pricing
84% confidenceLeave it out and Priority prices the line from the customer’s price list.deals.
closedate to ORDERS.
CURDATE Date → DateTimeOffset in the company’s time zone
90% confidencedeals.
amount to ORDERS.
DISPRICE — reconciled, not written Compared after Priority prices and taxes the lines
RulePriority computes DISPRICE, VAT and TOTPRICE itself.deals.
hs_ object_ id to ORDERS.
XXXX_ HSDEALID (custom column) Looked up before every create
RuleThe duplicate guard: HubSpot can deliver the same event more than once.ORDERS.
ORDNAME · ORDSTATUSDES to deals.
priority_ order_ no · priority_ order_ status (custom) On create and on every status change
96% confidence
Edge cases, handled.
What goes wrong between HubSpot and Priority in production, and what PartnerMCP does about it.
- 01
Won is a stage ID, not a label
HubSpot stores dealstage as an internal ID, and the IDs differ from pipeline to pipeline. PartnerMCP reads the pipelines API, treats closed stages with probability 1.0 as won and re-reads the definitions on a schedule — renaming a stage or adding a pipeline doesn’t break the trigger.
- 02
Events can repeat
HubSpot may retry a webhook up to 10 times over 24 hours and doesn’t promise ordering. PartnerMCP checks the deal ID stored on Priority orders before it creates one, so a repeated “won” event never becomes a second order.
- 03
A line item has exactly one parent
In HubSpot, a line item belongs to one deal, quote, invoice, payment link or subscription. If your final price lives on a quote, the quote’s lines are not the deal’s lines. PartnerMCP asks which set the order comes from and reads it through its associations.
- 04
Two systems, two customer keys
HubSpot recognizes companies by domain; Priority by CUSTNAME. PartnerMCP keeps Priority’s customer number on the company and checks the VAT number before it creates a customer, so two HubSpot companies for one legal entity don’t become two Priority customers.
- 05
Priority prices, the deal shows it
When Priority owns pricing, line prices come from the customer’s price list and PRSOURCENAME records where each price came from. The deal shows Priority’s DISPRICE once the order exists, and a gap with the deal amount goes to review instead of being papered over.
- 06
HubSpot’s app model is changing
Legacy private-app creation is closed to new HubSpot accounts and, from 26 October 2026, to existing ones; HubSpot’s v1–v3 APIs become unsupported in September 2027. PartnerMCP connects through OAuth or a Projects-based app and uses HubSpot’s date-based API versions.
- 07
Priority’s fair-use limits
Priority Cloud allows 100 API calls per minute per user, up to 15 at once, and every insert or update is a metered API transaction. PartnerMCP queues end-of-quarter surges, pages its reads and skips writes that wouldn’t change anything.
- 08
Allocation numbers start with the customer record
Israeli B2B tax invoices above the Tax Authority’s minimum, issued to licensed dealers, need an allocation number, which Priority requests for final invoices. PartnerMCP checks the company’s VAT number when the customer is created — not when an invoice is refused.
Questions about HubSpot and Priority.
Does this work with HubSpot’s MCP server?
HubSpot’s remote MCP server, generally available since April 2026, lets an assistant read and update CRM records within a user’s permissions. A deal-to-order flow needs webhooks, retries and idempotent writes, so PartnerMCP runs it on HubSpot’s CRM APIs — and can use the MCP server where conversational access is what you want.
Which HubSpot properties does PartnerMCP add?
Only the ones you approve in the plan — typically a unique-identifier property for the Priority customer number on companies, and order number, delivery status and invoice number on deals.
Do we need Priority’s Webhooks module?
No. $since polling on Priority’s documents needs no extra module. With the Webhooks module, a BPM rule can also tell PartnerMCP the moment a shipment’s status changes; PartnerMCP still reconciles with $since, because Priority doesn’t document webhook retries or ordering.
What happens if a won deal changes later?
Nothing changes silently. PartnerMCP shows the difference — a new line item, a different quantity — and applies it within your rules: lines whose part changed are deleted and re-inserted, because Priority keeps the part on a saved line, and orders past your cut-off status go to review.
Can Priority stay on-premises?
Yes. The Edge Agent is designed to sit inside your network and connect out to PartnerMCP over HTTPS, so Priority needs no public endpoint and no inbound firewall rule. On Priority Cloud, PartnerMCP connects to your tenant directly over HTTPS.
Vendor documentation.
The public documentation behind the technical details on this page.
- HubSpot — deals API guidedevelopers.hubspot.com (opens the vendor’s site in a new tab)
- HubSpot — pipelines API guidedevelopers.hubspot.com (opens the vendor’s site in a new tab)
- HubSpot — line items API guidedevelopers.hubspot.com (opens the vendor’s site in a new tab)
- HubSpot — companies API guidedevelopers.hubspot.com (opens the vendor’s site in a new tab)
- HubSpot — webhooksdevelopers.hubspot.com (opens the vendor’s site in a new tab)
- HubSpot — legacy APIs and apps: what goes unsupported and whendevelopers.hubspot.com (opens the vendor’s site in a new tab)
- Priority REST API — introduction, licensing and fair useprioritysoftware.github.io (opens the vendor’s site in a new tab)
- Priority REST API — queries and $sinceprioritysoftware.github.io (opens the vendor’s site in a new tab)
- Priority webhooksprioritysoftware.github.io (opens the vendor’s site in a new tab)
- Priority SOP — invoice allocation numbers (Israel)cdn.priority-software.com (opens the vendor’s site in a new tab)
Product names and logos are trademarks of their respective owners. Their use indicates compatibility only and does not imply endorsement or partnership.
§06Build
Build this integration.
Start from this plan, or change it in your own words. PartnerMCP builds it against your HubSpot and Priority: sandbox first, production when you approve.