Destinations overview

What happens after a decision — per option, score level, probability threshold or final action — fixed replies, LLM answers, your agent, workflows, signed webhooks, HTTP requests and functions.

A decision answers what: result, confidence and the action. Destinations say what happens next for each result — like the routes of a phone tree. Attach one or more destinations to an option (route = sales), a score level (priority = critical), a probability threshold (purchase_intent ≥ 0.8) or a final action (escalate), and every call that lands there answers the caller, hands the case off or tells your code what to run.

Destinations are part of the decision schema: they are edited in the draft, tested in the Playground and reach production when you deploy, like questions and policies.

state ──▶ answers ──▶ composites ──▶ policies ──▶ action ──▶ destinations
                                                               ├─ answer the caller: fixed reply · LLM · agent
                                                               ├─ hand off:          workflow · webhook · API request
                                                               └─ your code:         function

Destination types

TypeIn the appWho runs itWhat happens
replyFixed replyDcision renders itReturns a ready message — text and buttons — in the response. No model call.
llmLLMDcision calls OpenRouter or Vercel AI Gateway with your keyA model answers with the route's prompt; its text comes back in the response.
agentAgentDcision calls your agent's endpointsync: the agent's reply comes back in the response. async: a hand-off, delivered in the background.
workflowWorkflowDcision, in the backgroundTriggers n8n, Make, Zapier, Pipedream or any workflow URL with the route's variables.
webhookWebhookDcision, in the backgroundPOSTs the signed decision result to your URL.
httpAPI requestDcision, in the backgroundCalls any API: method, URL, headers and a JSON body with variables and secrets.
functionFunctionYour codeThe response names a function and its params; the SDKs call your handler.

The editor groups them the same way: Answer the caller (fixed reply, LLM, agent), Hand off (workflow, webhook, API request) and Your code (function).

Which one to use

  • Answer an end user right away with a known text — a confirmation, a link, quick-reply buttons: a fixed reply. It costs nothing and adds no latency.
  • Answer with generated text, specific to the route — "you are the billing team…": an LLM answer, with your OpenRouter or Vercel AI Gateway key.
  • Let your own agent take over, with its tools and memory: an agent — sync to return its reply now, async to hand off.
  • Start a no-code automation in n8n, Make, Zapier or Pipedream: a workflow.
  • Notify your backend with a signed event: a webhook.
  • Call a third-party API directly — create a CRM lead, open a ticket, post to Slack — with a token kept in workspace secrets: an API request.
  • Run code in the process that called the decision: a function, dispatched by the SDKs.

A decision can mix them: route = sales can return a fixed reply and trigger a CRM workflow and tell your code to assign an owner.

What a call returns

Destinations are selected after the action is chosen. The response gets a destinations array with one entry per destination that fired, in schema order:

  • Fixed replies and functions are returned at once.
  • LLM answers and agents in sync mode are called while the caller waits — in parallel, each with its own timeout — and their answers are returned.
  • Webhooks, API requests, workflows and agents in async mode are queued and delivered in the background, with retries: the response returns their delivery_id.
200 OK — Lead Qualification with destinations
{
  "decision_id": "dec_3fKq9ZtW1mXcV7bN2pLa",
  "execution_id": "exec_8HsT2kQw9ZyR4vMn1cXe",
  "schema": "lead-qualification",
  "version": 4,
  "result": { "purchase_intent": 0.9412, "priority": "high", "route": "sales" },
  "confidence": { "purchase_intent": 0.8824, "priority": 0.69, "route": 0.85 },
  "scores": { "priority": 2.81 },
  "composites": { "lead_score": 0.8414 },
  "action": "continue",
  "action_reason": { "type": "default" },
  "destinations": [
    {
      "key": "sales_reply",
      "type": "reply",
      "text": "Thanks! Someone from our sales team will contact you today.",
      "buttons": ["Book a demo", "See pricing"]
    },
    { "key": "sales_crm", "type": "workflow", "status": "queued", "delivery_id": "dlv_8kJx2mQp4LzN7vR1tY6w" },
    {
      "key": "hot_lead",
      "type": "function",
      "function": "assignToSales",
      "params": { "message": "We need pricing for 500 users and want to start next month." }
    }
  ],
  "metrics": {
    "latency_ms": 418,
    "engine": "jev",
    "model": "jev-1.13.0",
    "estimated_cost_usd": 0.00001575,
    "input_tokens": 375,
    "output_tokens": 36
  }
}

destinations is present whenever the decision has destinations — [] when none fired — and absent otherwise. Every entry is described in Run a decision.

Destinations never fail the decision

