Skip to content

Actions

Actions turn insight into execution. Agents recommend decisions, users approve them, and the system carries them out, all in the same experience.

The actions system has three parts:

  1. Actionable insights: <oraInsight> blocks that agents emit and that appear in the Actions panel
  2. Commands: what runs when a user clicks (ora.Invoke(), ora.Agent(), ora.App.*)
  3. Application actions: reusable step chains built in the Actions Editor

How agents produce actions

Agents emit <oraInsight> blocks during InitActions, alongside InitDisplay, and in responses to queries. Priority suggestions are promoted to Priority Actions; normal suggestions remain inline with agent content.

<oraInsight>
{
  "title": "Review Expiring Contract",
  "shortDescription": "AcmeParts contract expires in 3 days with $2.4M annual value.",
  "actionText": "Review & Renew",
  "followUpCommand": "ora.Invoke(\"reviewContract\", \"ACME-2024-001\")",
  "priority": true
}
</oraInsight>
Field Required Description
title Yes Under 10 words. The action heading.
shortDescription Yes One sentence on why the action matters
actionText Yes Button label; start with a verb ("Approve", "Escalate", "Investigate")
followUpCommand Yes What runs on click (see Commands)
priority No true promotes the action to Priority Actions. See Priority actions.
priorityLevel No With priority: true, use critical, urgent, or elevated (default). Omit for normal inline actions.

Configure startup action gathering

  1. In AI Agent Studio: Enable Actions for the widgets in the node's App Experience section.
  2. In the App Builder: Include in actions?, with an Initial Actions Prompt, in the Agent Editor.

Actions can also come from widgets: card link.action, message-list items[].action and multi-record rows[].action.

Command formats

Command Handled by Use when
ora.Invoke("code", payload) The action with that code; its steps decide how to forward the optional payload You need a defined, multi-step workflow
ora.Agent("text" \| {json}) The agent, through its normal processing path (much like a query); no step chain You want an ad-hoc follow-up instruction
ora.App.* The host application (UI, navigation, state); no agent call You only need to update the UI or navigate
Examples
ora.Invoke("refreshAllAgents")
ora.Invoke("viewOrderDetails", "ORDER-12345")
ora.Invoke("processItem", "{\"id\":\"123\",\"type\":\"urgent\"}")

ora.Agent("Investigate this variance and break it down by cost center")
ora.Agent({"command": "recalculate", "scope": "Q4"})

ora.App.update()
ora.App.launch("ORDERDETAILSAPP", {"orderId": "12345"})

Action steps determine the follow-up

An app-defined action runs its configured step chain. If an agentCommand step sends work to the originating agent, that workflow handles the follow-up action path. Navigation and refresh-only chains need no business-operation handler. Match the workflow inputs to the configured command/payload settings.

Receiving action commands

When a Send Agent Command step calls a workflow, use $context.$app.$OraMessageHint to recognize InvokeAction and read $context.$system.$inputMessage for the forwarded command or content. Also inspect $context.$app.$OraAction when the configured action path supplies action context there. Wire the values needed by the handler explicitly; an action code alone does not describe the complete receiving payload.

With sendPayloadAsContext: true, include the instruction and required record identifiers in the invoke payload. Test the actual step chain to confirm the receiving representation before writing its parser. Navigation-only and refresh-only actions do not require an agent command handler.

Action types

Type Behavior
Instant Runs in one click, then confirms and refreshes the display
Workflow Multiple steps: review summary, confirmation or extra inputs before execution
Communication-triggering Linked to a high-priority item; produces a tailored message for that record
Navigation Opens another Agentic App or view with context

Building actions in the Actions Editor

Open Browse app components › Actions to select an existing action, or click Create action in that section.

Field Description
Code Unique stable code used in ora.Invoke("<code>", …) to select the app-defined action. The step settings determine what reaches an agent.
Display Name Name shown to users
Description Optional notes on what the action does
Steps Ordered chain added with + Add Step; runs top to bottom

Step types

