According to the AgentForce Session Memory and Context Management Guide, when specific customer preferences (such as dietary or activity selections) must persist throughout an interaction, the correct approach is to use a context variable. The documentation states: “Context variables retain information across the user session, enabling the agent to reference prior inputs or outputs without re-asking. They are ideal for persisting customer preferences, authentication data, or ongoing session parameters.”
By contrast, custom variables (Option A) are typically used for storing intermediate action outputs but are not automatically persistent across the full session. Relying on conversation memory (Option B) alone is non-deterministic and may cause data loss due to memory truncation or token limits.
Thus, Option C — creating a context variable to store and recall customer preferences — aligns with Salesforce’s recommended implementation for session-level persistence.
References (AgentForce Documents / Study Guide):
AgentForce Configuration Guide: “Using Context Variables for Session Data”
AgentForce Study Guide: “Persistent Memory and Variable Management”
AgentForce Implementation Handbook: “Maintaining Context Across User Sessions”