§00Connect
Salesforce ↔ Priority ERP
Closed Won in Salesforce. A priced sales order in Priority.
When a deal closes in Salesforce, someone usually retypes it into Priority — the customer, every line, the prices — and sales waits for operations to say whether it shipped or was invoiced. Where an integration does exist, it may be a scheduled file load that few people can still explain. PartnerMCP connects the two through Priority’s REST API, the way Priority expects: every write goes through Priority’s forms, so the price lists, tax and business rules that run for your users run for the integration too. Order, shipment and invoice status come back to the Opportunity.
You
“Connect Salesforce to Priority ERP. When an Opportunity becomes Closed Won, create or update the customer in Priority, create the sales order, synchronize the products and pricing, and send the fulfillment and invoice status back to Salesforce.”
PartnerMCP· I will:
- Watch Salesforce’s Change Data Capture stream for Opportunities whose IsWon turns true — not a stage label, which every org names differently.
- Find the customer in Priority by the customer number (CUSTNAME) stored on the Account; failing that, by VAT number. A name-only match waits for your confirmation.
- Create or update the customer in CUSTOMERS — Account.
Name goes to CUSTDES — and write Priority’s customer number back to the Account. - Check that no Priority order already carries this Opportunity’s ID, then create the sales order in ORDERS with one ORDERITEMS_
SUBFORM line per product: PARTNAME, TQUANT and, if Salesforce owns pricing, PRICE. - Let Priority price and tax the order, then reconcile its DISPRICE against Opportunity.
Amount and hold any difference for review. - Follow the order into Customer Shipments (DOCUMENTS_
D) and Sales Invoices (AINVOICES) — $since polling on documents that support it, filtered reads for the rest, and BPM webhooks where your tenant has the Webhooks module. - Write the order number, its status, shipments and the final invoice number back to the Opportunity.
- Stay within Priority Cloud’s fair-use limits, retry only 429 and 5xx responses, and send validation errors to review with Priority’s own message attached.
- Opportunity · Closed Won — Salesforce: Trigger · Change Data Capture
- Customer lookup — PartnerMCP: Account ⇄ 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 Opportunity — Salesforce: fulfillment · invoice status
What syncs, and which way.
Every record that moves between Salesforce and Priority: what starts it, and what it produces on the other side.
Salesforce to Priority ERP:
Opportunity → ORDERS + ORDERITEMS_SUBFORM- When
- Opportunity
Change Event with IsWon = true (Pub/Sub API) - Result
- A sales order in Draft with one line per OpportunityLineItem, priced and taxed by Priority; ORDNAME written back.
Salesforce to Priority ERP:
Account → CUSTOMERS- When
- First won Opportunity for an account without a Priority customer number
- Result
- Customer created or matched; CUSTNAME stored on the Account as an External ID.
Priority ERP to Salesforce:
LOGPART → Product2 + PricebookEntry- When
- Scheduled sync, when Priority owns parts and prices
- Result
- Salesforce products mirror Priority’s Part Catalogue; price-book prices come from the price list you choose.
Priority ERP to Salesforce:
ORDERS → Opportunity- When
- $since polling on ORDERS, in UTC
- Result
- ORDSTATUSDES mapped to the Salesforce status your team reports on.
Priority ERP to Salesforce:
DOCUMENTS_D → Opportunity- When
- $since on Customer Shipments, or a BPM webhook on shipment status
- Result
- Shipment number (DOCNO) and status on the Opportunity.
Priority ERP to Salesforce:
AINVOICES → Opportunity- When
- Invoice finalized — its temporary T-number becomes the final IVNUM
- Result
- Final invoice number on the Opportunity, with allocation status for Israeli invoices.
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.
Salesforce Priority· CUSTOMERS
Why not the look-alike
Not CUSTNAME: Priority’s metadata titles CUSTNAME “Customer Number”. A name matcher picks it; PartnerMCP rejects it.
Where the key goes
Priority’s key, at most 16 characters — too short for an 18-character Salesforce ID.
Account.Name maps to CUSTOMERS.CUSTDES, not to CUSTOMERS.CUSTNAME. CUSTOMERS.CUSTNAME is written back to Account.Priority_Customer_No__c as the key.
Account.
Name to CUSTOMERS.
CUSTDES CUSTOMERS.CUSTNAMERejected
Trim to the column’s length, read from metadata
98% confidenceNot CUSTNAME: Priority’s metadata titles CUSTNAME “Customer Number”. A name matcher picks it; PartnerMCP rejects it.CUSTOMERS.
CUSTNAME to Account.
Priority_ Customer_ No_ _ c Written back after create; External ID for later upserts
96% confidencePriority’s key, at most 16 characters — too short for an 18-character Salesforce ID.Account.
Website to CUSTOMERS.
HOSTNAME Copied as-is
93% confidenceHOSTNAME is Priority’s website column for customers. No string match would find it.Account.
Billing Country Code to CUSTOMERS.
COUNTRYNAME ISO code → a name from the tenant’s country list
74% confidenceVerify on tenantConfirmed with GetMetadataFor(entity='CUSTOMERS') before use.Account.
Tax_ ID_ _ c (custom) to CUSTOMERS.
VATNUM Digits only; Israeli company numbers zero-padded to 9
70% confidenceVerify on tenantSalesforce has no standard tax-ID field, and allocation-number requests depend on this one.Opportunity
Line Item. Product Code to ORDERITEMS_
SUBFORM. PARTNAME Must exist in LOGPART
95% confidenceRead-only on the line (it comes from Product2). Priority won’t change a saved line’s part — PartnerMCP deletes and re-inserts the line.Opportunity
Line Item. Quantity to ORDERITEMS_
SUBFORM. TQUANT Decimal point; unit from TUNITNAME
97% confidenceOpportunity
Line Item. Unit Price · Discount to ORDERITEMS_
SUBFORM. PRICE · PERCENT Sent only when Salesforce owns pricing
85% confidenceLeave PRICE out and Priority prices the line from the customer’s price list; PRSOURCENAME shows where the price came from.Opportunity.
Close Date to ORDERS.
CURDATE Date → DateTimeOffset in the company’s time zone
90% confidenceOpportunity.
Amount to ORDERS.
DISPRICE — reconciled, not written Compared after Priority computes DISPRICE, VAT and TOTPRICE
RuleWriting TOTPRICE would make Priority back-calculate the overall discount and the tax.Opportunity.
Id to ORDERS.
XXXX_ SFOPPID (custom column) Looked up before every create
RuleThe duplicate guard. Custom columns carry your four-letter prefix; ClearEntityMetadata makes them visible to the API.ORDERS.
ORDNAME · ORDSTATUSDES to Opportunity.
Priority_ Order_ No_ _ c · Priority_ Order_ Status_ _ c On create and on every status change
96% confidencePriority assigns the order number; statuses are mapped from your tenant’s own list.
Edge cases, handled.
What goes wrong between Salesforce and Priority in production, and what PartnerMCP does about it.
- 01
The customer number isn’t the name
In Priority, CUSTNAME is the Customer Number — the record’s key, at most 16 characters — and CUSTDES is the customer’s name. PartnerMCP maps by what Priority’s metadata says a column means, so company names never end up in a key and lookups keep working.
- 02
Priority computes the totals
Opportunity.
Amount is a pre-tax sum of products, and Salesforce ignores updates to it once the Opportunity has line items. ORDERS. TOTPRICE is Priority’s final price including tax. PartnerMCP sends the lines, lets Priority price and tax them and compares DISPRICE with Amount; a header discount, a price-list override or a rounding difference is flagged, never overwritten. - 03
One owner for price
If Priority owns pricing, PartnerMCP leaves PRICE empty so the customer’s price list applies, and keeps Salesforce price books in step — standard prices first, because Salesforce requires a standard price before any custom price-book entry. If Salesforce owns pricing, PRICE and PERCENT come from the Opportunity line. The plan states which.
- 04
A deep insert can half-succeed
Priority’s $batch has no rollback, and an order can save while one of its lines is rejected. PartnerMCP records what Priority committed, resumes from the failed line and never posts the order a second time — the Opportunity ID on the order is checked first.
- 05
Saved lines keep their part
Priority won’t change the part on a saved order line. When an Opportunity’s products change after the order exists, PartnerMCP deletes and re-inserts the affected lines — and asks first if your order statuses mark the order as past the point of change.
- 06
Allocation numbers on Israeli invoices
Israeli B2B tax invoices above the Tax Authority’s minimum need an allocation number. Priority requests it for final invoices and stores it in the invoice’s Tax Authorities ID field. PartnerMCP checks the customer’s VAT number before the order is created and shows the allocation status on the Opportunity, so sales knows the invoice is complete.
- 07
Fair use and metered writes
Priority Cloud allows 100 API calls per minute per user, up to 15 in flight, and answers HTTP 429 beyond that. Every insert or update also counts against your API transaction packages — an order with five lines counts as six. PartnerMCP paces each API user, pages every read and skips writes that wouldn’t change anything.
- 08
Your statuses, often in Hebrew
Order statuses are defined per tenant in Possible Statuses for Orders, frequently in Hebrew, with flags such as CLOSED. PartnerMCP maps your list instead of searching for the word “Closed”, and writes Hebrew text to Priority’s text forms with the direction tags they need.
Questions about Salesforce and Priority.
Does PartnerMCP use Priority’s MCP server?
Where your tenant runs Priority Cloud 26.0 or later, PartnerMCP can work with the MCP server Priority ships — it’s useful for questions and lookups. The order flow runs on Priority’s REST API (OData v4), which has what an order-to-cash integration needs: $since change tracking, $batch and deep inserts; the MCP server is request/response only. Form Actions such as finalizing an invoice aren’t available through either, so PartnerMCP uses Priority’s Web SDK for those or leaves them with your team.
Our Priority runs on-premises. Does it have to be exposed to the internet?
No. PartnerMCP’s Edge Agent is designed to run inside your network, next to the Priority application server, and to connect out over HTTPS — no inbound ports, and the Priority credentials stay on your side. Outbound allow-listing is usually still required. Priority’s own Gateway uses the same outbound-only pattern for its Priority Connect services.
What does our Priority license need?
The API module, an API license for the integration user and API transaction packages. The Webhooks module is optional — without it, PartnerMCP follows changes with $since polling — and an ODBC license only matters for read-heavy reporting. Priority’s documents describe transaction counting differently, so PartnerMCP reads the API Transaction Count on your license report instead of assuming.
Will it handle our customizations?
It discovers them instead of assuming a standard tenant. PartnerMCP reads each form’s metadata — GetMetadataFor on 25.0 and later, $metadata before that — including column titles and, from 25.1, which columns are mandatory. Custom columns carry your four-letter prefix and appear in the API after ClearEntityMetadata.
Why not write straight into Priority’s database?
Because Priority says not to: records inserted directly into tables bypass the integrity checks and triggers that forms run, including ones added in future versions. Priority’s ODBC driver is read-only. PartnerMCP writes through the REST API, which passes through the same forms and business rules as your users.
What can the integration see in Priority?
What its API user can see. Priority applies field-level permissions to REST calls (since 22.1) but not row-level data privileges, so PartnerMCP uses a dedicated, least-privilege API user, exposes only the forms the integration needs in Limited Access/API Forms, and limits operations in its own policy as well.
Vendor documentation.
The public documentation behind the technical details on this page.
- Priority REST API — introduction, licensing and fair useprioritysoftware.github.io (opens the vendor’s site in a new tab)
- Priority REST API — requests and metadataprioritysoftware.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 REST API — create, update and $batchprioritysoftware.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 MCP serverprioritysoftware.github.io (opens the vendor’s site in a new tab)
- Priority SDK — interfacesprioritysoftware.github.io (opens the vendor’s site in a new tab)
- Priority SOP — Sales Orderscdn.priority-software.com (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)
- Salesforce — Opportunity objectdeveloper.salesforce.com (opens the vendor’s site in a new tab)
- Salesforce — OpportunityLineItem objectdeveloper.salesforce.com (opens the vendor’s site in a new tab)
- Salesforce — Change Data Capturedeveloper.salesforce.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 Salesforce and Priority: sandbox first, production when you approve.