Customer Management Service Tutorials

Take a look at the relationships between objects in the Customer Management Service and other resources in the Emporix Commerce Engine. Click the diagram to enlarge it:

Customer Management class diagram

How to set up business customer information

Setting up a business customer's information is a process made up of two steps:

  1. Adding a location.
  2. Adding a legal entity.

Before you start

Make sure you have marked the country in which the company operates as active. You can do it by sending a request to the Updating a country endpoint in the Emporix API Country Service.

Add a location

A location is a physical address where a company operates, such as its headquarters, office, or warehouse. To add a new location, you need to send a request to the Creating a new location endpoint.
Loading...
attention
The id from the response is further referred to as locationId.

Add a legal entity

A legal entity is a representation of a company. To add a new legal entity, you need to send a request to the Creating a new legal entity endpoint and provide the locationId in the request body.
Loading...

How to add a subsidiary

Subsidiaries are companies legally owned or controlled by other companies. In the Emporix Commerce Engine, subsidiaries are structured the same way as regular companies — the only difference is that a subsidiary must have its parent company specified.

Before you start

Make sure you have already finished the How to set up business customer information tutorial.

Retrieve the ID of the parent company

To find out what a company's ID is, you need to send a request to the Retrieving all legal entities endpoint and use the q query parameter to find the desired company.
Loading...
attention
The id from the response is further referred to as parentId.

Add a subsidiary

Subsidiaries are added similarly to their parent companies. To add a new subsidiary, send a request to the Creating a new legal entity endpoint. In the request body, set the type field to SUBSIDIARY and provide the parentId.
Loading...

How to add an employee to a company's customer group

You can offer personalized pricing to your business customers' employees by adding them to company customer groups. A company customer group is automatically created when that company's data is added to the system.

info

When added to a subsidiary’s customer group, the employee is also automatically assigned to customer groups of all the subsidiary’s parent companies.

Before you start

Make sure the following requirements are fulfilled:

attention

A customer account can be created by the employee themselves or from your Emporix tenant's side. For more information, check out the following endpoints in the Emporix API Reference:

Retrieve the ID of the company

To find out what a company's ID is, you need to send a request to the Retrieving all legal entities endpoint and use the q query parameter to find the desired company.
Loading...
attention
The id from the response is further referred to as legalEntityId.

Retrieve the employee's customer ID

To retrieve an employee's customer ID, you need to send a request to the Retrieving a list of customers endpoint and use the q query parameter. For example, you can search for a customer with a specific email address with q=contactEmail:employeeEmail.
Loading...
attention
The id from the response is further referred to as customerId.

Assign the contact to the company

A contact represents an employee of one or more business customers. To assign a contact to a legal entity (in this case, the desired company), you need to send a request to the Creating a new contact assignment endpoint and provide legalEntityId and customerId in the request body.
Loading...

Once desired employees are added to appropriate customer groups, you can — for example — create personalized price lists for them. For instructions, check out How to configure a price list in the Price Service guide.