Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified Agentforce Specialist (AI-201) Exam - Topic 2 Question 20 Discussion

Posted by Pok on Mar 31, 2026 at 02:22 AM

An Agentforce Specialist needs to create a prompt template to fill a custom field named Latest Opportunities Summary on the Account object with information from the three most recently opened opportunities. How should the Agentforce Specialist gather the necessary data for the prompt template?

Suggested Answer: B

In Salesforce Agentforce, a prompt template designed to populate a custom field (like 'Latest Opportunities Summary' on the Account object) requires dynamic data to be fed into the template for AI to generate meaningful output. Here, the task is to gather data from the three most recently opened opportunities related to an account. The most robust and flexible way to achieve this is by using a Flow (Option B). Salesforce Flows allow the Agentforce Specialist to define logic to query the Opportunity object, filter for the three most recent opportunities (e.g., using a Get Records element with a sort by CreatedDate descending and a limit of 3), and pass this data as variables into the prompt template. This approach ensures precise control over the data retrieval process and can handle complex filtering or sorting requirements.

Option A: Selecting the 'latest Opportunities related list as a merge field' is not a valid option in Agentforce prompt templates. Merge fields can pull basic field data (e.g., {!Account.Name}), but they don't natively support querying or aggregating related list data like the three most recent opportunities.

Option C: There is no 'Account Opportunity object' in Salesforce; this seems to be a misnomer (perhaps implying the Opportunity object or a junction object). Even if interpreted as selecting the Opportunity object as a resource, prompt templates don't directly query related objects without additional logic (e.g., a Flow), making this incorrect.

Option B: Flows integrate seamlessly with prompt templates via dynamic inputs, allowing the Specialist to retrieve and structure the exact data needed (e.g., Opportunity Name, Amount, Close Date) for the AI to summarize.

Thus, Option B is the correct method to gather the necessary data efficiently and accurately.


Salesforce Agentforce Documentation: 'Integrate Flows with Prompt Templates' (Salesforce Help: https://help.salesforce.com/s/articleView?id=sf.agentforce_flow_prompt_integration.htm&type=5)

Trailhead: 'Build Flows for Agentforce' (https://trailhead.salesforce.com/content/learn/modules/flows-for-agentforce)

Get Premium Salesforce Certified Agentforce Specialist (AI-201) Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
12 comments · newest first
GL
Glory 3 months ago
C could work too, but it feels a bit indirect. Flows are more efficient.
ST
Stephaine 3 months ago
I agree, but A seems simpler. Just pull the latest list directly.
ID
Idella 3 months ago
I think option B is the best. Flows are powerful for data retrieval.
MI
Mireya 4 months ago
I agree, B is definitely the way to go!
ED
Edison 4 months ago
Wait, can you really pull data like that? Sounds tricky!
DO
Dominic 4 months ago
C? Really? That doesn't sound right.
ER
Erinn 5 months ago
I think A could work too, but B seems more reliable.
JA
Janna 6 months ago
B is the best option for gathering data efficiently.
HA
Harrison 6 months ago
I recall a similar question where we had to gather data for a report. I think using a flow was the right approach then, so maybe B is the best option here as well.
TO
Toshia 7 months ago
I feel like selecting the Account Opportunity object could be a good choice too, but I'm not confident about how that works in this context.
RU
Rutha 7 months ago
I'm not entirely sure, but I remember something about merge fields being useful for templates. Could that be option A?
DE
Deja 7 months ago
I think option B sounds familiar; we practiced creating flows to pull data from related records.
0/2000 characters

Save Cancel