Exam Agentforce-Specialist Topic 1 Question 93 Discussion

Actual exam question for Salesforce's Agentforce-Specialist exam
Question #: 93
Topic #: 1
Universal Containers is building an Agentforce Service Agent to help customers track their purchases. To store the customer's order number during the conversation, the Agentforce Specialist creates and initializes a variable in Agent Script using the declaration order_id: string = " " , omitting the mutable keyword. During testing, the agent attempts to update this variable with the user's order number via the @utils.setVariables utility.
What is the result of this variable declaration at runtime?

Suggested Answer: C Vote an answer

The correct answer is C because Agent Script variables are read-only unless they are explicitly declared with the mutable keyword. A regular variable without mutable can be referenced, but the agent cannot change its value during the conversation. That is exactly why order_id: string = " " is not suitable for capturing the customer's order number during runtime. To store information gathered from the user, the variable must be declared as a mutable string, such as order_id: mutable string = " " . Option A is wrong because mutability is not the default. Option B is wrong because the declaration itself is valid syntax; it simply creates a nonmutable variable. The runtime failure occurs when the agent or utility attempts to update it.

by Porter at Jun 29, 2026, 09:08 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10