Skip to content

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

Salesforce → Priority
Sandbox

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:

  1. Watch Salesforce’s Change Data Capture stream for Opportunities whose IsWon turns true — not a stage label, which every org names differently.
  2. 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.
  3. Create or update the customer in CUSTOMERS — Account.Name goes to CUSTDES — and write Priority’s customer number back to the Account.
  4. 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.
  5. Let Priority price and tax the order, then reconcile its DISPRICE against Opportunity.Amount and hold any difference for review.
  6. 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.
  7. Write the order number, its status, shipments and the final invoice number back to the Opportunity.
  8. 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 WonCustomer lookupSchema mappingCreate / update customerCreate sales orderMonitor orderSync fulfillmentSync invoice statusUpdate Opportunity
Integration plan: Salesforce ↔ Priority ERP. Salesforce to Priority ERP.
  1. Opportunity · Closed Won — Salesforce: Trigger · Change Data Capture
  2. Customer lookup — PartnerMCP: Account ⇄ 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 Opportunity — Salesforce: fulfillment · invoice status
Product preview · sample data
§01—What syncs

What syncs, and which way.

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

SalesforcePriority
  1. Salesforce to Priority ERP:

    Opportunity → ORDERS + ORDERITEMS_SUBFORM
    When
    OpportunityChangeEvent 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.
  2. 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.
  3. 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.
  4. Priority ERP to Salesforce:

    ORDERS → Opportunity
    When
    $since polling on ORDERS, in UTC
    Result
    ORDSTATUSDES mapped to the Salesforce status your team reports on.
  5. 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.
  6. 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.
§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.

Salesforce ⇄ Priority
Draft

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.

Product preview · sample data
Salesforce ⇄ Priority
Draft
  1. Account.Name

    to CUSTOMERS.CUSTDES

    CUSTOMERS.CUSTNAMERejected

    Trim to the column’s length, read from metadata

    98% confidence
    Not CUSTNAME: Priority’s metadata titles CUSTNAME “Customer Number”. A name matcher picks it; PartnerMCP rejects it.
  2. CUSTOMERS.CUSTNAME

    to Account.Priority_Customer_No__c

    Written back after create; External ID for later upserts

    96% confidence
    Priority’s key, at most 16 characters — too short for an 18-character Salesforce ID.
  3. Account.Website

    to CUSTOMERS.HOSTNAME

    Copied as-is

    93% confidence
    HOSTNAME is Priority’s website column for customers. No string match would find it.
  4. Account.BillingCountryCode

    to CUSTOMERS.COUNTRYNAME

    ISO code → a name from the tenant’s country list

    74% confidence
    Verify on tenantConfirmed with GetMetadataFor(entity='CUSTOMERS') before use.
  5. Account.Tax_ID__c (custom)

    to CUSTOMERS.VATNUM

    Digits only; Israeli company numbers zero-padded to 9

    70% confidence
    Verify on tenantSalesforce has no standard tax-ID field, and allocation-number requests depend on this one.
  6. OpportunityLineItem.ProductCode

    to ORDERITEMS_SUBFORM.PARTNAME

    Must exist in LOGPART

    95% confidence
    Read-only on the line (it comes from Product2). Priority won’t change a saved line’s part — PartnerMCP deletes and re-inserts the line.
  7. OpportunityLineItem.Quantity

    to ORDERITEMS_SUBFORM.TQUANT

    Decimal point; unit from TUNITNAME

    97% confidence
  8. OpportunityLineItem.UnitPrice · Discount

    to ORDERITEMS_SUBFORM.PRICE · PERCENT

    Sent only when Salesforce owns pricing

    85% confidence
    Leave PRICE out and Priority prices the line from the customer’s price list; PRSOURCENAME shows where the price came from.
  9. Opportunity.CloseDate

    to ORDERS.CURDATE

    Date → DateTimeOffset in the company’s time zone

    90% confidence
  10. Opportunity.Amount

    to ORDERS.DISPRICE — reconciled, not written

    Compared after Priority computes DISPRICE, VAT and TOTPRICE

    Rule
    Writing TOTPRICE would make Priority back-calculate the overall discount and the tax.
  11. Opportunity.Id

    to ORDERS.XXXX_SFOPPID (custom column)

    Looked up before every create

    Rule
    The duplicate guard. Custom columns carry your four-letter prefix; ClearEntityMetadata makes them visible to the API.
  12. ORDERS.ORDNAME · ORDSTATUSDES

    to Opportunity.Priority_Order_No__c · Priority_Order_Status__c

    On create and on every status change

    96% confidence
    Priority assigns the order number; statuses are mapped from your tenant’s own list.
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 Salesforce and Priority in production, and what PartnerMCP does about it.

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

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

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

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

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

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

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

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

§04—Questions

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.

§05—References

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