QUESTION 25
KiA B2C Enterprise Customer has the following use case that involves processing payment from an external payment gateway service in Salesforce.
1. Customer requests Customer Service Representative (CSR) for a Service upgrade.
2. Customer provides credit card details to CSR for payment.
3. CSR submits payment information in Salesforce, and processed in a
4. CSR receives confirmation of payment.
5. CSR upgrades service for customer and confirms Customer.
external payment gateway.
This use case requires the CSR to obtain confirmation of payment before upgrading the service.
The integration with Payment gateway needs to be reliable and monitored for audit purposes.
The payment gateway service is an external RESTful service that the B2C Enterprise Customer has subscribed for.
What should an Integration Architect recommend for this integration?
Explanation
Make a callout to the payment gateway through ESB supporting error handling and logging for audit purposes. This solution meets the requirements of integrating with an external RESTful service, ensuring real-time updates to the CSR, and supporting post payment processes. ESB stands for Enterprise Service Bus, which is a software architecture model that allows communication between different applications via a common bus. ESB can handle the callout to the payment gateway service, and provide error handling, logging, routing, transformation, and orchestration capabilities. ESB can also integrate with other systems or services that are involved in the post payment processes, such as billing, invoicing, or reporting.
References: Certification – Integration Architect – Trailhead, [Enterprise Integration Patterns]
QUESTION 26
Northern Trail Outfitters (NTO) leverages Sales Cloud for tracking and managing leads, accounts, contacts, and opportunities- Orders and order fulfillment is taken care of by an Order Management System (OMS) in the back-office. When an opportunity has changed it’s status to “Closed/Won” and there are products attached, the details should be passed to the OMS for fulfillment operations.
The callout from Salesforce to the OMS should be synchronous.
What should an Integration Architect do to satisfy these requirements?
Explanation
A trigger is a programmatic way of executing some logic when a record is inserted, updated, deleted, or undeleted in Salesforce. A trigger can invoke an Apex class that contains the code to perform a REST callout to an external system. A REST callout is a way of sending an HTTP request to a service endpoint and receiving a response. A REST callout can be synchronous or asynchronous, depending on whether the Apex code waits for the response before continuing the execution. A synchronous callout is suitable for scenarios where the response is needed immediately, such as order fulfillment1.
An Apex proxy class is a class that is generated from a WSDL (Web Service Description Language) document of an external SOAP web service. An Apex proxy class can be used to make a SOAP callout to the external web service, but not a REST callout. A SOAP callout is another way of sending an HTTP request to a service endpoint and receiving a response, but it uses a different format and protocol than REST2.
Process Builder is a declarative tool that allows you to automate business processes by defining criteria and actions. Process Builder can invoke an Apex class that implements the Process.Plugin interface, which allows you to extend the functionality of Process Builder with custom logic. However, Process Builder does not support synchronous callouts, because it runs in the background and does not wait for the response from the external system. Process Builder only supports asynchronous callouts, which are executed after the transaction is committed3.
Batch Apex is a way of processing large volumes of data asynchronously by breaking them into smaller batches of records. Batch Apex can be used to perform complex or long-running operations on data, such as data cleansing, archiving, or integration. Batch Apex can make callouts to external systems by implementing the Database.AllowsCallouts interface in the batch class. However, Batch Apex is not suitable for scenarios where the callout needs to be synchronous, because it runs in the background and does not wait for the response from the external system. Batch Apex also has some limitations, such as the maximum number of batches in the queue, the maximum number of records per batch, and the maximum number of callouts per batch4.
A Lightning Component is a reusable unit of user interface that can be used to build modern web apps with Salesforce. A Lightning Component can make a callout to an external system by using JavaScript code or by invoking an Apex controller class that contains the logic for the callout. A Lightning Component can make a synchronous or asynchronous callout, depending on whether the JavaScript code or Apex code waits for the response before continuing the execution. However, a Lightning Component is not a good choice for scenarios where the callout needs to be triggered by a record change, such as when an opportunity is closed/won. A Lightning Component requires user interaction, such as clicking a button or loading a page, to initiate the callout5.
Therefore, the correct answer is A, because writing a trigger that invokes an Apex class to make a REST callout to the Order Management System is the only option that satisfies the requirements of making a synchronous callout when an opportunity is closed/won.
References: 1: Callouts From Triggers | Apex Developer Guide | Salesforce Developers 2: Generate an Apex Class from a WSDL | Apex Developer Guide | Salesforce Developers 3: Invoking Apex from Process Builder | Process Automation Developer Guide | Salesforce Developers 4: Using Batch Apex | Apex Developer Guide | Salesforce Developers 5: Make HTTP Requests from JavaScript Code in Lightning Components | Lightning Aura Components Developer Guide | Salesforce Developers
QUESTION 31
Northern Trail Outfitters (NTO) has hired an Integration Architect to design the integrations between existing systems and a new instance of Salesforce. NTO has the following requirements:
1. Initial load of 2M Accounts, 5.5M Contacts, 4.3M Opportunities, and 45k Products into the new org.
2. Notification of new and updated Accounts andContacts needs to be sent to 3 external systems.
3. Expose custom business logic to 5 external applications in a highly secure manner.
4. Schedule nightly automated dataflows, recipes and data syncs.
Which set of APIs are recommended in order to meet the requirements?
The set of APIs recommended to meet the requirements are Bulk API, Streaming API, Apex REST API, and Analytics REST API. Bulk API is a RESTful API that allows you to quickly load large amounts of data into Salesforce. Bulk API is suitable for the initial load of millions of records into the new org. Streaming API is a type of streaming event that notifies subscribers of changes to Salesforce records that match a SOQL query.
Streaming API is suitable for sending notifications of new and updated Accounts and Contacts to external systems. Apex REST API is an API that allows you to expose custom business logic as RESTful web services that can be accessed by external applications. Apex REST API is suitable for exposing custom business logic in a highly secure manner. Analytics REST API is an API that allows you to access analytics features, such as dashboards, lenses, datasets, and dataflows. Analytics REST API is suitable for scheduling nightly automated dataflows, recipes and data syncs. The other sets of APIs are not suitable for meeting all the requirements.
Chatter REST API is an API that allows you to access Chatter feeds and social data such as users, groups, followers, and files. Chatter REST API is not relevant for this scenario. Apex SOAP API is an API that allows you to expose custom business logic as SOAP web services that can be accessed by external applications. ApexSOAP API is less preferable than Apex REST API because it requires more bandwidth and processing time due to the XML format. Tooling API is an API that allows you to build custom development tools or apps for Salesforce applications. Tooling API is not relevant for this scenario.