PD1 Integration Architecture 2 — Questions and Answers
Question 1: A developer needs to call an external REST API from Apex. Which class should be used to make the HTTP request?
- HttpRequest (Correct answer)
- WebServiceCallout
- RestClient
- ExternalService
Correct answer: HttpRequest
HttpRequest is the Apex class used to configure and send HTTP requests to external endpoints.
Question 2: Which Salesforce feature allows declarative integration with external REST APIs without writing Apex code?
- Named Credentials
- External Services (Correct answer)
- Connected Apps
- Remote Site Settings
Correct answer: External Services
External Services lets admins register external REST APIs and invoke them via Flow or Process Builder without writing Apex.
Question 3: What is the maximum timeout value (in milliseconds) for a single Apex callout?
- 10000
- 60000
- 120000 (Correct answer)
- 30000
Correct answer: 120000
Apex callouts have a maximum timeout of 120,000 milliseconds (120 seconds).
Question 4: A developer is building a real-time data sync integration where Salesforce must push updates to an external system immediately after a record is saved. Which approach is BEST?
- Scheduled Apex batch
- Outbound Message via Workflow
- Platform Event published in a trigger (Correct answer)
- Polling with REST API
Correct answer: Platform Event published in a trigger
Platform Events published in an Apex trigger provide near-real-time, event-driven push integration with external systems.
Question 5: When using Salesforce Connect to access external data, which protocol does the OData adapter use?
- SOAP
- OData 2.0 or 4.0 (Correct answer)
- GraphQL
- MQTT
Correct answer: OData 2.0 or 4.0
Salesforce Connect's OData adapter supports OData 2.0 and OData 4.0 protocols to query external systems.
Question 6: Which limit applies when an Apex trigger makes a callout inside a transaction that already performed DML operations?
- Callouts are allowed after DML with no restrictions
- Callouts are completely forbidden after DML in the same transaction (Correct answer)
- Only SOAP callouts are forbidden; REST callouts are fine
- Callouts require a @future annotation when made after DML
Correct answer: Callouts are completely forbidden after DML in the same transaction
Salesforce prohibits HTTP callouts after DML in the same transaction to avoid uncommitted data being sent externally; use @future or queueable to decouple.
Question 7: A company wants Salesforce to receive data from an external IoT device in real time using a lightweight publish/subscribe model. Which Salesforce feature is MOST appropriate?
- Streaming API with PushTopic
- Platform Events (Correct answer)
- Bulk API 2.0
- SOAP Inbound Message
Correct answer: Platform Events
Platform Events support a lightweight publish/subscribe model ideal for IoT device data ingestion in near real time.
A developer needs to call an external REST API from Apex.
Which class should be used to make the HTTP request?