Site icon Exam4Training

What should a developer use to satisfy this requirement?

Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls.

At one of the steps in the flow, the agents should be presented with a list order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen.

What should a developer use to satisfy this requirement?
A . An Apex controller
B . An invocable method
C . An outbound message
D . An Apex REST class

Answer: B

Explanation:

To retrieve data from an external system in real time during a flow, the developer should use an invocable method.

Option B: An invocable method

Invocable methods can be called from Flow to execute Apex code. By annotating an Apex method with @InvocableMethod, you can expose it to Flows. If the method needs to make a callout to an external system, it must be annotated with (callout=true).

public with sharing class OrderService {

@InvocableMethod(callout=true)

public static List<OrderInfo> getOrderData(List<String> inputs) { // Callout to external system and return data

}

}

Reference: "To invoke Apex methods that perform callouts from a flow, use the @InvocableMethod annotation with callout=true."

― Salesforce Developer Guide: Invocable Methods Why Other Options Are Incorrect:

Option A: An Apex controller is typically used with Visualforce pages or Aura components, not directly with Flows.

Option C: An outbound message sends data to external systems but does not retrieve data.

Option D: An Apex REST class exposes endpoints for external systems to call into Salesforce, not for Salesforce to call out.

Latest DEX-450 Dumps Valid Version with 456 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version