Business Central and a 3PL Warehouse: Replacing the Nightly CSV With a Real Integration
Why file exchanges post shipments twice, the message design that prevents it, who owns which error, the daily stock reconciliation, and how the webshop, marketplaces and EDI share one stock figure.
Replace the nightly CSV with API based messages that each carry a unique key, such as the 3PL shipment ID, so a message that arrives twice is recognised and never posts twice. Messages land in a staging table in an AL extension, are validated, and only then post shipments, receipts and adjustments in Business Central; anything that fails goes to an error queue with the reason and a retry. A daily stock reconciliation compares the 3PL snapshot with Business Central per item, lot and location. Business Central owns orders, items and stock value, the integration owns delivery and retries, and the 3PL owns physical stock and timely messages. Solzet builds this as one accountable team.
Why does a nightly CSV with a 3PL post shipments twice or miss them?
A file exchange has no memory of what it already did. The 3PL drops a shipment file on an SFTP folder, a scheduled job in Business Central picks it up, posts the lines and moves the file to an archive folder. Every failure mode lives in the gaps between those steps. If the job posts half the file and then stops on a blocked item, the next run starts again from the first line and posts the first half a second time. If the 3PL resends a file after a timeout on their side, the content arrives under a new file name and nothing in Business Central knows it has seen those shipments before. If the archive step fails, the same file is read again the next night.
The opposite failure is just as common: one bad line rejects the whole file, or the file is renamed by hand to get it through, and shipments that did happen never reach Business Central. Either way the finance team finds out days later, when invoices are wrong, stock is negative or the webshop sells what is already gone.
- No unique key per shipment or receipt, so a second copy looks like new work.
- A whole file processed in one go, so a failure halfway leaves part of it posted.
- Corrections sent as a full resend instead of a correction message.
- Errors written to a log that nobody owns, instead of a queue someone works every day.
- Stock in Business Central and in the channels up to a day behind the warehouse.
What does a real integration between Business Central and a 3PL warehouse look like?
The design below replaces the file with individual messages, each handled on its own. Business Central exposes what the 3PL needs through the Business Central API v2.0 and custom API pages in an AL extension, and webhook subscriptions tell an integration service when an order is released instead of it polling. When the 3PL only offers SFTP files or EDI, a thin adapter in an integration service splits each file into messages before anything reaches Business Central, so the rest of the design does not change. Where an Azure integration layer is the right home for that adapter, the Azure Integration Services page covers the platform.
| Part | What it does | Where it lives |
|---|---|---|
| Outbound messages | Shipment requests from released sales and transfer orders, expected receipts from purchase orders, item and unit of measure master data. | Business Central, published through API pages and webhooks |
| Inbound messages | Shipment confirmations with carrier and tracking, receipt confirmations, stock adjustments with a reason, a daily stock snapshot. | Sent by the 3PL or its adapter to custom API pages |
| Idempotency key | The 3PL message ID plus message type, unique per message, checked before anything posts. | A unique key on the staging table |
| Staging table | Holds every inbound message with its status: received, validated, posted, duplicate, error, cancelled. | An AL extension in Business Central |
| Posting job | Validates and posts one message per transaction, so one failure never rolls back or repeats another. | Job queue entries in their own category |
| Error queue | Lists failed messages with the reason, the retry count and the owner who must act. | A Business Central page on the staging table, with alerts |
| Stock reconciliation | Compares the 3PL snapshot with Business Central per item, variant, lot and location every day. | A reconciliation page and report in the same extension |
How do idempotent keys and a staging table stop a shipment posting twice?
Every inbound message carries a key the 3PL generates once and never reuses, usually its own message or shipment ID. When a message arrives, the custom API page writes it to the staging table, and the unique key on that table refuses a second record with the same key. The second copy is answered with success and logged as a duplicate, so the 3PL stops resending, and nothing posts. The posting job then works through validated messages one at a time and posts each in its own transaction, marking the message as posted in the same transaction, so a crash can never leave a shipment posted but the message still waiting.
The same rule works in the other direction. Each shipment request carries the Business Central document number and a version, so the 3PL can ignore a request it already holds and recognise a changed one. Corrections from the 3PL arrive as their own message type with their own key, such as a quantity correction against an earlier confirmation, never as a resend of the original.
- Partial shipments get one key per confirmation, and each line references the order line it ships.
- Validation runs before posting: item and variant known, quantity not above what is outstanding, lot or serial supplied where the item needs one, location mapped.
- A message that fails validation stays in the staging table with status error and the reason, and is never silently dropped.
- Transport errors such as a timeout retry automatically with a delay; data errors wait for a person to fix the cause.
- Messages are never deleted. They are posted, marked as duplicate, or cancelled with a reason, so the history explains every stock movement.
Who is accountable for what between Business Central, the integration and the 3PL?
A nightly CSV usually fails between three parties who each assume someone else owns the gap. Write the split down before the build starts, in the integration design that both your team and the 3PL sign. Each row in the error queue then has an obvious owner, and the daily review is a short meeting instead of an argument.
| Area | Business Central owner (your team) | Integration owner | 3PL |
|---|---|---|---|
| Master data | Items, units of measure, lot and serial rules, locations, customers | Maps item and location codes, rejects unknown codes | Sets up items it receives, reports mismatches |
| Orders and receipts | Releases sales, transfer and purchase orders on time | Delivers shipment requests and expected receipts once, with retries | Picks, packs and receives against the request |
| Confirmations | Reviews posted shipments and receipts | Validates, posts and logs every confirmation exactly once | Sends one confirmation per event with a unique key, and corrections as corrections |
| Errors | Fixes data errors such as a blocked item or missing lot | Runs the error queue, retries transport errors, alerts on backlog | Fixes errors on its side, such as wrong quantities or unknown orders |
| Stock | Owns stock value and approves adjustments | Runs the daily reconciliation and reports differences | Owns physical stock and sends the daily snapshot |
| Change | Approves new message types and fields | Versions the interface and tests changes in a sandbox | Announces WMS changes ahead of release |
How do you reconcile stock between Business Central and the 3PL every day?
Real time messages keep the two systems close, but only a daily comparison proves they agree. The 3PL sends a stock snapshot at an agreed cut off time, per item, variant, lot or serial and status, such as available, damaged or on hold. The reconciliation job compares it with Business Central inventory at the matching location for the same moment, after allowing for messages that are still in the staging table, and lists every difference.
Differences are investigated, not adjusted away. Most turn out to be a confirmation still in the error queue, a receipt posted to the wrong location or a lot entered differently on each side, and the fix is to process or correct that message. Only a difference that survives the investigation becomes an item journal adjustment, posted by the Business Central owner with a reason code, so stock value and the audit trail stay right. The 3PL snapshot is never copied over Business Central automatically, because that hides the errors that caused the gap.
How do the webshop, marketplaces, EDI and the 3PL share one stock figure in Business Central?
Business Central sits in the middle as the system of record for orders, items and stock, and every channel connects to it through the same pattern: messages with keys, a staging step, an error queue and a reconciliation. Stock moves one way. The 3PL reports what happened in the warehouse to Business Central, and Business Central publishes availability to the channels, after any safety stock or channel allocation you decide. No channel reads stock from the 3PL directly, because then each channel holds a different truth.
For Shopify, Microsoft's own connector handles most of the work, and its settings, duplicate orders and refunds are covered on Business Central and Shopify integration. For other webshops the same page explains the API route. Marketplaces bring settlements, fees and VAT as well as orders, and Amazon is covered on Amazon settlement reconciliation in Business Central. For a webshop, ERP and CRM joined by several separate integrations, see Magento, Business Central and Dynamics 365 Sales.
- Webshop: orders in, availability and fulfilment status out, through the Shopify Connector or the API.
- Marketplaces: orders and settlements in, availability out, with one customer per marketplace and its own clearing account.
- EDI customers: Business Central does not include a translator for classic EDI standards such as EDIFACT or X12, although it handles electronic documents such as e-invoices through its e-documents features; check the current Microsoft Learn documentation for your version. An EDI provider or a Microsoft Marketplace (AppSource) app translates the documents, and orders, despatch advices and invoices pass through the same staging pattern.
- 3PL: shipment requests and expected receipts out, confirmations, adjustments and the daily snapshot in.
- Own warehouse, if any: a separate Business Central location, so stock per location matches what each warehouse reports.
How do you move from the CSV to the new integration without stopping shipments?
Run both side by side before you switch. Copy the 3PL messages for a period into a Business Central sandbox with the new extension, let it post them, and compare the result with what the CSV process posted in production: shipments per order, receipts per purchase order, adjustments and stock per item and location. Every difference is either a defect in the new integration or an error the CSV hid, and both are worth finding before go-live.
Then cut over at a quiet point agreed with the 3PL, usually after the last wave of the day: stop the file job, let the 3PL switch to messages, reconcile stock the next morning against the snapshot, and keep the old files readable for audit. Agree the date with the 3PL early, because their WMS team has to build and test their side as well.
What does Solzet do for a Business Central 3PL and channel integration?
Solzet designs and builds the integration as one accountable team. We map your current file flows, write the integration design with the message set, the keys, the validation rules and the accountability table, build the AL extension with the custom API pages, staging table, posting jobs, error queue and reconciliation, build or configure the adapter for the 3PL and for EDI where needed, test the 3PL interface with them in a sandbox, run the parallel comparison and support the cutover and the first weeks of daily reviews. Our own senior consultants and developers do the work, and the extension follows the practices on Business Central AL development. The wider service line is on Dynamics 365 Business Central.
Where the sales side runs in a CRM, the same team designs that integration too; buyers who would rather not carry Microsoft licensing for CRM can choose a custom CRM. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.
What do people ask us?
Why does our 3PL CSV import post the same shipment twice in Business Central?
Because the file exchange has no unique key per shipment. A rerun after a halfway failure, a resend from the 3PL or a file that was not archived all look like new shipments. Give every message a key, check it against a staging table before posting, and post one message per transaction.
What is an idempotent key in a Business Central integration?
It is an identifier the sender creates once per message and never reuses, such as the 3PL shipment ID. Business Central stores it with a unique key in a staging table, so a second copy of the same message is recognised and logged as a duplicate instead of posted.
Do we need an AL extension to integrate a 3PL with Business Central?
For a reliable integration, yes in most cases. The standard API covers many documents, but the staging table, custom API pages for the 3PL messages, validation, the error queue and the stock reconciliation are built as an AL extension so they survive Business Central updates.
Who should fix integration errors between Business Central and a 3PL?
It depends on the error. Data errors in Business Central, such as a blocked item, belong to your Business Central owner; transport errors and retries belong to the integration owner; wrong quantities or unknown orders belong to the 3PL. Write that split down before the build.
How often should stock be reconciled between Business Central and a 3PL?
Daily, against a snapshot the 3PL sends at an agreed cut off time. Compare per item, variant, lot and location after allowing for messages still in the staging table, investigate every difference and adjust only what survives the investigation, with a reason code.
Can Business Central handle EDI with customers and a 3PL at the same time?
Yes, with the translation done outside the core posting. An EDI provider or a Microsoft Marketplace (AppSource) app translates EDI documents, and the resulting orders and despatch advices pass through the same staging and error queue pattern as the 3PL messages.
Does Solzet build Business Central integrations with 3PL warehouses?
Yes. Solzet designs the message set and accountability, builds the AL extension, staging table, error queue and reconciliation, tests the interface with the 3PL in a sandbox and supports the cutover, with its own senior consultants and developers.
Where should you go next?
Dynamics 365 Business Central
The service line: implementation, AL extensions, integrations and support.
Business Central and Shopify
What the Shopify Connector syncs, its pitfalls and how to repair a broken sync.
Amazon settlements in Business Central
Posting sales, fees, refunds, VAT and FBA stock from Amazon settlements.
Business Central AL development
How we build and test AL extensions that survive updates.
Azure Integration Services
The integration platform for adapters, queues and monitoring.
Which solution is right for your business?
Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.