MuleSoft Accelerator for Manufacturing
Use case 2 - Sales rebate management
Easily sync customer and order data between SAP, Salesforce Manufacturing Cloud, and Salesforce Rebate Management to seamlessly manage sales rebate programs.
Contents
- Glossary
- High-level architecture
- Sequence diagrams
- Use case considerations
- Assumptions and constraints
- Systems involved
- Goals
- Processing logic
- Successful outcome
See also
- Mappings
- Downloadable assets
Overview
Managing account sales rebates can be highly manual for manufacturing organizations, leading to improper payouts and inaccurate financial records. Complete visibility and automatic payment triggers are critical to both account confidence and financial success.
The purpose of this use case is to automate data synchronization between sales orders and rebate payout systems. The solution helps manufacturing organizations manage their sales rebate programs by providing consistency and governance over how data is unlocked to trigger sales rebate payments and documentation.
As a result, this solution helps to provide timely sales rebate payouts and improves tracking.
Use case description
The Accelerator leverages sales rebate payouts within Salesforce Rebate Management to create credit memos in SAP. When a payment is made, payment details sync back to Rebate Management, and a courtesy email notification is sent to the customer. This use case syncs customer data seamlessly between SAP and Manufacturing Cloud, and sales order data from SAP to Manufacturing Cloud, with pre-built APIs and templates. Connecting this critical data to Manufacturing Cloud generates greater visibility to sales rebate activity.
Glossary
Term | Definition |
---|---|
MFG | Abbreviated term referring to the Manufacturing industry. |
Rebate | A rebate is a form of buying discount and is an amount paid by way of reduction, return, or refund that is paid retroactively. |
Rebate Management Module | Add on module for Salesforce that manages rebate programs, criteria, payout rules, and membership all within Salesforce. |
High-level architecture
Sync
Sales-rebate-payouts
Sequence diagrams
Create credit memo
The diagrams below illustrate the sequence of steps to create credit memo in SAP S/4HANA for a approved rebate paid out in Manufacturing cloud in real-time or bulk.
Real-time
Bulk
Update rebate status
The diagrams below illustrate the sequence of steps to update rebate payment status for paid credit memo from SAP S/4HANA to Manufacturing Cloud in real-time.
Use case considerations
Functional considerations
- Manufacturing Cloud is the system of record for the rebate payouts, including frequency, status, and calculation
- Members/customers should exist in both Manufacturing Cloud and SAP for a payout and credit memo to be linked
- Either Manufacturing Cloud or SAP can be the system of record for customers.
Technical considerations
This section lists the technical considerations and constraints on the solution design.
- SAP S/4HANA and Manufacturing Cloud are in sync for customers
- Manufacturing Cloud is the system of record for all rebate calculations
- The SAP S/4HANA journal entry module is used for credit memos
- In the real-time use case implementation, a draft credit memo will only be created for an approved payout
- When a rebate is paid in S/4HANA, the paid status should be reflected in Manufacturing Cloud
- Customers should have ability to create credit memos in bulk in SAP S/4HANA regardless of payout status
Assumptions and constraints
- Bi-directional sync for customers is in place between Salesforce Manufacturing Cloud and SAP S/4HANA
- Rebate programs are manually created in the Manufacturing Cloud based on the Manufacturer's incentive plan and assigned to Accounts/Customers.
Systems involved
- Salesforce Manufacturing Cloud
- SAP S/4HANA
Goals
- Create credit memo in draft status in SAP S/4HANA once payout is approved
- Update rebate payment status to paid in Manufacturing Cloud once credit memo is paid
- Bulk load rebate payouts from Manufacturing Cloud to SAP S/4HANA
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. |
Processing logic
The processing logic below applies to Rebate Payout from Salesforce and Credit Memo in SAP S/4HANA. Customers have ability to create credit memo real time for approved rebate payout or creation for credit memos as bulk load on a schedule, irrespective of rebate payout status
The primary handling and orchestration of credit memo creation and rebate payout update will be implemented in the rebate process and respective system APIs.
The logic of this process for real time credit memo creation can be described as follows:
- When a rebate payout is approved in Salesforce Manufacturing Cloud, an event will be sent to the topic listener
- Salesforce topic listener will publish the message to the topic
- The Rebate Process API will get the message from the queue and call the Credit Memo System API
- CreditMemo System API will create a credit memo in SAP S/4HANA
- Rebate Process API will run on a scheduled interval and call CreditMemo System API for paid out credit memos in SAP S/4HANA since the last time the data was collected
- For the credit memos retrieved in step 5, the Rebate Process API will update payment to paid status in Salesforce Manufacturing Cloud for approved payouts
The logic of this process for bulk credit memo creation can be described as follows:
- The Rebate Process API polls for all the rebate payouts (created since the last time the data was collected) irrespective of status and puts the message in the Rebate Queue and pushes data to SAP S/4HANA for creating a corresponding credit memo.
Successful outcome
After successfully completing the rebate processing for Manufacturing Cloud, the following conditions will be met:
- For real-time credit memo is created once a rebate payout is approved
- Once the credit memo is paid out in SAP S/4HANA for approved rebate payout payment status in Manufacturing Cloud gets updated to paid
- The Salesforce Manufacturing Cloud external id is stored in the credit memo in SAP S/4HANA so that the credit memo can be linked to a payout in Manufacturing Cloud
- For bulk load of credit memos in SAP S4/HANA all the payouts in Manufacturing Cloud should create a credit memo regardless of state of rebate payout
Mappings
Source type mapping
The following table summarizes how representations of a rebate from each system will be mapped from rebate types.
Source System | Source Type | Target Types | Mapping Notes |
---|---|---|---|
Manufacturing Cloud | Rebate Payout | Credit Memo | Relevant fields |
SAP S4/HANA | Credit Memo | Rebate | Relevant fields |
Target type mapping
The following table summarizes how representations of a rebate from each system will be mapped from rebate types.
Target System | object Type | Target Types | Mapping Notes |
---|---|---|---|
SAP S4/HANA | Credit Memo | Rebate | Relevant fields |
Manufacturing Cloud | Rebate Payout | Credit Memo | Relevant fields |
Downloadable assets
System APIs
- MFG SAP S/4HANA CreditMemo System API | API Specification | Implementation Template
- MFG Salesforce Rebate System API | API Specification | Implementation Template
Process APIs
- MFG Rebate Process API | API Specification | Implementation Template
Accelerator Listeners
- MFG Salesforce Topic Listener | Implementation Template
Custom components
- MFG Rebate Library | Source