Hi Team I was practising https://trailhead.salesforce.com/content/learn/projects/customize-a-service-agent-with-prompts-flows-and-actions/update-a-flow-agent-action-and-topic?trail_id=become-an-agentblazer-innovator-2026
this trailhead and I saw get sessions method being called
actions:
Get_Sessions: @actions.Get_Sessions
with experienceId = ...
with startDate = @variables.converted_date
although in trailhead it was not mentioned to try but i wanted to see how to pass vairables to actions .I observed that irrespective of variable value available or not it always passes null
in other actions slot filling mechanism is used .
Get_Experience_Details: @actions.Get_Experience_Details
with experienceName = ...
As per observations it seems to call any actions we have to use slot filling only variables cannot be used.
Community please correct me if i am doing wrong
@Ankit Jain I would not read this as "variables cannot be passed to actions." They can be used, but the timing matters.
In Agent Script there are two different patterns. If the action is exposed to the LLM as a reasoning action, slot filling can populate the action inputs. That is the with experienceName = ... style. The LLM decides the value at runtime.
If you pass with startDate = @variables.converted_date, then converted_date must already have a real value before that action runs. If the variable was not explicitly set earlier, or if it is only mentioned in instructions but not actually assigned, the action will receive null. Salesforce’s docs say variables are used to store state and can be used as inputs to actions, but when actions are run deterministically in instructions, inputs and outputs must be manually assigned because the action runs before reasoning takes place.
So for your case, either let the action slot-fill the date directly:
with startDate = ...
or set converted_date first through a prior action/logic step, then call Get_Sessions using that variable.
Also check that converted_date is defined as the correct type, likely date, and that the value is in the expected format. Salesforce’s Agent Script variable reference says variables are referenced as @variables.variable_name in script, and as {!@variables.variable_name} inside reasoning instructions.
Slot filling works when the LLM is deciding the input. But variables also work, as long as they are populated before the action is called.