CX Works

CX Works brings the most relevant leading practices to you.
It is a single portal of curated, field-tested and SAP-verified expertise for SAP Customer Experience solutions

Data Flow Between Customer Data Cloud and Commerce Cloud for B2C

10 min read

Data flow between SAP Customer Data Cloud (CDC) and SAP Commerce Cloud for B2C

Table of Contents


To integrate SAP Customer Data Cloud (CDC) to SAP Commerce Cloud, there are a very convenient build-in extension in SAP Commerce Cloud that can help you accomplish the implantation easily instead of calling the SAP Customer Data Cloud API directly by yourself.

Although the standard SAP Commerce Cloud built-in extension is available to make the connection between SAP Customer Data Cloud and SAP Commerce Cloud, the success of the implementation relies heavily on the right understanding of the user journeys and data flows.

This article can help you understand the data flow deeply between SAP Customer Data Cloud and SAP Commerce Cloud in the B2C scene.

Although B2B has a different user journeys with B2C, but the data flow is similar with B2C use case which you can make a reference.

We will introduce the data flow below through the whole user journeys of shopping in SAP Commerce Cloud.

This article was released during Q4 2020. Feature updates thereafter may not be reflected.

User journeys

Before reviewing the data flow, let us look into the users' shopping journey.

The B2C onboarding is typically done via user self-registration and making purchases without any preliminary approval.

A typical user journey for shopping online is as below:

  1. Register

    • Customer visits the e-commerce site and provides profile details (email, username, address, etc.) and consents to register a new account

  2. Login

    • Customer logs in to the e-commerce site with their email and password
  3. Update profile

    • After the customer logs in, they can update their profile (address, phone number) as needed

  4. Shopping

    • The customer chooses their items they like, inputs their order information and submits the order. This includes putting in a new shipping address

  5. Delete membership (Withdrawal)

    • If the customer will no longer use the site and would like their data removed, they can submit a request to delete their account


Firstly, let us clarify the data model before talking about the data flow.

Regarding the user journeys above:

  • SAP CDC has the master member profile data and plays the role of managing account authentication and lifecycles
  • SAP Commerce Cloud only needs part of the member profile and plays the role of managing products and purchases

We can assume 2 database models as below, where bolded fields are required.

Accounts Master (SAP Customer Data Cloud):

  • UID
  • Email
  • Phone Number
  • User Name
  • Address
  • Consent

 Shopping transaction(SAP Commerce Cloud):

  • OrderID
  • User ID(UID)
  • User Name
  • Ship Address
  • Product
  • Payment
  • Amount

Besides the 2 main databases, as SAP Commerce Cloud also needs to manage its own internal account, we also need to have a user master that only storage the key account information in commerce cloud and sync it with Customer Data Cloud in near real-time.

 User master (Commerce Cloud):

  • User ID(UID)
  • GyUID
  • User Name
  • Address

By default, the following required SAP Commerce Cloud fields are mapped from SAP Customer Data Cloud to SAP Commerce Cloud for registration, login, and profile update.

SAP Commerce Cloud

SAP Customer Data Cloud


Email address

${first name} + SEPARATOR(one Space) + ${last name}


UID in Customer Data Cloud

Map additional necessary fields following the instructions in this link: Setting Guide

The relationship between the above databases is as below:

The data in the mapped fields (above) is synced automatically when a user registers, every time they login, or they update their profile (regardless of whether it is being updated via the end-user or a back office user). You can configure the way the synchronization will be handled in your Gigya Configuration.  

