Business Use Case:
Salesforce serves as the entry point for creating cases & Updates. When a case is created or updated in Salesforce, the data is sent to an external system via a middle layer for processing. The external system is the source of truth, and once the case is successfully created there, the data flows back into Salesforce through the same middle layer.
However, only a subset of the case data fields is saved in the Salesforce database. Data reconciliation is needed to handle scenarios where a case is successfully created in the external system but fails to get updated or recorded in Salesforce. This ensures that both systems remain synchronized and data integrity is maintained.
Objective of Data Reconciliation :
Ensure Data Consistency: Maintain alignment between Salesforce and the external system for accurate reporting and operations.
Identify and Resolve Discrepancies: Detect missing, incomplete, or incorrect data and address the root causes.
Enhance Data Reliability: Build trust in the data by ensuring it reflects the source of truth.
Minimize Business Impact: Prevent errors or delays caused by data mismatches in critical workflows.
Support Compliance: Ensure data integrity to meet audit and regulatory requirements.
Possible Reasons for Data Discrepancies :
Proposed Approach/Process for Data Reconciliation :
1. Who should be responsible for creating data reconciliation jobs when Salesforce acts as the entry point for data creation, but the data is first recorded in the external system, with the middle layer serving only as a pass-through?
2. What is the best approach for ensuring data reconciliation when the external system cannot directly verify if a record was created / updated in Salesforce?
Data Synchronization and Reconciliation for Case Creation :
The external system creates the case, sending a request to the middle layer.
The middle layer sends the case creation request to Salesforce.
Upon success or failure of the case creation in Salesforce, the middle layer immediately acknowledges the response back to the external system (Acknowledgment Mechanism Approach).
If the creation is successful, the external system will be notified by the middle layer.
Salesforce then updates the external system record with the Salesforce Case ID through the middle layer, ensuring that the external system’s record is synchronized.
If the update of the Salesforce Case ID fails even after retries, Salesforce can initiate a data reconciliation process to identify the record discrepancies and reattempt the update.For specific to this scenario requires data reconciliation job at Salesforce end.
If the creation is unsuccessful, the external system will be notified by the middle layer, and necessary actions (e.g., retries or manual intervention) can be taken by the middle layer and external system.
For cases created successfully, the Salesforce Case ID will be populated in the external system. The external system can periodically check for records with null Salesforce Case IDs to identify those that didn't sync properly.
If a null is found, it will trigger the case record creation process again, ensuring that missing records are re-synced.
Data Synchronization and Reconciliation for Case Updates :
Trigger Status Reset on New Updates:Every time the same record update request is made in Salesforce, the Update Sync Status automatically resets to In Progress to accommodate the latest update attempt.Since Salesforce is the entry point on every update request this field value also passed respectively.
The external system updates the case, sending a request to the middle layer.
The middle layer sends the case update request to Salesforce.
Upon success or failure of the case update in Salesforce, the middle layer immediately acknowledges the response back to the external system (Acknowledgment Mechanism Approach).
If the update is successful, the external system will be notified by the middle layer.
Salesforce then updates the external system record with the Update Sync Status(Field) value with ‘Success’ through the middle layer, ensuring that the external system’s record is synchronized.
If the update of the Update Sync field fails even after retries, Salesforce can initiate a data reconciliation process to identify the record discrepancies and reattempt the update.For specific to this scenario requires data reconciliation job at Salesforce end.
If the update is unsuccessful, the external system will be notified by the middle layer, and necessary actions (e.g., retries or manual intervention) can be taken by the middle layer and external system.
For cases updated successfully, the Update Sync Status( Field) will be populated with the value ‘Success’ in the external system. The external system can periodically check for records with ‘Failed’ status in the field Update Sync Status to identify those that didn't sync properly.
If a record is found, it will trigger the case record update process again, ensuring that missing records are re-synced.
Operational Add-Ons :
Summary Action Table :