For: Customers · Partners · Integrators
A configurator, online shop, or sales tool needs a reliable price for a configured order, calculated using the same rules as orderManager.
Challenge
If each sales channel calculates prices using its own logic, the same product can have different prices in the shop, quote, and order. Maintaining pricing rules in multiple places is error-prone and expensive.
Solution
The sales application sends the order data to orderManager and receives it back with calculated prices. The calculation uses the pricing rules from a price library in orderManager. Pass the price library in libraryId. If libraryId is omitted, orderManager uses the subscription's default price library. The response always contains the libraryId used. Specify the price library explicitly to make the result predictable.
Note:
libraryIdmust refer to a price library. If it refers to another library, such as a configuration library, the response contains an error inerrors.
| Endpoint | Purpose |
|---|---|
GET /api/pos/libraries/{libraryId}/articles |
Read a library's items, for example to display the assortment. |
GET /api/pos/libraries/{libraryId}/masterData |
Read a library's master data: the available modules and attributes used to describe items. |
GET /api/pos/libraries/{libraryId}/calc.js |
Read a library's calculation script, for example to provide an instant price preview in the sales application. |
POST /api/price/calculate |
Calculate prices for the submitted order data. |
Workflow
- Read the library's items and master data to build the product selection in the sales application.
- Create the order data from the customer's selection: groups and positions with item numbers, quantities, dimensions, and configuration data.
- Send the order data together with the price library's
libraryIdtoPOST /api/price/calculate. - Check
errorsandwarnings. If there are no errors, use the prices inorderData. - Import the priced order if the customer confirms it. See Use Case: Import Orders.
var priceClient = new PriceClient(subscriptionId, authorizationKey);
var request = new PriceRequestData
{
LibraryId = "MyPriceLibrary",
OrderData = new OrderDetails
{
OrderName = "Quotation 2026-118",
CustomerNumber = "462642",
Items =
[
new Group
{
Name = "Kitchen",
Items =
[
new Position { Name = "P 01", ArticleNumber = "67839", Quantity = 2, Width = 600, Height = 720, Depth = 560 }
]
}
]
}
};
var result = await priceClient.CalculatePrice(request);
if (result.Errors.Count > 0)
{
throw new InvalidOperationException(string.Join(Environment.NewLine, result.Errors));
}
var pricedOrder = result.OrderData;
POST /api/price/calculate
Content-Type: application/json
{
"libraryId": "MyPriceLibrary",
"orderData": {
"orderName": "Quotation 2026-118",
"customerNumber": "462642",
"items": [ ... ]
}
}
200 OK
{
"orderData": { "orderName": "Quotation 2026-118", "items": [ ... ] },
"libraryId": "MyPriceLibrary",
"errors": [],
"warnings": []
}
Option: Read Library Data
Read a library's items and master data to display the assortment and available attributes in the sales application.
GET /api/pos/libraries/MyLibrary/articles
GET /api/pos/libraries/MyLibrary/masterData
GET /api/pos/libraries/MyLibrary/calc.js
Integration Architecture
Call the price calculation from the sales application's backend, not from the browser, because the call requires the subscription credentials. Recalculate the price whenever the configuration changes and before importing an order so the imported order has the current price. The calculation returns HTTP 200 even if it fails: show warnings to the user and treat every entry in errors as a failed calculation.
Benefits
- The same price in every sales channel because all channels use the orderManager price library.
- Pricing rules are maintained in one place.
- Priced orders can be imported directly into orderManager.
API reference: See Endpoints → HOMAG Connect orderManager: Calculate price (
POST /api/price/calculate), Get library items (GET /api/pos/libraries/{libraryId}/articles), Get library master data (GET /api/pos/libraries/{libraryId}/masterData), and Get the calc.js script (GET /api/pos/libraries/{libraryId}/calc.js).
