MuleSoft Accelerator for Retail icon

MuleSoft Accelerator for Retail

(0 reviews)

Use case 2 - Sales order sync

Enable a single view of your sales orders by simplifying connectivity between ERP, CRM, OMS, marketing and commerce systems

Overview

Use case extensions

See also

The Sales Order Sync use case enables retail developers to create and update sales orders across disparate systems. Simplify connectivity between ERP, CRM, OMS, marketing and commerce systems with pre-built APIs, connectors, and implementation templates. This solution streamlines manual processes and eliminates duplication.

Retailers can connect sales orders to help calculate the total lifetime value of a customer across multiple channels. Syncing sales orders also helps retailers provide better service experiences.

Description

The sales order sync use case enables retail developers to create and update sales orders across relevant applications, regardless of which application the order is created in and where it is fulfilled.

The sales order sync achieves the following goals:

  • Support the creation of sales orders across relevant applications, inclusive of Salesforce Clouds, SAP, and a reference OMS (Apache OFBiz).
    • Support the creation of Global ID and ID attribution.
  • Orchestrate controlled updates across designated applications.
  • Link sales orders with customers and products using global identifiers.

Glossary

TermDefinition
MDMA Master Data Management solution provides an accurate, consistent and complete copy of golden data for use by enterprise applications and business partners. Most solutions include data quality tools and workflow processes for managing conflicting updates.
CIMThe Cloud Information Model defines a set of standard data structures that can be used as canonical representations of common entities for integrating systems.
OMSAn Order Management System is a software solution that supports the management and processing of sales orders.

Solution overview

  1. Capture new sales orders published from B2C Commerce.
  2. Capture sales order updates made in SAP S/4HANA.
  3. Sales order creation and updates will be captured in MDM.

    • All updates will be reflected in MDM first to establish the ID graph.
    • Orders will be associated with the global customer ID in MDM.
  4. New or updated orders will be synchronized with the same downstream systems.

    • Global identifier from MDM will be recorded in the other systems.
  5. The global identifier will be recorded back to the system that published the update, if it was not provided.

  6. CIM entities supported (system agnostic): SalesOrder, SalesOrderProduct* (you can have multiple products for a given order), Customer, Individual.
  7. Primary criteria used to match an existing sales order in other systems, in order of priority:

    • Global identifier.
    • External identifier specific to target system.
  8. If the customer profile could not be found, or if not given with the order at all, the order will be associated with a predetermined generic customer profile. This profile must be identified and/or created ahead of time (see below).

  9. In target systems, a new order will be created if not matched to an existing one.
  10. 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 MDM. 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.
  • MDM will record only minimal information about the sales order in addition to establishing the customer relationship and maintaining the identifier graph.

High-level architecture

retail-sales-order-sync-architecture.png

Sequence diagram

retail-sales-order-sync-main-sequence.png

Processing logic

The primary handling and orchestration of sales orders will be implemented in the Orders Process API. This process can be described as follows:

MDM updates

  1. If a customer profile was given with the sales order, find a matching entry in MDM. If a single match is found, associate the global customer profile with the order.
  2. If no match is found, or if a customer profile was not given, associate the order with the predefined generic customer profile.
  3. Find a matching sales order entry in MDM. The lookup will be done by attempting to match on the following criteria, in sequential order, returning once a match has been found:

    • Global Identifier (if provided)
    • External Identifier (of source system)
  4. If a single match is found:

    • Retrieve the existing sales order
    • Apply the incoming updates and save them back to MDM
    • If not matched on external identifier, associate it with the sales order
    • Invoke APIs to update the downstream systems (see below)
    • Associate missing external identifiers back to MDM
  5. If no match was found:

    • Create a new sales order in MDM
    • Associate external identifier of source system with the sales order
    • Invoke System APIs to update the downstream systems (see below)
    • Associate new external identifiers back to MDM

Downstream system updates

The replication of sales order updates to downstream systems follows a similar process as for MDM. The following steps apply to all downstream systems:

  1. Assign the customer identifier(s) specific to the target system to the downstream order details

    • External ids should include MDM and the system(s) specific to the downstream API being invoked
  2. Find a matching sales order 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
  3. If a single match is found:

    • Retrieve the existing sales order and apply the incoming updates
    • If not matched on global identifier, associate it with the entity
    • Save the updates back to the target system
  4. 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:

  1. MDM holds a record of the sales order, associated with a customer (may be the generic one)
  2. All target systems will hold at least some minimal representation of the same
  3. The entity created/updated in each system will reference the global identifier from MDM
  4. MDM holds a list of all external identifiers associated with the sales order
  5. A 360-degree view of the order can be constructed by first retrieving the global copy from MDM, and then from all associated downstream systems
  6. The total lifetime value of a customer can be calculated

