This page describes best practices for integrating customer and company data between Norce Commerce and external systems such as ERP or CRM. It covers integration patterns, API usage, and recommended approaches for handling customer and company entities.
Integrating customers and companies between Norce Commerce and other systems can vary depending on business needs. The following best practices assume:
- The client sells to both consumers and businesses.
- Order history is synchronized from the ERP to ecommerce applications.
- End customers can log in and update their information via a "My Pages" site connected to Norce Commerce.
The diagram below illustrates the customer integration process.
Image description: A flowchart showing the creation and synchronization of customers and companies between Norce Commerce and ERP systems, including order processing and scheduled updates.
Customer/Company Creation:
Customers and companies are created in Norce Commerce when their first order is received. During order processing, the integration checks for an external code (e.g., ERP customer number). If not present, the customer or company is created in the ERP, and the ERP code is returned to Norce Commerce using the ImportCustomers or ImportCompanies API methods.Updating Customer/Company Information:
When a customer or company with an existing ERP code updates their information in the frontend, changes can be sent to the ERP. The integration listens toCustomerChangeNotification
andCompanyChangeNotification
events, fetches updated data using Norce Commerce Query, and sends it to the ERP.Scheduled Synchronization:
As a fail-safe, a scheduled job fetches all customers from the ERP and updates the customer/company code in Norce Commerce. The integration calls ImportCustomers and ImportCompanies, sending minimal information and the ERP code.
Norce Commerce provides several APIs for system integration:
Norce Commerce Connect:
Used for all system integrations. See Calling Norce Commerce Connect.Norce Commerce Query:
Used to look up and fetch data. See Calling Norce Commerce Query.Norce Commerce Event:
Used for event-driven integrations. See Using Norce Commerce Event.
In Norce Commerce, Customer (individuals) and Company (organizations) are separate entities with relationships (e.g., organization-contacts). If your ERP does not separate them, the integration must handle mapping.
- Use the
Code
field in Norce Commerce as the external identifier (typically the ERP customer number or CRM ID). - The
Id
field is Norce's internal identifier and should only be used for matching back to Norce.
Norce Commerce can be configured in two ways:
- Application-unique customers/companies:
The same entity can have different codes in different applications. - Client-unique customers/companies:
The same entity can create orders across multiple applications.
Integration setup should reflect this configuration.
To update customers in Norce Commerce, use the ImportCustomers API. This is an asynchronous operation; a job ID is returned for tracking.
- See System integration patterns for more on asynchronous integration.
Important fields:
Code
: External identifier (ERP/CRM).Id
: Norce internal identifier (for Norce use only).EmailAddress
: Use as unique identifier ifCode
is not set.ApplicationKey
: Relates customer to an application; if null, shared across all applications.
Important relationships:
Accounts
: For login functionality (one per application).Companies
: If the customer is a contact for an organization.PriceLists
: If the customer has custom prices or assortments.
Most integrations use delta imports (changes only), typically once per day. Full imports are rare.
Note: GDPR and anonymization features can automatically scramble customer data. Consider this when setting up integration.
To update companies, use the ImportCompanies API. This is also asynchronous and returns a job ID.
- See System integration patterns for more on asynchronous integration.
Important fields:
Code
: External identifier (ERP/CRM).Id
: Norce internal identifier (read-only).OrganizationNo
: Use as unique identifier ifCode
is not set.
Important relationships:
Customers
: List of contacts with full information.Contacts
: List of contacts by code (customer must exist in Norce).PriceLists
: For company-specific prices or assortments.
Most integrations use delta imports (changes only), typically once per day.
Norce Commerce Event provides notifications for changes to customers and companies.
- Notifies when a customer is changed.
- Listen to this event, fetch the customer using Norce Commerce Query, and update external systems.
- Administering Event types
- Customer entity in Query API
- Notifies when a company is changed.
- Listen to this event, fetch the company using Norce Commerce Query, and update external systems.
- Administering Event types
- Company entity in Query API
- Norce Commerce Query:
- Norce Commerce Event:
- Norce Commerce Connect:
- Integration Examples: