Account data submitted in Salesforce → Sent to External API → Account created in the external system → External System ID stored in Salesforce.
Two-Way Integration: Synchronizing Accounts Between Salesforce and an External System
1. User Submits Account Form
The user enters Name, Email, and Phone in a Lightning Web Component (LWC).
Clicking Submit triggers a call to an Apex method (sendAccountData).
2. Data Sent to External API
The Apex method sends account details to an external system via an API request.
The external system creates a new account and returns a unique External System ID.
3. Account Created in Salesforce
A new Account record is inserted in Salesforce.
The response from the external system is processed:
If an id is received, it is stored in the External_Id__c field on the Salesforce Account.
If no ID is returned, an appropriate message is stored.
4. Two-Way Synchronization Achieved
Salesforce and the external system are now linked via the External System ID.
Future updates can be synchronized based on this ID for real-time integration.
1. User Submits Account Form
The user enters Name, Email, and Phone in a Lightning Web Component (LWC).
Clicking Submit triggers a call to an Apex method (sendAccountData).
2. Data Sent to External API
The Apex method sends account details to an external system via an API request.
The external system creates a new account and returns a unique External System ID.
3. Account Created in Salesforce
A new Account record is inserted in Salesforce.
The response from the external system is processed:
If an id is received, it is stored in the External_Id__c field on the Salesforce Account.
If no ID is returned, an appropriate message is stored.
4. Two-Way Synchronization Achieved
Salesforce and the external system are now linked via the External System ID.
Future updates can be synchronized based on this ID for real-time integration.
No comments:
Post a Comment