back to top

Sales order create sync from B2C Commerce

Overview

This use case records new orders published from B2C Commerce via the sync cartridge.

Before you begin

bulb.png The Accelerators setup 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

  1. The use case is triggered when a sales order is created in B2C Commerce
  2. A sync cartridge invokes the B2C Commerce Experience API with the sales order data.
  3. The B2C Commerce Experience API converts the sales order data to the CIM format and places it in a queue
  4. The Orders 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 sales order in MDM with an associated global ID.
    • Create or update the sales order in SAP S/4HANA with an external ID that links to the global ID in MDM.
    • Create or update the sales order in Salesforce with an external ID that links to the global ID in MDM.
    • Create or update the sales order in OFBiz with an external ID that links to the global ID in MDM.
    • Update the sales order in MDM with a list of external IDs that link the order to its corresponding profiles in B2C Commerce, Salesforce, OFBiz and SAP S/4HANA.
    • Update B2C Commerce with the global ID from MDM.

Sequence diagram

retail-sales-order-sync-from-b2c-sequence.png

Systems involved

  • B2C Commerce
  • MDM
  • SAP S/4HANA
  • Salesforce
  • OFBiz

Setup instructions

Generic customer profile

As mentioned above, the Orders Process API will associate any anonymous orders with a predefined generic customer profile. The preferred way to set this up is to create a new customer directly in the preferred system (e.g., Salesforce) for this purpose and have it automatically sync to all downstream systems that are configured as part of Use case 1 - Customer profile sync. The Salesforce identifier must then be referenced in appropriate configuration property of the API.

B2C Commerce configuration

Setup B2C Commerce with the sync cartridge to invoke the B2C Commerce Experience API when a sales order is created or updated. The custom cartridge needs to be properly installed in the active site by a qualified B2C administrator or developer.

Salesforce configuration

Follow the setup instructions in the README file in the Salesforce Orders System API.

MDM configuration

Follow the setup instructions in the README file in the MDM System API.

SAP S/4HANA configuration

Follow the setup instructions in the README file in the SAP S/4HANA Orders System API.


back to top

Sales order update sync from SAP S/4HANA

Overview

This use case records updates to sales orders published from SAP S/4HANA.

Before you begin

bulb.png The Accelerators setup 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

  1. The SAP Event Listener is invoked when the order status is updated in SAP S/4HANA. It converts the sales order data to the CIM format and places it in a queue.
  2. The Orders 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 sales order in MDM with the updated order status from SAP S/4HANA.
    • Create or update the sales order in Salesforce with the updated status from SAP S/4HANA.
    • Update the sales order in B2C Commerce with the updated order status from SAP S/4HANA.
    • Create or update the sales order in OFBiz with the updated order status from SAP S/4HANA.

Sequence diagram

retail-sales-order-sync-from-sap-sequence.png

Systems involved

  • B2C Commerce
  • MDM
  • SAP S/4HANA
  • Salesforce
  • OFBiz

Setup instructions

B2C Commerce configuration

Setup B2C Commerce with the sync cartridge to invoke the B2C Commerce Experience API when a sales order is created or updated. The custom cartridge needs to be properly installed in the active site by a qualified B2C administrator or developer.

Salesforce configuration

Follow the setup instructions in the README file in the Salesforce Orders System API.

MDM configuration

Follow the setup instructions in the README file in the MDM System API.

SAP S/4HANA configuration

Follow the setup instructions in the README file in the SAP S/4HANA Orders System API.


back to top

Downloadable assets

Accelerator System APIs

Accelerator Process APIs

Accelerator Experience APIs

Accelerator Listeners

Custom components

  • B2C Commerce Sync Cartridge | Source

Reviews

TypeCustom
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onJun 1, 2022
Contact nameMuleSoft Solutions
Contact emailsolutions-questions@mulesoft.com
Asset overview

Asset versions for 2.6.x

Asset versions
VersionActions
2.6.0

Categories

Accelerator
RetailNo values left to add
Industry Vertical
RetailNo values left to add

Tags