MuleSoft Accelerator for Manufacturing
Use case 1 - Account and product and order sync
Unlock account (customer), product, and order data from SAP S/4HANA and sync it with Salesforce Manufacturing Cloud in real time or batch to streamline sales agreements and account forecasts.
Contents
- Use case description
- Solution definition
- Assumptions and constraints
- High-level architecture
- Sequence diagram
- Processing logic
- Successful outcome
See also
Overview
In any capital-intensive manufacturing organization, complete visibility into account, product and order data is critical to the organization’s success.
The purpose of this use case is to enable predictability to drive success for both customers and manufacturers. The solution helps to reveal a single view of your account, product and order data to help you manage your manufacturing business with confidence.
Use case description
This use case extracts account, product and order data from SAP S/4HANA into Salesforce Manufacturing Cloud with pre-built APIs and templates. Connecting this critical data to Sales allows you to create an effective sales forecast.
While we base the use case on SAP S/4HANA and Salesforce Manufacturing Cloud, we take an API-led approach to integration so that all endpoints can be replaced with your systems of choice.
Glossary
Term | Definition |
---|---|
MFG | Abbreviated term referring to the Manufacturing industry. |
CIM | The Cloud Information Model for MuleSoft Accelerators defines a set of standard data structures that can be used as canonical representations of common entities for integrating systems. |
Use case considerations
Functional considerations
- Support account, product and order sync to Manufacturing Cloud in real-time or batch mode from the system of record.
- Accounts are synced from SAP S/4HANA to Manufacturing Cloud and are available to search and select when creating a Sales Agreement. The following functionality is supported:
- Create new accounts
- Update existing accounts
- Create account hierarchies
- Update account hierarchies
- Products are synced from SAP S/4HANA to Manufacturing Cloud. The following functionality is supported:
- Create new products
- Update existing products
- Associate products to categories or sub-categories
- Associate products to a product catalog (Note: While only one catalog is supported currently, the solution can be extended to support multiple catalogs)
- Orders are synced from SAP S/4HANA to Manufacturing Cloud and can be associated with a Sales Agreement. Orders are created in Salesforce Manufacturing Cloud and can be associated with a Sales Agreement based on the following conditions being met:
- Sales Agreement is active.
- Customer in the order matches the Account in the Sales Agreement.
- Product level is Product and the product in the order matches a product in the Sales Agreement, or product level is Category and the product’s primary category from the order matches a category in the Sales Agreement.
Technical considerations
This section lists the technical considerations and constraints on the solution design.
- SAP S/4HANA is the system of record for customers, products and orders
- Customers, products and orders can be synced in real-time or batch
- Sync is unidirectional from SAP S/4HANA to Manufacturing Cloud
- External identifiers are created for accounts, products and orders being synced and are stored in SAP S/4HANA and Manufacturing Cloud so that the objects can be corelated across the two systems.
End-to-end scenarios
- Product and Product Hierarchy created or updated in SAP S/4HANA is reflected in Salesforce Manufacturing Cloud.
- Account and Account Hierarchy created or updated in SAP S/4HANA is reflected in Salesforce Manufacturing Cloud.
- Order created in SAP S/4HANA is reflected in Salesforce Manufacturing Cloud.
Solution definition
The primary set of use cases covered in the current solution involve the synchronisation of account, account hierarchy, product, product hierarchy and order data between multiple systems.
Goal
Product synchronisation to Salesforce Manufacturing Cloud.
Main success scenario
- Receive a new or updated product from SAP S/4 HANA.
- Attempt to match the input to an existing product in Salesforce Manufacturing Cloud.
- If a match is found, update the existing product Salesforce Manufacturing Cloud. If no match is found, create a new product in Salesforce Manufacturing Cloud.
Goal
Account synchronisation to Salesforce Manufacturing Cloud.
Main success scenario
- Receive a new or updated account from SAP S/4HANA.
- Attempt to match the parent account ID to an existing account in Salesforce Manufacturing Cloud. This step is performed for every parent in the hierarchy.
- If a match is found, retrieve the existing entry in Salesforce Manufacturing Cloud. If no match is found, create a new entry in Salesforce Manufacturing Cloud.
- Attempt to match the account to an existing account in Salesforce Manufacturing Cloud.
- If a match is found, update the existing entry in Salesforce Manufacturing Cloud. If no match is found, create a new entry in Salesforce Manufacturing Cloud.
Goal
Order synchronisation to Salesforce Manufacturing Cloud.
Main success scenario
- Receive a new order from SAP S/4HANA.
- Attempt to match the account and product in the order to an existing account and product in Salesforce Manufacturing Cloud.
- Look up a sales agreement corresponding to the account and product in Salesforce Manufacturing Cloud.
- If a corresponding sales agreement is found, create a new order associated with the sales agreement in Salesforce Manufacturing Cloud. If not found, create a new order without associating it with a sales agreement in Salesforce Manufacturing Cloud.
Assumptions and constraints
The following will be used to guide or constrain the solution design at a high level:
- The Cloud Information Model will be used as the canonical model for all business types; see the CIM usage guidelines in that asset.
- Universal identifiers will be maintained in Salesforce Manufacturing Cloud. Wherever possible, these will be assigned as external identifiers in target systems.
- References to the universal IDs will be reflected in Salesforce Manufacturing Cloud using ExternalIDs to avoid conflicts with the usage of other external identifiers.
High-level architecture
Activity diagram
The activity diagrams below illustrate the sequence of synching account, product and order data to Salesforce Manufacturing Cloud from SAP S/4HANA.
Product sync batch
Product sync real-time
Account sync batch
Account sync real-time
Order sync real-time
Processing logic
The primary handling and orchestration of products will be implemented in the MFG Products Process API. This process can be described as follows:
- A product has the catalog and category attributes that represent the product hierarchy. Note that the product hierarchy is also synced across the two systems.
- The bulk data upload to Manufacturing Cloud will be implemented using a batch scope where each of the steps from Step 3 - Step 6 will happen in parallel for all the products.
- SAP S/4HANA System API will retrieve the product and product hierarchy if applicable.
- Find a matching product entry in Salesforce Manufacturing Cloud. The lookup will be done by attempting to match on the external identifier.
- If a single match is found, apply the incoming updates to the existing product in Salesforce Manufacturing Cloud.
- If no match is found, create a product entry in Salesforce Manufacturing Cloud with the external identifier.
The primary handling and orchestration of customers will be implemented in the MFG Customers Process API. This process can be described as follows:
- A customer has an attribute to identify the parent (parentId) that represents the hierarchy where each parent is a type of customer. Note that the customer hierarchy is also synced across the two systems.
- The bulk data upload to Manufacturing Cloud will be implemented using a batch scope where each of the steps from Step 3 - Step 6 will happen in parallel for all the customers.
- SAP S/4HANA Customer System API will retrieve the customer and customer hierarchy if applicable.
- Find a matching customer entry in Salesforce Manufacturing Cloud. The lookup will be done by attempting to match on the external identifier.
- If a single match is found, apply the incoming updates to the existing account in Salesforce Manufacturing Cloud.
- If no match is found, create a customer entry in Salesforce Manufacturing Cloud with the external identifier.
The primary handling and orchestration of orders will be implemented in the MFG Orders Process API. This process can be described as follows:
- Receive a new order from SAP S/4HANA Event Listener as an event.
- Attempt to match the input to an existing customer and product in Salesforce Manufacturing Cloud.
- Retrieve the salesforce product details from Salesforce Products System API and account details from Salesforce Customers System API.
- Attempt to retrieve the sales agreement ID matching the account and product in Salesforce Manufacturing Cloud.
- If a corresponding sales agreement is found, create a new order associated with the sales agreement in Salesforce Manufacturing Cloud. If not found, create a new order in Salesforce Manufacturing Cloud.
Successful outcome
After successfully completing the update processing for all target systems, the following conditions will be met:
- Salesforce Manufacturing Cloud holds a record of the product, customer and order.
- The entities in both systems will hold a reference to an external identifier
- Salesforce Manufacturing Cloud holds all external identifiers associated with the product, customer and order.
- A complete view of the product, customer and order can be constructed by retrieving the universal copy from Salesforce Manufacturing Cloud.
Systems involved
- Salesforce Manufacturing Cloud
- SAP S/4HANA
Setup instructions
Saleforce Manufacturing Cloud configuration
This configuration is described in the MFG Salesforce Customers System API.
SAP S/4HANA configuration
Technical Objects
- Communication ArrangementBelow are the communication arrangements required for this use case:
Communication Arrangement ID | Service Name | Protocol |
---|---|---|
SAP_COM_0009 | Products to Product Hierarchies Assignment - Read, Create | OData V4 |
- Custom fields
Create the following fields using the app Custom fields:
SAP Field Name | Label | Data Type | Length | SAP Business Context |
---|---|---|---|---|
YY1_SME_HierUpdate_MFG | Hierarchy update flag | Checkbox | 1 | Master Data: Product General (PRODUCT) |
On the section ‘User Interfaces’, for each field enable the UI app Product basic data and the option OData extension model and publish.
To add the field into each app, use the option Adapt UI from your profile.
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. |
Downloadable assets
System APIs
- MFG SAP S/4HANA Products System API | API Specification | Implementation Template
- MFG SAP S/4HANA Customers System API | API Specification | Implementation Template
- MFG SAP S/4HANA Orders System API | API Specification | Implementation Template
- MFG Salesforce Products System API | API Specification | Implementation Template
- MFG Salesforce Customers System API | API Specification | Implementation Template
- MFG Salesforce Orders System API | API Specification | Implementation Template
- MFG Salesforce Manufacturing Cloud System API | API Specification | Implementation Template
Process APIs
- MFG Products Process API | API Specification | Implementation Template
- MFG Customers Process API | API Specification | Implementation Template
- MFG Orders Process API | API Specification | Implementation Template
Experience APIs
- MFG Salesforce Experience API | API Specification | Implementation Template
Listeners
- MFG SAP Event Listener | Implementation Template