For: Customers · Partners · Integrators
The ERP system needs to know the current status and dates of its orders in orderManager without reading every order on each run.
Challenge
Sales staff and customers ask about an order's status in the ERP system. If the ERP system only learns about changes manually, the information is late or incorrect. Reading all orders regularly does not scale as order volumes grow.
Solution
Production systems report production status back to orderManager. The ERP system reads only the orders that have changed since its last run and updates its own data. It matches orders using orderNumberExternal, which contains its own order number, or the stored orderId.
GET /api/orderManager/orders provides two query parameters for incremental reads. They filter by the order timestamps returned in the order details as the changedAt and releasedAt properties:
| Query parameter | Filters by | Use it to |
|---|---|---|
changedSince |
The order's last change (changedAt) |
Keep status, dates, and header data in sync. |
releasedSince |
The order's release (releasedAt) |
Respond to newly released orders, for example to plan production or deliveries. |
Both query parameters can be combined with one or more orderStatus values, but not with each other or with orderNumber. Results are paginated using take and skip. The returned list entries (OrderOverview) contain the order header, for example state and the planned dates. Read the order details if you need changedAt, releasedAt, positions, or prices.
Workflow
- Load the checkpoint from the last successful run, for example its start time.
- Read changed orders page by page using
changedSince,take, andskipuntil a page contains fewer orders thantake. - Find each order in the ERP system using
orderNumberExternaland update its status and dates. Read the order details if you need positions or prices. - Save the start time of this run as the new checkpoint only after all pages have been processed.
var orderManager = new OrderManagerClient(subscriptionId, authorizationKey);
var runStartedAt = DateTime.UtcNow;
var changedSince = erp.LoadCheckpoint();
var states = new[] { OrderState.ReadyForProduction, OrderState.InProgress, OrderState.Completed };
const int take = 100;
var skip = 0;
List<OrderOverview> page;
do
{
page = (await orderManager.GetOrdersChangedSince(states, changedSince, take, skip))?.ToList() ?? [];
foreach (var order in page)
{
erp.UpdateOrder(order.OrderNumberExternal, order.State, order.DeliveryDatePlanned, order.CompletionDatePlanned);
}
skip += take;
}
while (page.Count == take);
erp.SaveCheckpoint(runStartedAt);
GET /api/orderManager/orders?changedSince=2026-11-19T06:00:00Z&orderStatus=ReadyForProduction&orderStatus=InProgress&orderStatus=Completed&take=100&skip=0
200 OK
[
{
"id": "1f5d1f4d-2ab9-487a-8a17-2d6fd84fe228",
"state": "InProgress",
"orderNumber": "736362",
"orderNumberExternal": "ERP-2026-001284",
"orderName": "Bedroom & bathroom 01",
"orderDate": "2026-11-19T00:00:00+00:00",
"deliveryDatePlanned": "2026-12-03T00:00:00+00:00",
"completionDatePlanned": "2026-11-28T00:00:00+00:00",
"externalSystemId": "ERP-2026-001284",
"source": "OrderConfigurator",
"hasErrors": false
}
]
Option: Respond to Released Orders
To process only newly released orders, use the releasedSince query parameter instead of changedSince. The workflow and pagination remain the same.
var released = await orderManager.GetOrdersReleasedSince(OrderState.ReadyForProduction, releasedSince, 100);
GET /api/orderManager/orders?releasedSince=2026-11-19T06:00:00Z&orderStatus=ReadyForProduction&take=100&skip=0
Option: Look Up Individual Orders
To check individual orders—for example, when a customer calls—read them by their orderManager order number using the orderNumber query parameter, or directly with GET /api/orderManager/orders/{id}, where {id} is the orderId or the orderManager order number.
var orders = await orderManager.GetOrders(["736362", "736363"]);
var orderDetails = await orderManager.GetOrder("736362");
GET /api/orderManager/orders?orderNumber=736362&orderNumber=736363
GET /api/orderManager/orders/736362
Order Status
The order status is returned in the state property (the OrderState enum). orderManager sets it itself. It cannot be set externally.
| Status | Meaning |
|---|---|
New |
Imported, not yet released |
NewInCalculation |
A group was created or updated; data is being generated |
ReadyForProduction |
Released and forwarded to the target systems |
InProgress |
Production has started; the order can no longer be changed |
Completed |
Production is complete |
Integration Architecture
Run synchronization as a scheduled job in the ERP system or an integration service, for example every few minutes. Use the start time of a run as the next checkpoint, not its end time, so that changes made during the run are not lost. Process orders idempotently because an order may appear again in the next run.
Benefits
- The ERP system always displays the current status and dates of an order.
- Only changed orders are transferred, even when order volumes are high.
- Newly released orders can automatically trigger follow-up processes.
API reference: See Endpoints → HOMAG Connect orderManager → Orders: Get orders (
GET /api/orderManager/orders) and Get an order (GET /api/orderManager/orders/{id}).
