Select a step to inspect its data. Use zoom or Fit to explore the canvas.
Inbound APIs → BC records → outbound Salesforce sync. Staging and processing run inside BC. Select a node for data, checks and AL references.
Inbound to BC →Customers · orders · amendments · short close
Outbound from BC → SalesforceInventory · customers · invoices · status
Scroll to explore · select a node
Illustrative data flow
Step 1 of 12: Customer API.Salesforce integration guide
Salesforce is a cloud CRM: a customer relationship management platform where teams manage customer relationships and sales activity. In this project, customer and order information flows into Business Central, where operational teams process sales documents and return invoice updates to CRM.
What is Salesforce, and how does this integration work?
Salesforce · customer relationships
The sales-facing system. An account represents a customer organization, a contact represents a person, and an opportunity tracks a potential sale. The order journey below starts with a customer and order request; automatic opportunity-to-order conversion is not established for this project.
Business Central · operations and finance
The ERP receives order data, checks customers and items, and creates sales documents. Fulfilment and posting happen through the configured Business Central workflow.
REST API and JSON · the connection
An API is a controlled doorway into a system. JSON is the structured message carried through it. Custom AL API pages receive order headers and lines; outbound AL routines build messages for Salesforce.
Staging and Job Queue · controlled processing
Staging stores incoming data before creating a business document. A Job Queue runs configured processing in the background; manual actions let an operator review and process supported records.
External ID · matching the same record
The external order ID links the CRM request to the BC document. The existing open-document lookup supports updates; it does not by itself guarantee duplicate protection for every retry or posted document.
How the order and invoice flow runs
Capture the customer and order in Salesforce. The integration sends the agreed header and line fields with a stable external order reference. The exact Salesforce trigger or middleware is outside the supplied assessment.
Store header and lines in BC staging. Keep the expected line count so processing can detect an incomplete request; receiving a header alone is not enough to create the complete order.
Run the configured Job Queue or manual processor. Check the customer, blocked status, dates, location, items, variants, ship-to details and expected versus received lines. Invalid data stays visible for correction.
Find an existing open document by external order ID, or create the appropriate sales or return order. Rebuild supported open-document lines using BC field validation and mark successful staging as Processed.
Complete fulfilment and invoice posting in Business Central. These are separate operational actions after order creation; a Processed staging record does not mean that an invoice was posted or paid.
Use the configured event, job or supported action to build posted-invoice JSON. Acquire the Salesforce bearer token, call the endpoint and inspect the HTTP response and returned business identifiers.
Store returned IDs and synchronization state. Review failures using staging history and payload logs. After a timeout, check whether the destination already accepted the record before resending; comprehensive automatic recovery is not established by the assessment.
Example: DEMO-ORDER contains two lines. If only one arrives, the line-count check prevents treating the request as complete. After the missing line is supplied and validation succeeds, BC can create the order. A later posted invoice is sent back against the external reference so the CRM can associate the result with the original sale.
How to connect the systems and what they exchange
Integration setup
Agree which system owns each field and when to send it. Map customer references, external order IDs, item codes, variants, quantities, dates, locations and ship-to details to the API contract.
For Business Central online, configure a Microsoft Entra application, grant the required API access, and assign appropriate permission sets in Business Central. The sender obtains an access token for BC. This is platform setup guidance; the project’s deployed inbound authentication was not inspected.
For the return path, configure Salesforce OAuth application access and the receiving endpoint. The BC sender acquires a bearer token for Salesforce. Tokens for Salesforce and Business Central authorize different resources.
Deploy and configure the AL APIs, company and environment endpoints, master-data mappings, outbound settings and supported Job Queue entries. Keep credentials in protected server-side configuration.
Test the complete round trip in a sandbox: a valid two-line order, a missing item, an incomplete line set, an amended order and an outbound failure. Compare source IDs, BC documents, response IDs and processing logs before enabling unattended processing.
Salesforce → Business Central
Customer and order staging, plus supported amendment and short-close requests. An amendment changes an existing order; short-close processing addresses the remaining unfulfilled quantity under the configured rules.
Business Central → Salesforce
Outbound routines cover inventory, customer, invoice and credit-memo information. Each exchange has its own configured trigger and mapping; the animation follows the order-to-invoice example.