Customers overview

Ask about this Page
Copy for AI
View as Markdown

Learn how customers sign up, sign in, and are grouped and found in your Project.

Customers are the people who buy from a business. A Customer account holds a person's details and addresses and connects them to their Carts and Orders. A business uses it to recognize its customers and to offer specific customers their own Prices and promotions. This area covers how customers sign up and sign in, how email addresses keep accounts unique, how Customers work across Stores and for B2B buyers, and how you group Customers and find them.

Customer service teams, merchandisers, and storefront developers typically work with Customers, either in the Merchant Center or with the APIs:

Key concepts

Customer

A Customer is a person who buys Products from a business. A Customer account holds the customer's name, email address, preferred language, and addresses. It can also hold a customer number, which identifies the Customer in a human-readable way in emails, invoices, and other correspondence, an external ID for systems such as customer relationship management (CRM) or enterprise resource planning (ERP), and a company name and VAT ID. The Carts and Orders that contain the Products a customer buys are associated with one Customer. Customers can also write Reviews for Products.
Typically, customers register themselves in your storefront. A Customer isn't a company. Especially in B2B scenarios, individuals buy on behalf of a business or a department of a business, and Business Units represent these companies and their Divisions, including the structure of a company and the access rights of its members.

For example, a customer who signs up at a fashion store gets a Customer account with an email address and a shipping address. The Customer's Carts and Orders, and the Reviews they write, are connected to that account.

Customer uniqueness

A business identifies each Customer by their email address. The email address is the mandatory unique identifier of a Customer. It must be unique across the Project. If a Customer is specific to a Store, it must be unique within that Store. For how this works with Stores, see Global versus Store-specific Customers.

Email case-insensitivity

commercetools stores an email address with the letter case that the customer entered. When a customer signs up, signs in, or requests a password reset, commercetools ignores the letter case of the email address.

For example, if a customer signs up with Email@example.com:
  • Signing in with email@example.com or EMAIL@example.com succeeds.
  • A sign-up attempt with email@example.com or EMAIL@example.com fails, unless the Project uses Stores.
  • Requesting a password reset with email@example.com or EMAIL@example.com succeeds.

Global versus Store-specific Customers

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. Each Customer is either global or Store-specific:
  • A global Customer isn't assigned to a Store and is unique to the Project. A global Customer has broad access to all Stores in the Project and can be associated with Carts and Orders in a Store or without a Store. A global Customer can't create an account in a Store with the same email address.
  • A Store-specific Customer is assigned to one or more Stores and is unique in its Store. A Store-specific Customer can create an account in another Store with the same email address. It only has access to resources inside its Stores, and it can only be associated with Carts and Orders in those Stores.
Decide whether to create Customers per Store or globally during your initial Project configuration. A global Customer's email address can't be used for an account in a Store, and the reverse. For a worked example, see Choose global or Store-specific Customers.

Customer addresses

A Customer account can hold several addresses. Each address is stored once and can serve several purposes. One address can be both a shipping address and a billing address, and you can mark one shipping address and one billing address as the default.

The country in the shipping address determines the eligible Shipping Methods, the delivery costs, and the Tax Rate of Line Items. Every address needs a country, because the tax calculation on the Cart requires it.

Customer authentication (sign-in)

Customers sign up for an account and sign in to it, typically in your storefront. A Customer signs in with a password or through an external service.

A visitor can also shop without an account, in an anonymous session. This is called guest checkout, and the visitor's items are held in an anonymous Cart. When the visitor signs up or signs in, commercetools can assign the resources created before the sign-in to the Customer. If the storefront provides the anonymous ID of the session, all Carts, Orders, Shopping Lists, and Payments from that session move to the Customer. If it provides only an anonymous Cart, only that Cart moves. A Customer can also have one or more Carts from an earlier session.
Learn how to manage the complete Customer authentication lifecycle with commercetools in the self-paced Manage sign-ups and sign-ins module.

Cart merge during sign-in and sign-up

