Refresh supplier checks and draft a follow-up¶
Add these examples to the Supplier Review Workspace. Refresh supplier checks reloads the Checks section. Draft supplier follow-up prepares a supplier-facing email about incomplete checks. Prepare supplier check review uses an email template to prepare an internal handoff.
Use the shared fictional fixture. Northstar Industrial has a missing insurance certificate and a verified bank details check. Harbor Office Supply has a pending tax registration. Leave the recipient field blank because the fixture does not contain contacts.
Supplier Checks workflow¶
Each request loads the selected supplier. An If Condition handles the Supplier check lookup before the Switch routes the remaining requests. The refresh action starts a new InitDisplay request for the same supplier.
flowchart TD
Start([App request]) --> Supplier["Code · Load selected supplier"]
Supplier --> Filter{"If Condition · QueryFilterValues?"}
Filter -->|Yes| Values["Code and Return · Find matching check names"]
Filter -->|No| Route{"Switch · Message hint"}
Route -->|InitDisplay| Display["LLM · Render the Checks list"]
Route -->|AdditionalContent| Details["LLM · Render Check details"]
Route -->|InitActions| ActionCode["Code · Load refreshSupplierChecks"]
ActionCode -->|actionCode| Suggest["LLM · Suggest refreshing checks"]
Route -->|InitCommunications| Draft["LLM · Draft a supplier follow-up"]
Route -->|FillParameters| Fill["LLM · Fill the supplier review template"]
Route -->|Query| Query["LLM · Answer a check question"]
Route -->|SendCommunication| Acknowledge["LLM · Acknowledge the draft"]
Suggest -.-> Refresh["App · User selects Refresh checks"]
Refresh --> Reload["App · Request InitDisplay for the same supplier"]
Draft -.-> Review["App · User opens Review draft"]
Fill -.-> ReviewEmail["App · User reviews the template-backed email"]
Refresh the Checks section¶
- In App Builder, open Browse app components and select Actions > Create action.
- Set Code to
refreshSupplierChecksand Display Name to Refresh supplier checks. Use an action code without underscores. - Add Keep Action Available in UI followed by Refresh Agents. Select Section: Checks in Refresh targets.
- On the Checks advisor, enable Include in actions?. In
DEMO_SUPPLIER_CHECKS, routeInitActionsto the Load Refresh Action Code Code node, then to the Suggest Checks Refresh LLM node. Enable Enable Actions for the widgets under the LLM node’s App Experience. - Return the saved action code from the Code node as
actionCode. Pass it to the LLM with{{$context.$nodes.LOAD_REFRESH_ACTION.$output.result.actionCode}}. Ask the LLM to offer to refresh the selected supplier’s checks and to use the supplied code exactly.
Example LLM output
<oraInsight>
{
"title": "Refresh supplier checks",
"shortDescription": "Reload checks for the selected supplier.",
"actionText": "Refresh checks",
"followUpCommand": "ora.Invoke(\"refreshSupplierChecks\")",
"priority": true
}
</oraInsight>
The action code in ora.Invoke() must match the app’s Code field. The app keeps the selected supplier context when it reloads Checks.
Draft a supplier follow-up¶
- On the Checks advisor, enable Include in Communications?.
- Route
InitCommunicationsto an LLM and enable Enable Communications for the widgets under App Experience. Read the supplier ID from$context.$app.$OraAppContextand include only checks whose status isMISSINGorPENDING. - Ask the LLM to draft a short email about the incomplete checks and leave the recipient blank. In App Experience > Instructions, identify
DEMO_SUPPLIER_CHECKSas the workflow that handles the draft. ItsSendCommunicationbranch returns a draft-only acknowledgement, with no delivery step configured.
Sample output for Northstar Industrial
<oraComms>
{
"type": "email",
"title": "Draft supplier follow-up",
"shortDescription": "Review an email about incomplete supplier checks.",
"actionText": "Review draft",
"targetAgent": "DEMO_SUPPLIER_CHECKS",
"content": "Hello,\n\nWe are reviewing Northstar Industrial (SUP-1042). Could you share an update on the missing insurance certificate?\n\nThank you.",
"params": [
{"id": "email", "title": "Recipient", "defaultValue": ""},
{"id": "subject", "title": "Subject", "defaultValue": "Follow-up on supplier checks"}
]
}
</oraComms>
Create a template for the internal review¶
Use the Supplier Check Review email template when an analyst wants to hand off a supplier review. The analyst opens it from the app’s Communications area.
- In Browse app components > Document Templates, select Create template and choose Email. Name it Supplier Check Review.
- Turn off Auto Generate Recipients and leave Recipient and CC blank. Turn off Auto Generate Subject and enter Supplier check review as the subject.
- Add an editable section named Review handoff and enable Auto Fill Section. In Section Content, ask for the selected supplier’s name, ID, current status, and each check with its status. Ask the reviewer to confirm the next step for any incomplete checks. In Presentation Instructions, ask for a short internal email note.
- In Communications, select Add Communication. Set Title to Prepare supplier check review, Template to Supplier Check Review, Applicable Agents and Target Agent to Supplier Checks, and Action Text to Review email. The Checks advisor already has Include in Communications? enabled.
- In
DEMO_SUPPLIER_CHECKS, route theFillParametershint to Fill Supplier Review Template. Pass the requested fields from$context.$app.$OraCommParamsToFilland the selected supplier record. The LLM returns values keyed by the requested field IDs and leaves unknown fields blank. The workflow’sSendCommunicationpath returns a draft-only acknowledgement. The walkthrough ends at review.
Example template-backed email for Northstar Industrial
Subject — Supplier check review
Northstar Industrial (SUP-1042) is active. The insurance certificate is missing, and bank details are verified. Please confirm the next step for the missing certificate.
See Template Builder for email subject and section settings.
Run the examples in Preview¶
| Step | Expected behavior |
|---|---|
| Select Northstar and choose Refresh checks. | Checks shows Checking for updates, then reloads for SUP-1042. The action remains visible. |
| Select Northstar and choose Review draft. | The draft mentions the missing insurance certificate and leaves the recipient blank. The verified bank details check is excluded. |
| Switch to Harbor and choose Review draft. | The draft mentions the pending tax registration for SUP-2108. |
| Select Northstar and open Prepare supplier check review from Communications. | The draft uses the subject Supplier check review and includes both checks. Review the body and select Cancel. |
| Switch to Harbor and open the same template-backed communication. | The body names Harbor and includes the pending tax registration. Select Cancel after reviewing it. |
| Run the workflow with an empty or unrecognized supplier ID. | The workflow returns no supplier-specific action or communication. |
See Actions and Communications for output fields and configuration options.