An agent calls a workflow to check stock. The workflow needs a product code and must return the quantity. How do you set this up?
- Exam domain
- Plan and configure agent solutions50–55% of the exam
- Difficulty
- Medium
- In this mock
- 26 questions on this domainPractise this domain
Why the exam asks this
Create and configure workflows
Objective in the exam guide: Add input and output parameters
Workflows used as tools must define what goes in and what comes back.
Why A is the answer
Input and output parameters on the workflow
Input and output parameters are the contract between the caller and the workflow. The agent fills the input, and the output comes back for the agent to use in its answer.
Remember: Inputs in, outputs back.
How it works
Input parameters are what the caller provides. Output parameters are what the workflow returns.
Clues in the question
The words that point to the answer, and what each one tells you.
- needs a product code and must return
- An input and an output.
In detail
- Clear parameter names and descriptions help the orchestrator fill them.
- Outputs return data to the calling agent.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Input and output parameters on the workflowRight
Inputs in, outputs back.
B. Store the product code in a global variable the workflow readsWrongMost tempting
A shared variable is not the workflow's interface.
Why it tempts: Variables feel familiar from other tools, but they are not the workflow's contract.
C. Have the workflow email the quantity to the userWrong
Email does not return data to the agent.
D. Hard-code a product code in the workflowWrong
A fixed code answers only one product.
Use case
An illustrative scenario, not a real incident.
Illustrative: a user asks how many units of SKU 4471 are left. The agent passes the code, and the workflow returns 38.
See it in different ways
sequenceDiagram participant P0 as Agent participant P1 as Stock workflow P0->>P1: input product code P1-->>P0: output quantity
How to read this chart
- 1. Agent sends "input product code" to Stock workflow.
- 2. Agent gets a reply from Stock workflow: "output quantity".
flowchart LR S0["Receive product code"] --> S1["Query inventory"] --> S2["Return quantity"]
How to read this chart
- Read it in order: Receive product code, then Query inventory, then Return quantity.