MuleSoft Accelerator for Retail
Use case 3 - Product sync
The Product sync use case enables retail developers to update product details across relevant applications.
Overview
- Description
- Glossary
- Solution overview
- Assumptions and constraints
- Workflow
- High-level architecture
- Activity diagram
- Processing logic
- Successful outcome
See also
Description
The product sync use case enables the creation and updates of products across relevant applications, with one application serving as the primary definition of the product.
The product sync achieves the following goals:
- Support the creation of products across relevant applications, inclusive of Salesforce Core, SAP S/4 HANA, B2C Commerce Cloud and Salsify as the reference PIM.
- Support the creation of Global ID and ID attribution.
- Orchestrate controlled updates across designated applications.
- Link products with sales orders using global identifiers as part of the Sales order sync use case.
Glossary
Term | Definition |
---|---|
CIM | The Cloud Information Model 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. |
OFBiz | The Apache Open for Business (OFBiz) is an enterprise resource planning (ERP) system that provides a common data model and an extensive set of business processes. |
OMS | An Order Management System (OMS) is a software solution that supports the management and processing of sales orders. |
PIM | The system responsible for managing product information for sales orders. |
Solution overview
- Capture new or updated products published from Salsify or SAP S/4 HANA.
- Product updates will be captured in Salesforce core:
- All updates will be reflected in Salesforce core first to establish the ID graph
- Products will be associated with the global product ID in Salesforce core
- New or updated products will be synchronized with downstream systems:
- Global identifier from Salesforce core will be recorded in the other systems
- The global identifier will be recorded back to the system that published the update if it was not provided.
- CIM entities supported (system agnostic):
- Product
- Primary criteria used to match an existing product in other systems, in order of priority:
- Global identifier - high confidence
- External identifier specific to target system - moderately-high confidence
- In target systems, a new product will be created if not matched to an existing one
- Update errors will be reported in the logs and sent to the appropriate dead-letter queue only; no conflict resolution support will be implemented.
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 identifiers will be maintained in Salesforce core. Wherever possible, these will be assigned as external identifiers in target systems.
- References to the global IDs will be reflected in downstream systems using custom properties to avoid conflicts with the usage of other external identifiers.
- Salesforce core will record only minimal information about the product in addition to establishing the sales order relationships and maintaining the identifier graph.
Use case considerations
- Must support a product identifier graph to link products across applications.
- Primary identifiers will be linked with the orders in Salesforce core.
Technical considerations
- Enable the creation of a global ID that allows you to retrieve/create IDs regardless of where the product is created or updated.
- 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 (CC), Salesforce Core (Sales, Service, B2B CC), SAP S/4HANA , Salsify, Salesforce core
End-to-end scenarios
- Products associated with an order can be seen in SAP S/4 HANA, Salesforce Sales and Salesforce Service Clouds.
- Product(s) created in SAP S/4 HANA are reflected in B2C Commerce, Salesforce Core, Salsify
- Product(s) updated in SAP S/4 HANA are reflected in B2C Commerce, Salesforce Core, Salsify
- Product updates made in Salsify are reflected in B2C Commerce, Salesforce core, SAP S/4HANA.
Workflow
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. |
The primary set of use cases covered in the current solution involve the synchronization of product data between multiple systems. The following describes the Product synchronization to Salesforce core workflow.
Goals
Synchronise new and updated product entries from SAP S/4 HANA to a universal copy maintained by a lightweight Salesforce core solution and downstream applications
Steps
- Receive a new or updated product from SAP S/4 HANA.
- Attempt to match the input to an existing product in Salesforce core.
- If a match is found, update the existing entry in Salesforce core.
- Publish the update to downstream applications registered for updates.
Use case extension: If no match is found, create a new entry in Salesforce core.
Systems involved
- Salesforce B2C Commerce (CC)
- Salesforce Core (Sales, Service, B2B Commerce)
- SAP S/4HANA
- Salsify
- Salesforce core (generic)
High-level architecture
Activity diagram
Processing logic
The primary handling and orchestration of products will be implemented in the Products Process API. This process can be described as follows:
- Find a matching product entry in Salesforce core. The lookup will be done by attempting to match the following criteria, in sequential order, returning once a match has been found:
- Global Identifier (if provided)
- External Identifier (of source system)
- If a single match is found:
- Retrieve the existing product
- Apply the incoming updates and save them back to Salesforce core
- If not matched on an external identifier, associate it with the product
- Invoke APIs to update the downstream systems (see below)
- Associate missing external identifiers back to Salesforce core
- If no match was found:
- Create a new product in Salesforce core
- Associate external identifier of source system with the product
- Invoke System APIs to update the downstream systems (see below)
- Associate new external identifiers back to Salesforce core
The replication of product updates to downstream systems follows a similar process to Salesforce core. The following steps apply to all downstream systems:
- Find a matching product in the target. The lookup will be similar to Salesforce core but uses the following criteria, also in order of priority:
- Primary identifier in target system (if one has been associated)
- Global identifier from Salesforce core
- If a single match is found:
- Retrieve the existing product 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:
- 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
Successful outcome
After successfully completing the update processing for all target systems, the following conditions will be met:
- Salesforce core holds a record of the product.
- All target systems will hold at least some minimal representation of the same.
- The entity created/updated in each system will reference the gloabl identifier from Salesforce core.
- Salesforce core holds a list of all external identifiers associated with the product.
- A 360-degree view of the product can be constructed by first retrieving the global copy from Salesforce core, and then from all associated downstream systems.
Downloadable assets
Accelerator System APIs
- RCG B2B Commerce System API | API Specification | Implementation Template
- RCG B2C Commerce System API | API Specification | Implementation Template
- RCG Salesforce core System API | API Specification | Implementation Template
- RCG SAP S/4HANA Products System API | API Specification | Implementation Template
- RCG Salsify Products System API | API Specification | Implementation Template
- Accelerator Global Product System API | API Specification | Implementation Template
Accelerator Process APIs
- Accelerator Products Process API | API Specification | Implementation Template
Accelerator Listener Applications
- SAP Event Listener | Implementation Template
- Salsify Channel Listener | Implementation Template