Skip to content
Last updated

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.

Integration Overview

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.

Customer Integration Process

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 integration process

Key Steps in the Integration Process

  1. 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.

  2. 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 to CustomerChangeNotification and CompanyChangeNotification events, fetches updated data using Norce Commerce Query, and sends it to the ERP.

  3. 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 APIs for Integration

Norce Commerce provides several APIs for system integration:

Customer and Company Entities

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.

Application and Client Uniqueness

Norce Commerce can be configured in two ways:

  1. Application-unique customers/companies:
    The same entity can have different codes in different applications.
  2. Client-unique customers/companies:
    The same entity can create orders across multiple applications.

Integration setup should reflect this configuration.

Importing Customers

To update customers in Norce Commerce, use the ImportCustomers API. This is an asynchronous operation; a job ID is returned for tracking.

Customer Object Details

Important fields:

  • Code: External identifier (ERP/CRM).
  • Id: Norce internal identifier (for Norce use only).
  • EmailAddress: Use as unique identifier if Code 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.

Import Frequency

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.

Importing Companies

To update companies, use the ImportCompanies API. This is also asynchronous and returns a job ID.

Company Object Details

Important fields:

  • Code: External identifier (ERP/CRM).
  • Id: Norce internal identifier (read-only).
  • OrganizationNo: Use as unique identifier if Code 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.

Import Frequency

Most integrations use delta imports (changes only), typically once per day.

Event Types for Integration

Norce Commerce Event provides notifications for changes to customers and companies.

CustomerChangedNotification

CompanyChangedNotification

Further Reading and Examples