Step Schema type What it does Configuration
Keep Action Available in UI preserveAction Keeps the action visible after it runs, so it can be repeated (e.g. "Re-analyze") None
Navigate to App navigateToAgenticApp Opens another Agentic App for drill-down or navigation App Code; Pass Payload to Context (sends the payload as the target's $OraAppContext); or a static Context
Send Agent Command agentCommand Sends follow-up work to the agent through its InvokeAction path Command text or payload forwarding through Pass Payload to Context; put the instruction in the payload when forwarding it. Optional doNotAutoRefresh controls automatic refresh.
Refresh Agents refreshAgents Refreshes selected agent displays or panels after a change agentCodes[], panelTargets[], and optional priority-action and summary refresh settings
Show Media showMedia Opens media such as a video or media URL in the UI Optional title; static src or usePayloadAsUrl to take the URL from the invoke payload
Switch App Context switchAppContext Changes the current app context ($OraAppContext), optionally refreshing the app Use Payload as Context or static Context Value; Reload App (refreshApp)
Edit Artifact editArtifact Opens the artifact sidebar for review or editing No step parameters; put type, content, and other editor settings in the invoke payload. See Edit Artifact.
File download downloadFile Calls a same-origin endpoint and starts a browser download Required endpoint; optional method, usePayloadAsBody, filename, and contentType. See File downloads.

The table covers the seven UI step names and the additional downloadFile type supported in action definitions. The schema reference lists parameters for all eight types.

flowchart LR
    W[Widget / insight click] -->|"ora.Invoke('renewContract', id)"| A[Action: renewContract]
    A --> S1[Send Agent Command<br/><small>payload → agent</small>]
    S1 --> S2[Refresh Agents<br/><small>Procurement</small>]
    S2 --> S3[Keep Action Available]

Example action recipes

Goal Steps
Approve and update Send Agent Command (pass payload) → Refresh Agents
Drill down to details Navigate to App (App Code = detail app, pass payload)
Change time window Switch App Context (static context {"period":"month"}, Reload App on)
Repeatable re-analysis Send Agent Command → Refresh Agents → Keep Action Available in UI
Open a video Show Media with a static URL or a URL from the invoke payload
Review a draft Edit Artifact with text or rich-text content in the invoke payload
Export a file downloadFile with a same-origin endpoint that returns downloadable bytes

Keep chains short

Most actions need 2–3 steps. If an action needs more than 4–5, split it into separate actions with navigation between them.

Prompting agents for good actions

  • State the conditions. "Suggest an action when a contract expires within 14 days" beats "suggest actions when appropriate".
  • Name the command format. Say whether to use ora.Invoke("<code>", "<payload>"), ora.Agent() or ora.App.*.
  • Include data in the payload. Pass the record ID or JSON context; otherwise the steps have nothing to work on.
  • Keep priority: true rare. Reserve it for overdue, above-threshold or same-day items.
  • Keep titles short. Under 10 words, starting with a verb.

Common mistakes

Mistake Consequence Fix
No Refresh Agents after a data change Display shows stale data Add Refresh Agents for the affected agents
Switch App Context without a reload/refresh New context is set, but no agent uses it Turn on Reload App or add Refresh Agents
priority: true everywhere Nothing stands out Restrict it in the prompt
Payload missing from ora.Invoke The agent can't tell which record to act on Always pass the ID or context
Actions not enabled upstream No actions appear Turn on Enable Actions for the widgets

Action step schema reference

Actions support eight step types in ordered onInvoke chains:

Type Parameters and behavior
preserveAction No parameters; keep the originating action available
navigateToAgenticApp appCode; use static context or passPayloadAsContext
agentCommand command, sendPayloadAsContext, doNotAutoRefresh; when forwarding the payload, put the required instruction in it rather than relying on a separate command
refreshAgents agentCodes[], panelTargets[], and optional priority-action/summary refresh settings
downloadFile Required same-origin endpoint; optional method, usePayloadAsBody, filename, contentType
showMedia Optional title; use static src or usePayloadAsUrl
switchAppContext Use static context or usePayloadAsContext; refreshApp controls reload
editArtifact No step parameters; editor configuration comes from the invoke payload

agentCommand can auto-refresh; use explicit refresh steps when needed and avoid redundant refreshes. For new commands, prefer object payloads:

ora.Invoke("reviewContract", {"contractId":"ACME-2024-001","instruction":"Retrieve renewal options"})

File downloads

downloadFile reads file bytes from a same-origin endpoint and starts a browser download with credentials. Cross-origin URLs are rejected. If usePayloadAsBody is true, use POST or omit method for its POST default; otherwise the default is GET. The response's Content-Disposition filename overrides fallback filename. contentType sets the Accept header and can supply the blob MIME type.

The endpoint must exist and return the file; an action definition does not create an export service.

Edit Artifact

The editArtifact step opens the artifact editor sidebar. Define the step without parameters; the payload passed to ora.Invoke(...) supplies the artifact content and editor settings.

Step in the action's onInvoke chain
{"type":"editArtifact"}

Edit Artifact payload

Payload field Use
type Required: text, richText, structuredRichText, pdf, url, or html
id Optional artifact editor identifier; returned as the submission ID, with artifact as the fallback
title Optional heading at the top of the sidebar
value Initial string for text or rich text
sections For structured rich text, an array of {name, locked, text} objects instead of value
url PDF source URL or the iframe URL for URL artifacts
mediaType PDF URL mode: binary (default) or base64
highlightText Exact text to highlight in the PDF viewer
commitText Commit button label; for text and rich text, supplying it displays the button beside Close
metadata Optional arbitrary JSON preserved and returned on commit
html Specialized HTML flow options: parameters, apiUrl, pollIntervalMs, maxPollAttempts, successUrlTemplate, failureUrlTemplate, version, and linkedinSATExpiry
htmlParameters Shorthand record values for the HTML flow, such as crmOrgId, contact, FirstName, LastName, EmailAddress, PartyNumber, and AccountName

For example, configure an app action named editSupplierReview with an editArtifact step, then invoke it with:

ora.Invoke("editSupplierReview", {
  "id": "supplier_review",
  "type": "structuredRichText",
  "title": "Supplier Review",
  "sections": [
    {"name":"Summary","locked":false,"text":"<p>Review the latest delivery evidence.</p>"},
    {"name":"Next steps","locked":false,"text":"<p>Confirm the revised arrival dates.</p>"},
    {"name":"Footer","locked":true,"text":"<p>Internal review draft.</p>"}
  ],
  "commitText": "Save",
  "metadata": {"supplierId":"SUP-1042","source":"supplier_review"}
})

Structured rich text renders each section's text in the editor. Sections with locked: true remain visible and cannot be modified.

PDF and URL artifacts are read-only and produce no edited-value submission. A URL artifact requires url and opens in an iframe without a commit button.

The html type runs a specialized LinkedIn profile flow. It uses Fusion token relay for an ADF BC batch request, opens LinkedIn authorization when a valid SAT token is missing, polls for a valid token, and navigates to the success URL. HTML artifacts are read-only and do not return edited values.

How updates return to the agent

Committing an editable artifact sends an invoke-action follow-up to the same agent that opened the editor. Read the <oraFormSubmit> envelope from $context.$system.$inputMessage in that workflow's action handler. In chat history, this interaction appears as Modify artifact.

The envelope ID is the original payload's id, or artifact if none was supplied. Its JSON body contains newValue and, when provided originally, metadata:

Field Returned value
newValue for text or richText Latest editor content as a string
newValue for structuredRichText Updated sections array with name, locked, and each section's latest text; locked sections remain unchanged
metadata Original arbitrary JSON passed back unchanged

For text or rich text, the response looks like:

<oraFormSubmit id="supplier_review">
{"newValue":"Updated supplier review","metadata":{"supplierId":"SUP-1042","source":"supplier_review"}}
</oraFormSubmit>

For the structured rich text example above, it looks like:

<oraFormSubmit id="supplier_review">
{"newValue":[{"name":"Summary","locked":false,"text":"<p>Delivery evidence reviewed.</p>"},{"name":"Next steps","locked":false,"text":"<p>Request confirmation of the revised dates.</p>"},{"name":"Footer","locked":true,"text":"<p>Internal review draft.</p>"}],"metadata":{"supplierId":"SUP-1042","source":"supplier_review"}}
</oraFormSubmit>

Artifact Preview uses the same viewer payload and adds the preview item's stable ID as metadata.artifactId. When a save originates from that widget, the matching preview card updates in place. Process the returned submission in the workflow even when the preview already displays the changes. See Record widget for an envelope-parsing example; route by form ID because record forms and artifact saves have different JSON bodies.

Autonomous plans

ora.InvokeAsync({"mode":"Research"}, "task text") prepares an Autonomous Outcomes plan preview and waits for Start. Its first argument must be a strict JSON options object. Modes are Quick, Research, Act, and Full Auto; invalid or missing mode defaults to Research. See Autonomous Outcomes.

Immediate Actions

Use <oraImmediateInsight> when the user has explicitly asked the app to execute a command immediately. The runtime executes its followUpCommand without an additional confirmation click. For suggested actions that the user should review before running, return a normal <oraInsight>.

The payload contains only followUpCommand; omit display fields such as title, shortDescription, and actionText.

<oraImmediateInsight>
{
  "followUpCommand": "ora.Invoke(\"refreshAllAgents\")"
}
</oraImmediateInsight>

In this example, the app runs the configured refreshAllAgents action immediately. Define the matching app action and its steps before emitting the command. Use immediate actions sparingly and make the workflow distinguish an explicit execution request from a request for advice or a recommendation.

Priority actions

Set priority: true on an <oraInsight> to promote an action needing immediate attention into the dedicated Priority Actions area. When priority is omitted or false, the action stays inline with the agent's regular action content.

Use optional priorityLevel to control ordering and badges within Priority Actions:

priorityLevel Display behavior
critical Shows a critical badge and sorts first
urgent Shows an urgent badge and sorts after critical actions
elevated Appears in Priority Actions without a badge; default when priority: true and no level is supplied
<oraInsight>
{
  "title": "Review Overdue Approval",
  "shortDescription": "The approval deadline has passed and the request needs attention.",
  "actionText": "Review Request",
  "followUpCommand": "ora.Invoke(\"reviewRequest\", {\"id\":\"REQ-101\"})",
  "priority": true,
  "priorityLevel": "urgent"
}
</oraInsight>

The matching app-defined action must exist for reviewRequest to run. For a normal inline action, omit priorityLevel and either omit priority or set it to false. Reserve promotion for items that need immediate attention so routine suggestions remain easy to distinguish.