SF-Admin Agentforce AI Practice Question
An administrator at Get Cloudy Consulting is building an Agentforce Service Agent to help customers reset their portal passwords. The agent must verify the customer's identity before allowing the reset. The administrator wants the agent to collect a one-time code sent to the customer's registered email and validate it against a record in Salesforce. Which Agentforce configuration should the administrator use to collect and validate the code within the conversation?
⚠ Common exam trap
The trap here is assuming that any Agentforce feature that can reference customer data, such as a prompt template or Data Cloud segment, can also perform a deterministic validation check.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Create an Agent Action that invokes an Apex class annotated with @InvocableMethod, and add it to the relevant Topic.
Collecting a value in conversation and validating it against a Salesforce record requires deterministic server-side logic. An Apex action exposed through @InvocableMethod can take the collected code as input, query the record, and return a result the agent can act on. Prompt templates, Data Cloud segments, and Einstein Activity Capture do not perform real-time record validation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create an Agent Action that invokes an Apex class annotated with @InvocableMethod, and add it to the relevant Topic.
Why this is correct
An @InvocableMethod Apex action can accept the one-time code as an input, query the record, and return a validation result to the agent. This is the supported way to run custom server-side logic from an Agentforce Topic, so the agent can branch on the returned value. No other listed mechanism performs a server-side record check during the conversation.
- ✗
Enable Einstein Activity Capture on the customer's contact record so the agent can read the code.
Why it's wrong here
Einstein Activity Capture syncs emails and events to Salesforce; it has no role in collecting or validating a one-time code during an agent conversation. It also cannot return a decision to the agent's reasoning. Using it here would not verify identity and could expose unrelated activity data.
- ✗
Add the code as a Prompt Template variable and let the agent compare it to the customer's email address.
Why it's wrong here
Prompt Templates generate text using a model; they do not query Salesforce records or perform deterministic validation. A prompt template cannot reliably compare a collected code to a stored record, and it introduces model variability into a security check. Identity verification requires deterministic logic, which prompt templates do not provide.
- ✗
Configure a Data Cloud segment that includes the customer's code and attach it to the agent's Topic.
Why it's wrong here
Data Cloud segments are used to group and activate customer data for personalization and targeting, not to validate a value supplied mid-conversation. A segment is computed asynchronously and cannot return a pass/fail result to the agent in real time. This does not satisfy the requirement to check the entered code against a record.
About these practice questions
This SF-Admin question is part of Courseiva's 202-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Salesforce exam blueprint
This SF-Admin practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-Admin exam.