Merge Shopper Profiles

Commerce Cloud provides multiple ways for customers to implement shopper login functionality. Today, shoppers can log in via:

  1. SFRA/Site Genesis based login for shoppers registered with B2C Commerce (first-party IDP).
  2. Headless login via SLAS for shoppers registered with B2C Commerce or a third-party IDP.
  3. SFRA/Site Genesis based login for shoppers registered via B2C Commerce third-party IDP, configuring external OAuth2.0 providers.

Shoppers having the same login ID across use cases 1 and 2 can now be merged to one single customer/shopper record. This enables the shoppers logging with SLAS-based login to preserve (or merge with) their existing baskets, orders, and wishlists.

Currently, we don’t support merging logins between B2C Commerce’s external OAuth2.0 providers and SLAS federating to third-party IDPs (that is, we don’t support merges between 2 and 3).

For details on configuring IDP with loginMergeClaims, see registerIdentityProvider.

John Doe is a registered shopper with Northern Trail Outfitters SFRA app. John’s login ID is john.doe@gmail.com. Northern Trail Outfitters implements a federated login to the third-party IDP (for example, Google) for their new headless app.

Seller Action: Configure Google IDP within SLAS with “loginMergeClaims” : “email”.

Shopper Merge 1

As you can see, when John logs in with SLAS, the external profile that is created is linked to John’s existing customer profile in B2C Commerce and John is able to get the same customer ID, merging his basket from before.

When a B2C Commerce profile exists as well as an externally authenticated social profile (Facebook, Google):

  • If both profiles exist before configuring a loginMergeClaims and before logging in through SLAS, no merge is performed.
  • If both profiles exist and login through SLAS occurs with a third-party login with loginMergeClaims turned on, the account that was created last is merged.

John Doe is not a registered shopper with Northern Trail Outfitters SFRA app. John’s login ID is `john.doe@gmail.com``. Northern Trail Outfitters wants to implement a federated login to 2 or more third-party IDPs (for example, Google and Facebook) for their new headless app.

Seller Action : Configure Google & Facebook IDPs within SLAS with “loginMergeClaims” : “email”.

Shopper Merge 2

As you can see, when John logs in with SLAS with Google and Facebook for the same app, the two logins map to the same customer profile in B2C Commerce and John is able to get the same customer ID, merging the baskets between the two sessions.

John Doe is not a registered shopper with Northern Trail Outfitters SFRA app, and logs in with either his email or his phone number. Northern Trail Outfitters wants to implement a federated login to 2 or more third-party IDPs (for example, Google or Facebook), providing shoppers flexibility in logging in with their preferred IDP for their new headless app.

Seller Action: Configure Google or Facebook IDP within SLAS with “loginMergeClaims” : “email, phone”.

Shopper Merge 3

As you can see, when John logs in with SLAS with Facebook first with his email and then with his phone number, the two logins map to the same customer profile in B2C Commerce, and John is able to get the same customer ID, resulting in merging the baskets between the two sessions.