Customers overview

Ask about this Page
Copy for AI
View as Markdown

Overview of the concepts related to customers purchasing products offered in your Project.

A Customer is a person (uniquely identified by an email address) purchasing Products. For this, the Carts and Orders containing the Products are associated to one Customer. Furthermore, Customers can provide Reviews for Products.

Customers represent data about a specific customer in your Project. In addition to the relationship to other resources, such as Carts and Orders, the Customer contains information about their name, email address, any addresses associated with them, and more.

Typically, customers self-register through your storefront, often including email verification.

Especially in B2B scenarios, Products are often purchased by individuals representing a business or a department of a business. These scenarios are supported with Business Units for Companies and their Divisions.
If your Project is structured with Stores, you can manage Customers that can purchase Products across all Stores or in particular Stores only. Furthermore, Stores allow you to offer Products for customer-specific prices.

Customer uniqueness

Customers are identified by their email address that must be unique across the Project. Emails are treated as case-insensitive in some API methods. You can have Customers globally in the Project or only for specific Stores.

Email case-insensitivity

The API preserves letter case when storing a customer's email. However, during the following operations, email addresses are treated as case-insensitive:
For example: if a customer signs up with Email@example.com...
  • Authenticating with email@example.com or EMAIL@example.com succeeds
  • Sign-up attempts with email@example.com or EMAIL@example.com fail unless Stores are in use
  • Generating a password reset token with email@example.com or EMAIL@example.com succeeds
For how to query Customers by email regardless of letter case, see Customers APIs overview.

Global versus Store-specific Customers

Customers can either be global or Store-specific:

  • Global Customers are unique to a Project. Since global Customers are not assigned to any particular Store, they have broad access to all Stores within the Project. A global Customer cannot create an account in a Store using the same email address.
  • Store-specific Customers are unique to a specific Store in your Project. Store-specific Customers can create an account in another Store using the same email address.

Store-specific Customers are unique in a specific Store and only have access to resources inside that Store.

Example

For example, if you do the following:

  1. Register email@example.com as a global Customer.
  2. Try to register email@example.com in a specific Store.

The second registration fails because as a global Customer the same email address cannot be used to create an account in a specific Store.

Similarly, if you register email@example.com in a Store in a Project, then attempt to register email@example.com globally, the second attempt to register fails.

We recommend deciding whether to create Customers per-store or globally during your initial Project configuration.

For how the API represents global and Store-specific Customers and which authorization flows apply to them, see Customers APIs overview.

Customer authentication (sign-in)

During the sign-in process, Customers may be assigned resources created prior to the sign-in. Customers can have one or more Carts assigned from an earlier session.

For how the API authenticates Customers and assigns anonymous Carts and other resources during sign-in, see Customers APIs overview.

Cart merge during sign-in and sign-up

A Customer with an active Cart may continue shopping in an anonymous session. The API provides the capability to merge the anonymous Cart with the Customer's active Cart when the Customer signs in or signs up at the storefront.

For detailed information about the merging process, including merge criteria and behavior, see Merge a Cart on the Carts and Orders overview page.
For when the API applies Cart merge and how to deactivate it, see Customers APIs overview.
Learn how to manage the complete Customer authentication lifecycle with commercetools in our self-paced Manage sign-ups and sign-ins module.

Customer permissions

Customer information can contain sensitive data, therefore you need to ensure that a customer can only access their own personal information.

Resources that may contain or refer to customer data:

  • Business Unit B2B
  • Cart
  • Customer
  • Custom Object
  • Discount Code
  • Message
  • Order
  • Order Edit
  • Payment
  • Quote
  • Quote Request
  • Review
  • Shopping List
  • Staged Quote
For the API scopes that give access to customer data, see Customers APIs overview. For how Business Units represent a company's structure and the access rights of its members, see Business Units and Associates overview.

Customer-specific products, prices, and discounts

Several ways are available to specify customer-specific prices. Depending on your customer base, Customer Groups are one approach to model group-specific prices. If you negotiate prices with each B2B customer individually, the Business Units approach might be more scalable. For how to model company-specific products, prices, and discounts with Business Units, see Business Units and Associates overview.

Customer Groups

Use Customer Groups to offer specific Customers the same prices or promotions. For example, you can give all your gold members a discount on a specific product.

A Customer can be assigned to one or more Customer Groups. You can assign Customer Groups to a Business Unit.

For how to assign Customer Groups to Customers and Business Units with the API, and the limits that apply, see Customers APIs overview.