For: Integrators · Partners
Practical guidance for a robust orderManager integration.
Use the Right Identifiers
Different identifiers serve different purposes:
| Identifier | Set by | Use it to |
|---|---|---|
orderId |
orderManager, returned by the import status | Read, release, reset the release of, and delete an order. Store it with the order in your system. |
orderNumber |
orderManager; cannot be set externally | Read or delete an order by its orderManager order number. |
orderNumberExternal |
Your system | Store the order number from your system. An orderNumber sent with an import is stored here. |
externalSystemId |
Your system | Identify repeated imports. An import with the same value overwrites the entire existing order as long as it is in the New state. See Use Case: Import Orders. |
customerNumber |
orderManager; cannot be set externally | Assign orders to a customer and look up the customer. Store it with the customer in your system. |
customerNumberExternal |
Your system | Store the customer number from your system, such as the ERP customer number. |
libraryId |
orderManager | Select the library for sales, price calculation, and configuration data. In Configuration Data Management, the library name is the identifier. |
customTableId |
orderManager | Address a custom table. Use the id from discovery, not the display name. |
Use a unique externalSystemId for each order. If two different orders use the same value, the second import overwrites the first order. URL-encode identifiers used as path segments, such as order numbers, library names, and table IDs.
Observe the Order Status
orderManager sets the order status itself. It cannot be set externally.
| Status | Meaning | Integration behavior |
|---|---|---|
New |
Successfully imported, not yet released. | The order can be reviewed and released, or overwritten by importing it again with the same externalSystemId. |
NewInCalculation |
A group was created or updated; data is still being generated. | Wait until the status is New before releasing the order or importing it again. |
ReadyForProduction |
Released and forwarded to the target systems. | Re-imports end with the Error import status. The release can be reset as long as production has not started. |
InProgress |
Production has started. | The order can no longer be changed. |
Completed |
Production is complete. | The order can no longer be changed. |
Map the statuses explicitly in your system. Do not assume that statuses with the same names in other HOMAG products, such as productionManager, mean the same thing.
Handle Errors Explicitly
| Status | Meaning | Typical cause |
|---|---|---|
200 OK / 201 Created / 204 No Content |
Request succeeded | - |
400 Bad Request |
The request was rejected | Missing or empty identifier, invalid parameter value, invalid filter combination |
401 Unauthorized |
Credentials are missing or invalid, or there is no valid license | Incorrect subscription ID, revoked authorization key, inactive add-on, missing permissions |
404 Not Found |
The requested object does not exist | Unknown order, customer, correlation ID, library, or custom table |
409 Conflict / 412 Precondition Failed |
Concurrent change | The custom table has changed since it was read |
422 Unprocessable Entity |
The request is formally valid but cannot be processed | The order cannot be released or have its release reset in its current state; invalid customer data |
Warning: Do not automatically retry responses with
400,401, or422. They indicate a configuration or data problem that a retry will not fix.
Some results report errors in the response body, even with HTTP 200:
- Import: The import request is accepted, but the import status may end with
Error. CheckerrorDetails. - Price calculation: Check
errorsandwarningsin the response. - Custom table update: Check
succeeded,message, andinvalidRows. - Custom table synchronization: If synchronization could not be started, the response contains the
Errorstatus and an emptycorrelationId.
Create Customers Explicitly
Currently, an order import automatically creates a missing customer. This behavior will be removed in a future version. Create customers before importing their orders to ensure your integration continues to work. See Use Case: Manage Customers.
Use JSON for Imports
The standard import format is OrderDetails as JSON, optionally with referenced files as multipart/form-data. Importing project archives (ZIP) is supported but is not the standard method. Use JSON for new integrations.
Query Efficiently
- Check import and synchronization status at short, increasing intervals, and stop when a terminal status is reached.
- Read orders incrementally using
changedSinceorreleasedSinceinstead of reading all orders on every run. - Save the checkpoint only after all pages have been processed successfully.
Use Filters and Pagination Correctly
changedSinceandreleasedSincecan be combined withorderStatus, but not with each other or withorderNumber.- Split large order and sales item results into pages using
takeandskip. - Send timestamps in ISO 8601 format with a time zone, for example UTC.
Replace Custom Tables Deliberately
Writing to a custom table replaces its complete contents: rows not included in the request are deleted, and an empty row list clears the table. Always read the current contents first, change them, and send all rows back together with the content eTag. Cell values are strings or null, including for numbers and Boolean values.
Keep Credentials on the Server
Credentials identify a subscription, not a person. Call the API only from trusted backend systems and never embed credentials in browser applications, online shops, mobile apps, or public repositories.
Checklist
- Store the
orderIdof every imported order and thecustomerNumberof every customer. - Pass your own numbers as
orderNumberExternalandcustomerNumberExternal, and use a uniqueexternalSystemIdfor every order. - Transfer order changes made before release by importing again with the same
externalSystemId. - Create the customer before importing their orders.
- Import orders as JSON.
- Check the import status, not just the HTTP status of the import request.
- Check the response bodies of price calculations and table updates.
- Do not retry responses with
400,401, or422. - Read orders incrementally and paginate using
take/skip. - Read a custom table before replacing it and send the
eTagwith the request. - Keep credentials on the server.
