--- title: "Use Case: Manage Customers" slug: "datenaustausch-connect-api-uc-om-kunden" updated: 2026-12-02T08:12:53Z published: 2026-12-02T08:12:53Z canonical: "docs.homag.cloud/datenaustausch-connect-api-uc-om-kunden" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.homag.cloud/llms.txt > Use this file to discover all available pages before exploring further. # Use Case: Manage Customers **For:** Customers · Partners · Integrators Customers are maintained in the ERP system and need to be available in orderManager so imported orders can be assigned to the right customer. ## Challenge When customers are created manually in multiple systems, customer numbers, addresses, and contact details drift out of sync, and orders are assigned to the wrong customer or a duplicate customer. ## Solution Customers can be created in orderManager in one of three ways: - **Manually** in the orderManager app. - **Through registration in the sales portal**, when a customer registers for the sales portal. - **Through HOMAG Connect orderManager**, for example, from the ERP system. orderManager assigns the `customerNumber` itself. You cannot set it externally. Pass your system's customer number as `customerNumberExternal`. Store the returned `customerNumber` in your system. You need it to assign orders to the customer and to look up the customer later. > **Note:** Currently, an order import automatically creates a missing customer. This behavior will be removed in a future version. Create customers explicitly to ensure your integration continues to work. | Method | Purpose | | --- | --- | | `GET /api/orderManager/customers` | Without parameters: all customers without additional data. With `customerNumber` or `customerId`: the selected customers, including additional data. | | `POST /api/orderManager/customers` | Create customers. Returns `201 Created` with the created customer, including its assigned `customerNumber`. | | `DELETE /api/orderManager/customers` | Delete one or more customers by `customerNumber` or `customerId`. Returns `204 No Content`. | ## Workflow 1. Check whether your system has already stored the orderManager `customerNumber` for this customer. 2. If not, create the customer with the data from the ERP system and your customer number as `customerNumberExternal`. 3. Store the returned `customerNumber` with the customer in your system. 4. Import orders for this customer using this `customerNumber`. **C#** ```csharp var orderManager = new OrderManagerClient(subscriptionId, authorizationKey); // 1. Check whether the orderManager customer number is already known var customerNumber = erp.GetOrderManagerCustomerNumber("ERP-C-10045"); if (customerNumber == null) {    // 2. Create the customer    var customer = await orderManager.CreateCustomer(new CreateCustomerRequest    {        CustomerNumberExternal = "ERP-C-10045",        CustomerName = "Test Customer",        Email = "test@example.com",        TelephoneNumber = "1234567890",        Locale = Locale.deDE,        ApiAccess = true    });    // 3. Store the assigned customer number    customerNumber = customer.CustomerNumber;    erp.StoreOrderManagerCustomerNumber("ERP-C-10045", customerNumber); } ``` **REST** ```http # 2. Create a customer POST /api/orderManager/customers Content-Type: application/json {  "customerNumberExternal": "ERP-C-10045",  "customerName": "Test Customer",  "email": "test@example.com",  "telephoneNumber": "1234567890",  "locale": "deDE",  "apiAccess": true } 201 Created {  "id": "5b0c2f0e-3c7d-4c49-9a1e-7f1d1e2a9b40",  "customerNumber": "462642",  "customerNumberExternal": "ERP-C-10045",  ... } # Look up the customer later GET /api/orderManager/customers?customerNumber=462642 ``` ## Option: Delete Customers To remove customers that have been deleted in the ERP system, pass one or more orderManager customer numbers or IDs. **C#** ```csharp await orderManager.DeleteCustomersByCustomerNumbers(["462642", "462643"]); ``` **REST** ```http DELETE /api/orderManager/customers?customerNumber=462642&customerNumber=462643 204 No Content ``` ## Integration Architecture Create customers before their first order is imported, or synchronize new customers on a schedule. Maintain the mapping between your customer number (`customerNumberExternal`) and the orderManager `customerNumber` in your system. Use `salesPortalAccess` to give the customer's users access to the sales portal. ## Benefits - Orders are always assigned to the right customer. - No duplicate customers and no manual maintenance in orderManager. - Customer data stays consistent with the ERP system. > **API reference:** See Endpoints → HOMAG Connect orderManager → Orders: [Get customers](https://docs.homag.cloud/apidocs/api-ordermanager-customers-1) ([`GET /api/orderManager/customers`](https://connect.homag.cloud/ordermanager/#v1/tag/homag-connect-ordermanager-orders/GET/api/orderManager/customers)), [Create customers](https://docs.homag.cloud/apidocs/api-ordermanager-customers-2) ([`POST /api/orderManager/customers`](https://connect.homag.cloud/ordermanager/#v1/tag/homag-connect-ordermanager-orders/POST/api/orderManager/customers)), and [Delete customers](https://docs.homag.cloud/apidocs/api-ordermanager-customers) ([`DELETE /api/orderManager/customers`](https://connect.homag.cloud/ordermanager/#v1/tag/homag-connect-ordermanager-orders/DELETE/api/orderManager/customers)).