A Customer who already has an active Cart can continue shopping in an anonymous session. When the Customer signs in or signs up at the storefront, commercetools can merge the anonymous Cart with the Customer's active Cart, so the Customer doesn't lose the selected items. For the merge criteria and behavior, see Merge a Cart.

Cart merge doesn't apply automatically to Customers who sign in through an external service.

Customer email verification

Customer registration often includes email verification. By default, a new Customer's email address is unverified. A Customer can also be created with an email address that is already verified. The storefront sends the Customer a link by email, and the Customer verifies the address with that link. Updating a Customer's email address makes it unverified again, even if the address stays the same. The platform doesn't restrict a Customer based on email verification. A business decides what to do with the status.

Customer password reset

A Customer who forgets their password resets it with a link that the storefront sends by email. After a reset, earlier reset links stop working. Access from earlier password-based sign-ins and subsequent renewals is withdrawn, although not instantly. commercetools encrypts passwords and never displays them.

In the Merchant Center, you can reset a Customer's password during the development phase. In a production environment, Customer passwords aren't reset manually. The storefront provides the reset functionality instead.

Customer permissions

Customer information can contain sensitive data, so make sure that a customer can only access their own personal information. A Customer's data may appear in account details, shopping records, payment records, reviews, promotions, and related records such as offers and requests. For B2B buyers, it may also appear in Business Units B2B.
Customers can request access to and deletion of their stored data. For how to handle these requests, see GDPR compliance.

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 belong to one or more Customer Groups. You can also assign Customer Groups to a Business Unit. The Customer Groups of a Customer, or for B2B the Customer Groups of a Business Unit, decide which group Prices are eligible when a Price is selected. For the selection rules, see Fallback logic for multiple Customer Groups.

How the concepts relate

The following diagram shows how a Customer relates to the shopping records, groups, Stores, and companies they're connected to.

A Customer connects the Carts, Orders, and Reviews of one customer to their addresses and to the groups, Stores, and companies they belong to. A Customer that isn't registered in any Store is a global Customer. In B2B scenarios, a Customer can act for a Business Unit as an Associate. Customers and Business Units can both belong to Customer Groups.

Lifecycle and states

Email verification status

The following diagram shows the verification status of a Customer's email address and what changes it.

By default, a new Customer's email address is unverified. A Customer can also be created as verified. An unverified email address becomes verified when the Customer uses the emailed link. Changing the email address makes it unverified again, even if the address stays the same.

Customer Search availability

The following diagram shows when Customer Search is available in a Project.

Customer Search is deactivated by default. When you switch it on or index the Customers in the Merchant Center, commercetools indexes the Customers. Searches fail until the indexing is complete, and then Customer Search is activated. If nobody searches for 30 days, commercetools deactivates it again.

Selection and precedence rules

Cart assignment at sign-in

The following diagram shows which Cart a customer continues with after they sign up or sign in with an anonymous Cart.

If the Customer has no active Cart, the anonymous Cart becomes the Customer's Cart, even if the Customer has other Carts, such as ordered ones. If the Customer already has active Carts, the default is to merge the items of the anonymous Cart into the Customer's most recently modified active Cart, if the two Carts are eligible for a merge. For example, the Carts must use the same currency and, if they belong to a Store or Business Unit, the same one. A business can choose to use the anonymous Cart as the Customer's new active Cart instead. For how a merge combines two Carts, see Merge a Cart.

Common scenarios

Customer-specific products, prices, and discounts

Several ways exist to offer 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 Company-specific products, prices, and discounts.

Choose global or Store-specific Customers

A business that runs several Stores decides whether its Customers are global or Store-specific. The choice decides who can register with an email address:

  • If the business registers email@example.com as a global Customer and then tries to register the same address in a Store, the second registration fails. A global Customer's email address can't be used to create an account in a Store.
  • If the business registers email@example.com in a Store and then tries to register the same address as a global Customer, the second registration fails.
  • If both Customers are Store-specific, the same email address can be used in different Stores.
For the concept and the advice to decide early, see Global versus Store-specific Customers.