This page is for whoever has to put Sun Tech WCS under a WMS that already exists: what the two systems exchange, what the WMS must serve and in which order to work. The complete guide is Writing a WMS adapter.
Three contracts
- From the WCS to the WMS. The WCS asks the WMS questions and tells it facts through 43 HTTP routes, which the WMS serves directly or through an adapter placed in front of it.
- From your systems to the WCS. ERP, MES and screens use the WCS API and its event channel. The WMS too, when it wants the WCS to do something, uses the commands of that API: the contract has no callbacks from the WMS to the WCS.
- From the WCS to the machines. Through a driver, on a public contract. Sun Tech provides its own driver; you can also write one of your own.
The WMS does not push, the WCS asks
While the engine runs, once a second the WCS asks the WMS for pending work. The WMS stays the source of truth on goods and orders, and it is the one that chooses the cell: the WCS knows how to get there. Neither ever writes to the other's database.
What the WMS must serve
- The 43 routes of the contract, under a common path, in JSON, with a key in the
X-Api-Keyheader. - Answers that tell a refusal from a failure: a 4xx is a permanent refusal and the request is set aside, a 5xx, 408 or 429 is retried.
- Receipts for every fact, tied to its operation identifier: the same fact sent twice is not recorded twice.
The list of routes, one per line, is in WMS routes; the complete contract, with the rules on identifiers, enumerations and retries, in WMS contract. Both also exist as an OpenAPI 3.1 document, generated from the code.
The steps of the guide
- Start from the sample WMS, which answers all 43 routes on an in-memory warehouse: keep the part that exposes the routes and the key check, and replace the fake data with queries on your database.
- Prepare the data the WMS keeps for the WCS: the door codes of the cells, the depths, the devices from which each cell can be reached, reservations with an expiry and receipts.
- Implement in order: storing first, then extraction, then the rest. A route that is not ready yet answers 503, not a refusal.
- Test with the WCS's own client, using the sample WMS's tests as a model.
Which language
From .NET you use the contract library through a project reference, from a clone of the repository: there are no NuGet packages yet. In another language it is enough to serve the same paths with the same JSON.
Would you like Sun Tech to write the adapter, or are you connecting Kazam WMS? Tell us about your WMS and the plant: an engineer answers. Talk to an engineer
Kazam WMS · warehouse platform