Customer Management
How to work with B2C and B2B customers in Omnium — data model, API patterns, search, privacy, and integration.
Overview
Omnium manages two distinct customer types: private customers (B2C) for individual consumers, and business customers (B2B) for companies and organizations. Both types share a common foundation — addresses, external IDs, consents, tags, custom properties — but differ in the features built on top.
| Private Customer (B2C) | Business Customer (B2B) | |
|---|---|---|
| Identity | First name + last name | Company name |
| Contacts | Single person | Multiple contact persons (up to 1,000) |
| Financial | Bonus points (loyalty) | Credit management (balance, limit, per market) |
| Product access | Shared catalog | Restricted assortment per customer |
| Discounts | Coupons, customer club promotions | Price groups, discount groups |
| Procurement | N/A | PunchOut / OCI / cXML support |
| Privacy | GDPR anonymization | Standard deletion |
| Loyalty | Customer club membership, tiers, points | N/A |
Customer Data Model
Common Fields
Every customer — B2C and B2B — has the following:
| Field | Description |
|---|---|
customerId | Unique identifier (GUID by default, or email/phone if configured) |
customerNumber | Human-readable number (auto-generated or imported) |
email, phone | Primary contact details |
address | Primary address |
addresses | Additional addresses (up to 200), each with a purpose (shipping, billing, invoice) |
storeIds | Stores this customer belongs to |
marketId | Market this customer belongs to |
preferredLanguage, preferredCurrency | Communication and pricing preferences |
customerGroups | Groups for segmentation and targeting |
externalIds | Mappings to external systems (ERP, e-commerce, CRM) |
consents | Active consent records (marketing, newsletter, etc.) |
tags | Searchable labels for categorization |
properties | Custom key-value pairs for extending the data model |
isInactive | Soft-delete flag |
isGlobal | Whether the customer is visible across all stores |
For the full model definition, see the Swagger documentation: Private Customer model and Business Customer model.
Private Customer (B2C) Fields
In addition to the common fields:
| Field | Description |
|---|---|
firstName, lastName | Personal name |
gender | Optional gender |
birthDate | Date of birth (used for birthday promotions) |
bonusPoints | Current loyalty point balance |
isCustomerClubMember | Whether the customer has an active club membership |
discountCoupons | Assigned discount coupons |
Business Customer (B2B) Fields
In addition to the common fields:
| Field | Description |
|---|---|
name | Company name |
taxId | VAT or registration number |
contacts | List of contact persons (up to 1,000), each with name, email, phone, roles, and address |
businessCustomerCredit | Credit management per market (balance, limit, remaining, denied status) |
discountGroups | Assigned discount groups |
priceGroups | Assigned price groups |
isAssortmentRestricted | Whether the customer sees a restricted product catalog |
assortmentCodes | Codes defining which product categories are visible |
punchOutDomain | e-Procurement domain for OCI/cXML integration |
API Endpoints
Omnium provides three sets of customer endpoints. Use the type-specific endpoints when you know the customer type; use the generic endpoint for operations that work across both types.
Generic Customers
Base URL: /api/customers
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/customers/{id} | Get a customer by ID (returns either type) |
| POST | /api/customers | Add a customer |
| POST | /api/customers/Update | Full update |
| PATCH | /api/customers/Patch | Partial update (only supplied fields change) |
| DELETE | /api/customers/{id} | Anonymize (GDPR) |
| POST | /api/customers/Search | Search across all customers |
| POST | /api/customers/AddMany | Bulk add (max 100) |
| PUT | /api/customers/AddOrUpdateMany | Bulk add or update (max 100) |
Private Customers (B2C)
Base URL: /api/privatecustomers
All generic operations, plus:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/privatecustomers/{id}/club | Get customer club membership |
| POST | /api/privatecustomers/Scroll | Scroll through large result sets |
| GET | /api/privatecustomers/Scroll/{scrollId} | Continue scrolling |
Business Customers (B2B)
Base URL: /api/businesscustomers
All generic operations, plus:
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/businesscustomers/{id}/AddContactPerson | Add a contact person |
| POST | /api/businesscustomers/{id}/UpdateContactPerson | Update a contact person |
| DELETE | /api/businesscustomers/{id}/RemoveContactPerson | Remove a contact person |
| GET | /api/businesscustomers/GetBusinessCustomerByContactEmail?email=... | Find company by contact email |
| GET | /api/businesscustomers/GetBusinessCustomerByContactPhone?phoneNumber=... | Find company by contact phone |
| GET | /api/businesscustomers/{id}/SalesLimitations | Get purchase restrictions |
| POST | /api/businesscustomers/Scroll | Scroll through large result sets |
For complete endpoint details, see the Swagger documentation.
Creating Customers
From the API
Create a private customer:
Create a business customer with a contact person:
Automatically from Orders
When an order arrives from your e-commerce platform, the Get or Create Customer workflow step can automatically create or update the customer record based on the order data. This behavior is configurable — see Customer creation control for the settings.
Searching Customers
The Search endpoint supports filtering, sorting, and pagination:
Available Filters
| Filter | Description |
|---|---|
query | Free-text search across name, email, phone, and address fields |
email, phone, taxId | Exact match on contact fields |
customerId, customerIds, customerNumbers | Look up specific customers |
storeIds, marketIds | Filter by store or market |
customerGroups | Filter by group membership |
tags, excludedTags | Filter by tags |
externalIds | Filter by external system IDs |
consentTypes | Find customers with specific consents |
isInactive, isGlobal, isCustomerClubMember | Status filters |
createdFrom, createdTo, modifiedFrom, modifiedTo | Date range filters |
postalCodeFrom, postalCodeTo | Postal code range |
properties | Filter by custom property values |
Scrolling for Large Datasets
For bulk exports or migrations, use the Scroll endpoint instead of paginated Search. Scroll handles large volumes efficiently by maintaining a cursor:
The response includes a scrollId. Use it to retrieve the next batch:
Continue until no more results are returned. See the scrolling guide for details.
Delta Queries
To retrieve only customers that changed since your last sync:
See the delta queries guide for best practices.
Updating Customers
Full Update
Replaces the entire customer record. You must send all fields — omitted fields are reset to their defaults.
Partial Update (PATCH)
Only the fields you include are changed. Other fields are left untouched.
Use PATCH for most updates. It's safer — you won't accidentally clear fields you didn't intend to change. See the PATCH patterns section in the API Developer Guide for details on how properties and lists are merged.
Bulk Operations
Add or update up to 100 customers in a single request:
Customers that already exist (matched by ID) are updated; new customers are created.
Customer Groups
Customer groups let you organize customers for targeted promotions, pricing, or reporting.
Assign a customer to a group by including the group reference in the customer's customerGroups list:
External IDs and Integration
Customers can be linked to multiple external systems using the externalIds field. Each entry has a source (system name) and value (ID in that system):
External IDs are used for:
- Import matching — When importing customers, Omnium uses external IDs to find existing records and avoid duplicates
- Cross-system lookups — Search for a customer by their ID in another system
- Export enrichment — Workflow steps can copy external IDs from the customer to the order for downstream integrations
You can highlight specific external ID types in the admin UI — see the configuration guide for details.
Addresses
Customers can have a primary address and a list of additional addresses. Each address has a purpose (or multiple purposes) that indicates how it's used:
| Purpose | Description |
|---|---|
| Shipping | Where goods are delivered |
| Billing | Where invoices are sent |
| Invoice | Formal invoice address |
| Home | Residential address |
An address includes: line1, line2, city, postalCode, countryCode, countryName, state, phone, email, name (label), and optional externalId for integration mapping.
B2B Contact Persons
Business customers can have multiple contact persons, each with their own role, contact details, and address. This models real-world organizations where different people handle purchasing, finance, and receiving.
Adding a Contact Person
Looking Up Companies by Contact
Find the business customer associated with a specific person:
B2B Credit Management
Business customers can have credit limits tracked per market:
When isCreditDenied is true, the customer is blocked from placing orders on credit in that market.
B2B Assortment Restrictions
Business customers can have restricted product catalogs, so they only see the products relevant to their contract:
- Set
isAssortmentRestrictedtotrue - Assign
assortmentCodesthat map to product categories
For detailed configuration, see Customer categories and assortment.
Customer Relations (B2B)
Business customers can be linked to each other using relations. Common patterns:
- Invoice receiver — Company A orders, Company B receives the invoice
- Goods receiver — Company A orders, Company C receives the delivery
Relations are configured in the customer configuration and assigned on the customer record via the customerRelations field.
Customer Merge and Deduplication
When duplicate customer records exist, you can merge them using the privacy endpoint:
What happens during a merge:
- All orders, loyalty points, comments, and attachments from the source customer are moved to the target customer
- The source customer record is deleted
- An event is logged for audit purposes
For batch merges (up to 50 at a time):
Business customers can also be merged using ChangeBusinessCustomerId.
Privacy and Anonymization (GDPR)
When a customer exercises their right to be forgotten, anonymize their data:
This:
- Removes all personal data (name, email, phone, addresses)
- Marks the customer as anonymized
- Preserves order records for business continuity (without personal data)
- Is irreversible
Anonymization is available for private customers. For business customers, use standard deletion via DELETE /api/businesscustomers/{id}.
Consents
Omnium tracks customer consents for GDPR compliance and marketing preferences. Each consent records what was agreed to, when, and through which channel:
Consent types are configured per tenant — see the consent management section in the configuration guide. Changes to consents are tracked in consentHistory for audit purposes.
Customer Club (Loyalty)
Omnium includes a built-in loyalty program with bonus points, tiers, and automated notifications. For setup and API usage, see the dedicated Customer Club guide.
Key concepts:
- Points are earned on purchases and can be used as payment via the BonusPoints payment provider
- Tiers segment members by spending level (e.g., Bronze, Silver, Gold)
- Birthday and sign-up points reward engagement milestones
- Points expire after a configurable number of days
- Workflow steps handle point calculation, earning, and cancellation throughout the order lifecycle
Integration with Orders
Customers and orders are connected through the order's customerId field. When an order is processed, workflow steps can:
- Create or find the customer — The "Get or Create Customer" step matches the order's email/phone to an existing customer or creates a new one
- Enrich the order — Copy customer properties, external IDs, or payment terms onto the order for downstream processing
- Update the customer — Sync address changes from the order back to the customer record (if configured)
- Calculate loyalty points — Award bonus points based on the order total
Related Documentation
| Topic | Link |
|---|---|
| Full API model reference | Swagger — Customers |
| Configuration settings | Customer Configuration |
| Customer club / loyalty | Customer Club |
| Product assortment for B2B | Customer Categories |
| Searching and scrolling | Scrolling Guide |
| Delta / change tracking | Delta Queries |
| CRM integration (Voyado) | Voyado Connector |
