Answer Ask Oracle questions about the selected supplier¶
Use a dedicated query workflow to answer questions about the selected supplier's status and checks. The user can ask for details without switching panels.
To help users compose a question, configure dynamic starter queries and a Supplier check filter. Questions composed this way are submitted to the same query workflow.
Supplier Query workflow¶
flowchart TD
Start([App request]) --> Supplier["Code · Load selected supplier"]
Supplier --> Route{"If Condition · Is the hint Query?"}
Route -->|Yes| Answer["LLM · Answer from the selected supplier record"]
Answer --> End([Return the answer to Ask Oracle])
Route -->|No| Unsupported["Return · Direct the user to Ask Oracle"]
Configure the workflow¶
Expose DEMO_SUPPLIER_QUERY to Agentic Apps. Use the shared supplier fixture to look up the supplier selected in the app.
- Read the ID from
$context.$app.$OraAppContextand find the matching supplier in the fixture. - Add an If Condition with
{{$context.$app.$OraMessageHint === "Query"}}. Route true to the answer LLM. On the false path, return a short message directing the user to Ask Oracle. - Pass
{{$context.$system.$inputMessage}}and the supplier record to the LLM in separate parts of the prompt. Instruct the model to answer from the selected record. If no supplier matches, ask the user to select one. If the record lacks a requested detail, say it is unavailable. - Enable Include chat history to resolve references such as “that check.” Use the current supplier record for facts, including after a context switch. Connect the LLM to End to return a plain-text answer.
- In App Builder, set Custom Query Agent Code to
DEMO_SUPPLIER_QUERYunder Ask Oracle.
Run the example in Preview¶
With Northstar Industrial selected, ask “Which checks are incomplete?” Then ask “Which one is missing?” Switch to Harbor Office Supply and ask about incomplete checks again.
| Scenario | Expected behavior |
|---|---|
Ask about incomplete checks with SUP-1042 selected |
The answer names the missing insurance certificate. |
| Ask “Which one is missing?” | The answer resolves the follow-up within the current supplier context. |
Switch to SUP-2108 and ask “Which checks are incomplete?” |
The answer reports pending tax registration for Harbor Office Supply. |
| Ask for an unsupported detail | The answer states that the selected record lacks that detail. |
Related guides
Ask Oracle Advisors · LLM configuration · Assemble the app