Skip to content

§00Connect

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.

HubSpot → Priority
Sandbox

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:

  1. 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.
  2. 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.
  3. Create or update the customer in CUSTOMERS — name to CUSTDES, domain to HOSTNAME — and store CUSTNAME on the company as a unique-identifier property.
  4. 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.
  5. Let Priority price and tax the order, compare DISPRICE with the deal amount and send any difference to review.
  6. Follow shipments (DOCUMENTS_D) with $since polling and invoices (AINVOICES) with filtered reads by customer — or BPM webhooks where the Webhooks module is installed.
  7. Write the Priority order number, delivery status and final invoice number to deal properties your team can report on.
  8. 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 WonCustomer lookupSchema mappingCreate / update customerCreate sales orderMonitor orderSync fulfillmentSync invoice statusUpdate Deal
Integration plan: HubSpot ↔ Priority ERP. HubSpot to Priority ERP.
  1. Deal · Closed Won — HubSpot: Trigger · webhooks
  2. Customer lookup — PartnerMCP: companies ⇄ CUSTOMERS
  3. Schema mapping — PartnerMCP: fields · products · prices
  4. Create / update customer — Priority ERP: CUSTOMERS
  5. Create sales order — Priority ERP: ORDERS + ORDERITEMS_SUBFORM
  6. Monitor order — PartnerMCP: status · delivery · invoice
  7. Sync fulfillment — Priority ERP: DOCUMENTS_D
  8. Sync invoice status — Priority ERP: AINVOICES
  9. Update Deal — HubSpot: fulfillment · invoice status
Product preview · sample data
§01—What syncs

What syncs, and which way.

Every record that moves between HubSpot and Priority: what starts it, and what it produces on the other side.

HubSpotPriority
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Priority ERP to HubSpot:

    AINVOICES → Deal
    When
    Invoice finalized in Priority
    Result
    Final invoice number on the deal — temporary T-numbers are never written.
§02—Field mapping

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
Draft

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.

Product preview · sample data
HubSpot ⇄ Priority
Draft
  1. companies.name

    to CUSTOMERS.CUSTDES

    CUSTOMERS.CUSTNAMERejected

    Trim to the column’s length, read from metadata

    97% confidence
    Not CUSTNAME, which is Priority’s customer number.
  2. CUSTOMERS.CUSTNAME

    to companies.priority_customer_no (custom)

    Written back after create

    95% confidence
    A unique-identifier property, so later runs read companies by it (idProperty) instead of searching.
  3. companies.domain

    to CUSTOMERS.HOSTNAME

    Domain → website address

    88% confidence
    HubSpot treats the domain as a company’s primary unique identifier; Priority keeps the website in HOSTNAME.
  4. companies.phone

    to CUSTOMERS.PHONE

    Normalized format

    94% confidence
  5. companies.tax_id (custom)

    to CUSTOMERS.VATNUM

    Digits only; zero-padded to 9

    70% confidence
    Verify on tenantNeeded before an Israeli invoice can get an allocation number.
  6. products.hs_sku (via line_items.hs_product_id)

    to ORDERITEMS_SUBFORM.PARTNAME

    Must exist in LOGPART

    94% confidence
  7. line_items.quantity

    to ORDERITEMS_SUBFORM.TQUANT

    Decimal point; unit from TUNITNAME

    97% confidence
  8. line_items.price

    to ORDERITEMS_SUBFORM.PRICE

    Sent only when HubSpot owns pricing

    84% confidence
    Leave it out and Priority prices the line from the customer’s price list.
  9. deals.closedate

    to ORDERS.CURDATE

    Date → DateTimeOffset in the company’s time zone

    90% confidence
  10. deals.amount

    to ORDERS.DISPRICE — reconciled, not written

    Compared after Priority prices and taxes the lines

    Rule
    Priority computes DISPRICE, VAT and TOTPRICE itself.
  11. deals.hs_object_id

    to ORDERS.XXXX_HSDEALID (custom column)

    Looked up before every create

    Rule
    The duplicate guard: HubSpot can deliver the same event more than once.
  12. ORDERS.ORDNAME · ORDSTATUSDES

    to deals.priority_order_no · priority_order_status (custom)

    On create and on every status change

    96% confidence
10 field mappings · 2 rules Confidence Lower, or verify on tenant
Product preview · sample data
§03—Edge cases

Edge cases, handled.

What goes wrong between HubSpot and Priority in production, and what PartnerMCP does about it.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

§04—Questions

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.

§05—References

§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.