Scenario Based Salesforce Integration Interview Questions
Scenario Based Salesforce Integration Interview Questions
Scenario Based Salesforce Integration Interview Questions
4.OAuth Authentication:
• Implement OAuth 2.0 user-agent flow in Sizmek to obtain an access
token. The user-agent flow is simpler and more straightforward. It
reduces the need for server-side handling of OAuth tokens.
5.Connector in Sizmek:
Set up the connector with the necessary API user details through the
OAuth flow.
By Smriti Sharan (sfdcamplified)
1. Data Flow:
• A quote is created in Salesforce.
• At the end of the day, SAP CRM fetches all created quotes from
Salesforce.
• The fetched quotes are then created in SAP CRM.
Steps
1. Create an Apex Class for Callout. You can use future or batch or
queuable depends on scenario.
Future Methods: Would be ideal for small, quick updates that don’t require
monitoring.
Limits:
• Maximum of 50 future calls per transaction.
• Maximum of 200 future calls per 24-hour period per license.
Sample Code
public class FutureMethodExample {
@future(callout=true)
public static void updateQuote(String quoteId) {
// Logic to update Quote and make an external callout
Quote quote = [SELECT Id, Name FROM Quote WHERE Id =
:quoteId];
// Callout logic here
// Update quote logic here
}
}
Queueable Apex: Suitable for handling complex logic and chaining jobs if
the integration requires multiple steps.
Limits:
• Maximum of 50 Queueable jobs per transaction.
• Maximum of 200 jobs added to the queue per 24-hour period per
license.
• Limit of 100 enqueued jobs at once for an org.
Sample Code
By Smriti Sharan (sfdcamplified)
Batch Apex: Best for nightly or periodic syncs where a large volume of
data needs to be processed.
Limits:
• Maximum of 5 active batch jobs at a time.
• Maximum of 100 batch jobs can be queued or active concurrently.
• Up to 2000 batch apex jobs can be submitted in a 24-hour period.
• Each batch can process a maximum of 50 million records.
Sample Code
// Example usage
public class BatchCaller {
public void someMethod() {
BatchExample batchJob = new BatchExample();
Database.executeBatch(batchJob, 100);
}
}
4. OAuth Authentication:
Implement OAuth 2.0 user-agent flow in Informatica to obtain an access
token. This flow is simpler and reduces the need for server-side handling of
OAuth tokens.
2. OAuth Authentication
• Implement OAuth 2.0 user-agent flow in Informatica to obtain an
access token.
• Use this access token to authenticate API requests to Salesforce.
@RestResource(urlMapping='/ProductIntegration/*')
global with sharing class ProductIntegration {
@HttpPost
global static void createOrUpdateProduct() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
1. Data Flow
• Orders are stored in an external system.
• Salesforce needs to display these orders without storing them.
• Use Salesforce Connect to integrate and display external data as
External Objects in Salesforce.
2. Select the tables or entities from the external system that you want to
sync (e.g: Orders).
3. Click Sync to create the External Objects in Salesforce.
By Smriti Sharan (sfdcamplified)
Real-time Updates: The trigger on the Quote object will use a future
method to handle callouts for real-time updates, ensuring the callout does
not block the main transaction.
Nightly Creation: Batch Apex handles new quote creations by collecting
all new quotes created during the day and sending them to SAP CRM in a
single batch, scheduled to run nightly.
1.Create an Apex trigger that listens for updates on the Quote object.
2. Define a future method to handle the callout to SAP CRM.
Apex Trigger:
Sample Code
Future Method
Sample Code
1. Batch Apex Class: Create a Batch Apex class to collect and send new
quotes.
Sample Code
Step-by-Step Implementation:
if (!events.isEmpty()) {
EventBus.publish(events);
}
}
Step-by-Step Implementation:
1. Enable Change Data Capture (CDC) in Salesforce
• Go to Setup in Salesforce.
• In the Quick Find box, type "Change Data Capture" and select it.
• Select the Account object and enable CDC for this object.
In the Action search box, type "HTTP Callout" and select "Create HTTP
Callout".