Based on the data model above, we can dive the data flow between SAP CDC and CMS through user journeys as below:

  1. Register Data flow

    • Customers register through SAP Customer Data Cloud screen-set that embedded to SAP Commerce Cloud.
    • When the customer clicks ‘Register/Login’ button on commerce site, ‘GigyaRaasComponent’ will show configured register/login screen-set of SAP Customer Data Cloud on the commerce site screen using JavaScript. After the customer registers on the screen-set, SAP Customer Data Cloud will send a POST request to register a user in SAP Commerce Cloud. ‘GigyaRaasLoginController’ will process the request. Because SAP Commerce Cloud needs Customer item in its own database for providing functionalities such as purchase order, personalization and so on. It will validate the request first, then add a Customer item in SAP Commerce Cloud.

  2. Login Data flow:

    • After the authentication succeed in Customer Data Cloud, Commerce Cloud also need to create the login session in its server to keep user’s login status.

    • Like registration, ‘GigyaRaasComponent’ will show Register/Login screen-set of SAP Customer Data Cloud on commerce site screen using JavaScript when customer clicks ‘Register/Login’ button on commerce site. After customer would be authenticated on SAP Customer Data Cloud, it will send a POST request to proceed auto login on commerce site. ‘GigyaRaasLoginController’ will get the POST request and process. At first, it will validate the request whether it is valid SAP Customer Data Cloud request or not. If the request is valid, it will try to get Customer item from database of SAP Commerce Cloud and process login on commerce site with ‘DefaultGigyaAutoLoginStrategy’.

    •  If it is failed to retrieve Customer model from the database, ‘GigyaLoginFacade’ will create a new Customer item in order to proceed login procedure.

  3. Profile Update:

    • Profile updated by end-user through SAP Customer Data Cloud screen-set.
      1. Customers can update their own profile in SAP Customer Data Cloud. If the customer clicks ‘Update profile’ on the commerce site, ‘GigyaAccountPageController’ will display profile edit page using the screen set from SAP Customer Data Cloud. ‘Default-ProfileUpdate’ screen-set of SAP Customer Data Cloud will be shown.

        In this scenario, after the customer updates the profile on the SAP Customer Data Cloud screen-set, it will send a POST request to SAP Commerce Cloud to request update profile which has been stored in database of SAP Commerce Cloud. ‘GigyaRaasLoginController’ will process this POST request using ‘GigyaLoginFacade’.

    • The profile will be updated through the SAP Commerce Cloud backoffice.
      • Second scenario of the customer profile update is that business operator will update customer’s profile on the backoffice of SAP Commerce Cloud. If the operator changes the customer’s profile, it will be sent to SAP Customer Data Cloud on server-side.

        When the operator updates customer’s profile and fire ‘SAVE’ button on backoffice, ‘GigyaUserValidateInterceptor’ will check necessary of data synchronization. If it is needed to synchronize the modification, the interceptor will send data to SAP Customer Data Cloud using RAW API of it.

        Per the default configuration, if value of ‘Customer.uid’ or ‘’ is changed, SAP Commerce Cloud will send data to SAP Customer Data Cloud. It is configured at ‘gigya.mandatory.attributes.list’ property in ‘gigyaservices/’.

  4. Shopping Data flow:

    • Please note that this shipping address can be different from the profile address that the user first registered with

    • By default, transactional data which has been created in the checkout process and order management process will NOT be synchronized to SAP Customer Data Cloud. This data (including shipping address, and payment address) will only be stored in database of SAP Commerce Cloud


From the data flow between SAP Customer Data Cloud and SAP Commerce Cloud, we can see the key point as below:

  • SAP Customer Data Cloud hosts all account profile data and only syncs part of key items to SAP Commerce Cloud
  • After the configuration data mapping, the data sync function will help you sync the key account items automatically between SAP Customer Data Cloud and SAP Commerce Cloud
  • After the end-user authenticates with SAP Customer Data Cloud, SAP Commerce Cloud will also need to create a login session in its backend server to keep the user logged in
  • During the shopping flow, after user login, all the shopping data include adding new shipping address is processed within SAP Commerce Cloud and will not sync it to SAP Customer Data Cloud

By understanding the data flow for each step of user journey, we believe you can more effectively perform the integration between SAP Customer Data Cloud and SAP Commerce .

For more information please visit our Developer's Guide.

To access all our community or out-of-the-box product documentation, please check out our List of Online Resources.