A destination that can't run — a missing param, an LLM without a key, an unreachable agent, a full queue — shows up on its own entry (skipped or failed). The decision still answers 200 with its result and action, and it is billed like any other.

Set them up in the editor

Pick the answer

In the editor's Questions card, every choice option has a Destination selector on its own row. It shows the type of the destination already attached (with +1, +2… when there are more); on the reserved other option it reads Fallback · escalate — the decision's fallback action — until you attach one.

  • Score questions have a Destination per level row: one selector per level.
  • Probability questions have Destination when … ≥ …: a threshold on the probability of yes, 0.8 by default.

Choose the type

Click the selector to open the panel When route = sales. It lists the destinations of that answer, editable in place; Add destination shows the seven types as cards, grouped into Answer the caller, Hand off and Your code.

Configure it

Each destination has a key (snake_case, unique in the decision), an Active switch and:

  • When — the conditions that make it fire. The panel already holds route = sales; set a Minimum confidence for this route in percent, add more conditions, or require a final action. See Triggers.
  • The type's settings — the reply text, the model and prompt, the agent's endpoint, the URL…
  • Params — the variables it uses, from a field or a fixed value. See Params and templates.

Test and deploy

Run the draft in the Playground: destinations are previewed — nothing is sent — until you switch on Run destinations for real. Then deploy: API calls fire the destinations of the new version.

The Destinations card, after Policies in the editor, lists every destination of the decision (up to 20) and adds ones that aren't tied to a single answer — for example every decision, or action is escalate.

In the visual builder

The builder's palette has a Destinations group with the seven types. Destinations appear as nodes after the Output node, connected by an edge labeled with the trigger (route = sales · route confidence ≥ 0.8) — dashed when the destination is switched off. Choice options show a small count of the destinations attached to them. Select a node to edit it in the inspector.

The palette, each of its groups and the inspector are collapsible; the layout is remembered in your browser, and selecting a node reopens a collapsed inspector.

In the schema

decision.json (excerpt)
{
  "destinations": [
    {
      "key": "sales_reply",
      "type": "reply",
      "when": { "conditions": [{ "field": "route", "on": "output", "operator": "eq", "value": "sales" }] },
      "reply": { "text": "Thanks! Someone from our sales team will contact you today.", "buttons": ["Book a demo", "See pricing"] }
    },
    {
      "key": "sales_crm",
      "type": "workflow",
      "when": {
        "conditions": [
          { "field": "route", "on": "output", "operator": "eq", "value": "sales" },
          { "field": "route", "on": "confidence", "operator": "gte", "value": 0.8 }
        ]
      },
      "params": {
        "message": { "from": "state.message", "required": true },
        "company_size": { "from": "state.company_size" },
        "lead_score": { "from": "composites.lead_score" }
      },
      "workflow": { "platform": "n8n", "url": "{{secrets.N8N_LEADS_WEBHOOK}}", "name": "New sales lead" }
    },
    {
      "key": "hot_lead",
      "type": "function",
      "when": { "conditions": [{ "field": "purchase_intent", "on": "output", "operator": "gte", "value": 0.8 }] },
      "params": { "message": { "from": "state.message" } },
      "function": { "name": "assignToSales" }
    },
    {
      "key": "escalation_alert",
      "type": "http",
      "when": { "actions": ["escalate"] },
      "http": {
        "method": "POST",
        "url": "{{secrets.SLACK_WEBHOOK}}",
        "body": "{\"text\": \"A lead needs a person: {{decision.slug}} execution {{execution.id}}\"}"
      }
    }
  ]
}
FieldTypeDefaultDescription
keystring—Unique among the decision's destinations; snake_case, up to 48 characters. It identifies the entry in responses, deliveries and the Overview.
descriptionstring—Optional, up to 2,000 characters.
enabledbooleantrueSwitched-off destinations never fire.
whenobjectevery decisionconditions (AND) and actions — see Triggers.
typestring—reply, llm, agent, workflow, webhook, http or function.
paramsobject{}Up to 30 variables — see Params and templates.
reply, llm, agent, workflow, webhook, http, functionobject—The settings of the type: exactly the block named in type.

Saving or deploying a schema with an invalid destination fails with 422 INVALID_SCHEMA and a path such as destinations.1.workflow.url — the editor links it with Go to error.

Roles

ActionWho
Add, edit and remove destinations (they are part of the decision), deploy themMembers, Admins and the Owner
Resend a failed deliveryMembers, Admins and the Owner
See deliveries and their statusEveryone in the workspace, Viewers included
See the names of workspace secretsMembers, Admins and the Owner
Add, replace or delete secrets; reveal or rotate the signing secretAdmins and the Owner

See Team, roles and account.

Next steps

On this page