MuleSoft Accelerator for Retail
Use case 1 - Customer profile sync
Enable a single view of your customer by simplifying connectivity between ERP, CRM, marketing and commerce systems.
Overview
- Description
- Solution definition
- Assumptions and constraints
- High-level architecture
- Sequence diagram
- Processing logic
- Successful outcome
Use case extensions
- Customer profile sync from B2C Commerce
- Customer profile sync from Salesforce
- Customer profile sync from Marketing Cloud
- Customer profile sync from SAP
See also
Description
The Customer Profile Sync use case enables the creation and updates of consistent and connected customer profiles across relevant applications, regardless of where the starting point of the customerβs journey is.
Glossary
Term | Definition |
---|---|
CIM | The Cloud Information Model (CIM) defines a set of standard data structures that can be used as canonical representations of common entities for integrating systems. |
Global Data | A Global Data service provides an accurate, consistent, and complete copy of business data for use by enterprise applications and business partners while also providing a means to link that copy to occurrences in other systems. |
Goals
- Support the creation of customer profiles across relevant applications, inclusive of Salesforce Clouds
- Support the creation of Global Customer ID & ID attribution
- Orchestrate controlled profile updates across designated applications
- Access customer engagement data across applications
Use case considerations
- Customers will possess multiple profiles
- These profiles are system specific and can originate from different systems
- Journeys require that each system identify profiles consistently
- Rich journeys require access to the engagement data attached to profiles
- When a customer is created with an invalid email domain, the customer creation fails in the Salesforce Marketing Cloud
Technical considerations
- Enable the creation of a global customer ID that allows you to retrieve/create IDs regardless of where the customer info is created
- Remove logic, where possible, from MDMs and add it to Mule
- Leave data consolidation, cleansing, standardizing, etc. to MDM
- Solution should work with or without an MDM
- Use CIM as the canonical model
- Build using top applications, inclusive of Salesforce products, but should be built to work with other endpoints as well. For this solution, leverage the following applications:
- Salesforce B2C Commerce (B2C), Salesforce Marketing Cloud, Salesforce Core (Sales, Service, B2B Commerce), SAP ECC, SAP S/4HANA, and MDM (generic)
End-to-end scenarios
- B2C create β Customer creates an account in B2C Commerce Cloud while ordering an item
- B2C update β Customer updates their account, adding a new shipping address, while ordering an item
- Marketing Cloud create β User signs up for a newsletter via MC
- Salesforce create/update β A new customer account or an organization is created, instead of an individual within an account, which needs to be represented in other relevant apps
- Service Cloud update β Order/update/cancel on behalf of: Customer reaches out to the service agent wanting to make a change (change the order, cancel the order, etc.)
- Customer reaches out to service agent about an issue w/ an order
- SAP create β Creation of users via in-store loyalty program signup or physical catalog subscriber data, both stored in SAP
Solution definition
The primary set of use cases covered in the current solution involve the synchronization of customer, individual, and organization profile data between multiple systems.
Goal
Synchronize new and updated customer profiles from different systems to a single golden copy maintained by a Global Party Data service.
Main success scenario
- Receive a new or updated customer profile from an external system
- Attempt to match the input to an existing customer profile in MDM
- If a match is found, update the existing entry in MDM
- If no match is found, create a new entry in MDM
- Publish the update to downstream systems registered for updates
Assumptions and constraints
The following will be used to guide or constrain the solution design at a high level:
- The Cloud Information Model (CIM) will be used as the canonical model for all business types; see the CIM usage guidelines in that asset.
- Global customer identifiers will be maintained in MDM. Wherever possible, these will be assigned as external identifiers in target systems.
- References to the global customer IDs will be reflected in downstream systems using custom properties to avoid conflicts with the usage of other external identifiers (e.g., global party IDs in Salesforce).
- The base Salesforce Account object will be interpreted as an Organization Customers, while the Person Account record type (and all Contacts) will be interpreted as Individual Customers. Customer updates pushed to Salesforce Core will therefore be mapped to Person Account instances for Individuals and regular Accounts for Organizations.
- Updates made in Salesforce Core will be pushed to MuleSoft via the Push Topic technology.
High-level architecture
Sequence diagram
The diagram below illustrates the sequence of processing customer profile updates to MDM from any external system.
Processing logic
The primary handling and orchestration of customer updates will be implemented in the Customers Process API. The logic of this process for customers - which is similar for individuals - can be described as follows:
- Find a matching customer entry in MDM. The lookup will be done by attempting to match on the following criteria, in sequential order, returning once one or more matches have been found:
- Global Identifier (if provided)
- External Identifier (of source system)
- Email Address
- Customer Number (only if multiple matches found at this point)
- If a single match is found:
- Retrieve the existing customer and associated individual
- Apply the incoming updates and save them back to MDM
- If not matched on external identifier, associate it with the customer
- Invoke System APIs to update the downstream systems (see below)
- Associate missing external identifiers back to MDM
- If no match was found, or if multiple matches were found:
- Create new customer and individual entries in MDM
- Associate external identifier of source system with the customer
- Invoke System APIs to update the downstream systems (see below)
- Associate new external identifiers back to MDM
The replication of customer updates to downstream systems follows a similar process as for MDM. The following steps apply to all downstream systems:
- Find a matching customer entry in the target. The lookup will be similar as for MDM but using the following criteria, also in order by priority:
- Primary identifier in target system (if one has been associated)
- Global identifier from MDM
- Email Address
- Customer number
- If a single match is found:
- Retrieve the existing customer/individual and apply the incoming updates
- If not matched on global identifier, associate it with the entity
- Save the updates back to the target system
- If no match was found, or if multiple matches were found:
- Create a new entity in the target system
- Associate the global identifier with the new entity
- Report the system identifier of the new entity to the parent process
The process will be similar for systems (e.g., Marketing Cloud) that publish updates to individuals (parties) instead of customers (party roles). In this case, external identifiers will be associated at the party level instead of the party role level.
Successful outcome
After successfully completing the update processing for all target systems, the following conditions will be met:
- MDM holds the global copy of the customer, related individual, and contact information
- All target systems will hold at least some minimal representation of the same
- The entity created/updated in each system will reference the global identifier from MDM
- MDM holds a list of all external identifiers associated with the customer and individual
- A complete 360-degree view of the customer can be constructed by first retrieving the global copy from MDM, and then from all associated downstream systems
Customer profile sync from B2C Commerce
Overview
This use case records updates published from B2C Commerce via the sync cartridge into MDM and other downstream systems.
Before you begin
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Workflow
The use case is triggered when
- A customer profile is created or updated in B2C Commerce
- A customer profile is created in B2C Commerce during the order checkout process
A sync cartridge invokes the B2C Commerce Experience API with the customer profile data.
- The B2C Commerce Experience API converts the customer profile data to the CIM format and places it in a queue
The Customers Process API consumes the message from the queue and orchestrates the following by invoking the appropriate system APIs for each system:
- Create or update the customer profile in MDM with an associated global ID.
- Create or update the customer profile in Marketing Cloud with an external ID that links to the global ID in MDM.
- Create or update the customer profile in SAP ECC with an external ID that links to the global ID in MDM.
- Create or update the customer profile in Salesforce core (includes Sales Cloud, Service Cloud and B2B Commerce) with an external ID that links to the global ID in MDM.
- Update the customer profile in MDM with a list of external IDs that link the customer to their corresponding profiles in B2C Commerce, Marketing Cloud, Salesforce Sales Cloud, Salesforce Service Cloud, B2B Commerce and SAP ECC
- Update B2C Commerce with the global ID from MDM if it was not part of the customer data from step 2
Sequence diagram
Systems involved
- Salesforce B2C Commerce Cloud
- Salesforce Marketing Cloud
- Salesforce Core (Sales, Service, B2B Commerce)
- SAP ECC
- SAP S/4HANA
- MDM (generic)
Setup instructions
B2C Commerce configuration
Setup B2C Commerce with the sync cartridge to invoke the B2C Commerce Experience API when a customer profile is created or updated. The custom cartridge needs to be properly installed in the active site by a qualified B2C administrator or developer.
Follow the B2C setup guide for instructions on how to configure the target B2C Commerce instance for API access.
SAP Configuration
Follow the Custom BAPI setup instructions.
Salesforce configuration
Follow the Salesforce Customization Guide to create custom fields and enable Person Accounts.
Marketing Cloud configuration
Please see setup instructions in the Prerequisites tab of the Salesforce Marketing System API.
MDM configuration
Follow the setup instructions in the Prerequisites tab of the MDM System API.
Customer profile sync from Salesforce
Overview
This use case records updates published from Salesforce into MDM and other downstream systems.
Before you begin
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Workflow
The use case is triggered when
- A Person Account is created or updated in Salesforce
An event is published to the Salesforce push topic which is picked up by the Salesforce Topic Listener with the Customer (Person Account) data.
- The Salesforce Topic Listener converts the Person Account data to the CIM format and places it in a queue
The Customers Process API consumes the message from the queue and orchestrates the following by invoking the appropriate system APIs for each system:
- Create or update the customer profile in MDM with an associated gloabl ID.
- Create or update the customer profile in Marketing Cloud with an external ID that links to the gloabl ID in MDM.
- Create or update the customer profile in SAP ECC with an external ID that links to the gloabl ID in MDM.
- Create or update the customer profile in B2C Commerce with an external ID that links to the global ID in MDM.
- Update the customer profile in MDM with a list of external IDs that link the customer to their corresponding profiles in B2C Commerce, Marketing Cloud, Salesforce Sales Cloud, Salesforce Service Cloud, B2B Commerce and SAP ECC
- Update Salesforce with the gloabl ID from MDM if it was not part of the person account data from step 2
Sequence diagram
Systems involved
- Salesforce B2C Commerce Cloud
- Salesforce Marketing Cloud
- Salesforce Core (Sales, Service, B2B Commerce)
- MDM
- SAP ECC
Setup instructions
Salesforce configuration
- Create custom fields as described in the Salesforce Customization Guide
- Enable Person Accounts as described here
- Create a push topic on the Account object as described in the README in the Salesforce Topic Listener
- Obtain ID of the Service Account User that is used in Salesforce Customers System API and use it to replace the LastModifiedBy value in the pushtopic query. This is to filter out cyclical updates (i.e., updates generated by Salesforce Customer System API)
SAP Configuration
Follow the Custom BAPI setup instructions.
Marketing Cloud configuration
Follow the setup instructions in the Prerequisites tab of the Salesforce Marketing System API.
MDM configuration
Follow the setup instructions in the Prerequisites tab of the MDM System API.
Customer profile sync from Marketing Cloud
Overview
This use case records updates published from Marketing Cloud into MDM and other downstream systems.
Before you begin
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Workflow
- The use case is triggered when a subscriber is created in Marketing Cloud
- An event is published by Marketing Cloud which is picked up by the Salesforce Marketing Listener with the Individual data.
- The Salesforce Marketing Listener converts the individual data to the CIM format and places it in a queue
The Customers Process API consumes the message from the queue and orchestrates the following by invoking the appropriate system APIs for each system:
- Create or update the individual profile in MDM with an associated global ID.
- Update the individual profile in MDM with the external ID that links the individual to the corresponding subscriber profile in Marketing Cloud
- Update Marketing Cloud with the global ID from MDM if it was not part of the individual data from step 2
Sequence diagram
Systems involved
- Salesforce Marketing Cloud
- MDM
Setup instructions
Marketing Cloud configuration
Follow the setup instructions in the Prerequisites tab of the Salesforce Marketing System API.
MDM configuration
Follow the setup instructions in the Prerequisites tab of the MDM System API.
Customer profile sync from SAP
Overview
This use case records updates made in SAP via the ERP Customers Process API into MDM and other downstream systems.
Before you begin
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Workflow
- The ERP Customers Process API polls SAP for customer updates on a periodic basis
- The ERP Customers Process API converts the customer profile data to the CIM format and places it in a queue
The Customers Process API consumes the message from the queue and orchestrates the following by invoking the appropriate system APIs for each system:
- Create or update the customer profile in MDM with an associated global ID.
- Create or update the customer profile in Marketing Cloud with an external ID that links to the global ID in MDM.
- Create or update the customer profile in SAP ECC with an external ID that links to the global ID in MDM.
- Create or update the customer profile in Salesforce core (includes Sales Cloud, Service Cloud and B2B Commerce) with an external ID that links to the global ID in MDM.
- Update the customer profile in MDM with a list of external IDs that link the customer to their corresponding profiles in B2C Commerce, Marketing Cloud, Salesforce Sales Cloud, Salesforce Service Cloud, B2B Commerce and SAP ECC
- Update B2C Commerce with the global ID from MDM if it was not part of the customer data from step 2
Sequence diagram
Systems involved
- Salesforce B2C Commerce Cloud
- Salesforce Marketing Cloud
- Salesforce Core (Sales, Service, B2B Commerce)
- MDM
- SAP ECC
Setup instructions
SAP Configuration
Follow the Custom BAPI setup instructions.
Salesforce configuration
Follow the Salesforce Customization Guide to create custom fields and enable Person Accounts.
Marketing Cloud configuration
Please see setup instructions in the Prerequisites tab of the Salesforce Marketing System API.
MDM configuration
Follow the setup instructions in the Prerequisites tab of the MDM System API.
Downloadable assets
Accelerator System APIs
- B2C Customers System API | API Specification | Implementation Template
- Salesforce Customers System API | API Specification | Implementation Template
- Salesforce Marketing System API | API Specification | Implementation Template
- MDM System API | API Specification | Implementation Template
- SAP ECC Customers System API | API Specification | Implementation Template
- SAP S/4HANA Customers System API | API Specification | Implementation Template
Accelerator Process APIs
- Customers Process API | API Specification | Implementation Template
- ERP Customers Process API | API Specification | Implementation Template
Accelerator Experience APIs
- B2C Commerce Experience API | API Specification | Implementation Template
- Salesforce Experience API | API Specification | Implementation Template
Accelerator Listeners
- Salesforce Marketing Listener | Implementation Template
- Salesforce Topic Listener | Implementation Template
Custom components
- B2C Commerce Sync Cartridge | Source