Skip to content

IVR flows ​

MethodPathBodyResponse
PUT/v1/tenants/{t}/ivr-flows/{flowRef}see below{ ivrFlow }
GET/v1/tenants/{t}/ivr-flows—{ ivrFlows } (without structure)
GET/v1/tenants/{t}/ivr-flows/{flowRef}—{ ivrFlow } (with structure)
DELETE/v1/tenants/{t}/ivr-flows/{flowRef}—204 — see Deleting
json
{
  "name": "Main menu",
  "channel_ref": "whatsapp-main",
  "status": "ACTIVE",
  "trigger_condition": "ALWAYS",
  "trigger_priority": 0,
  "timeout_seconds": 10,
  "agent_ring_timeout": 60,
  "schema_version": 1,
  "structure": {
    "nodes": [
      { "id": "start", "type": "ivr_start", "data": {} },
      { "id": "menu", "type": "ivr_menu", "data": { "audioFileId": 12, "timeoutSeconds": 8, "noInputAction": "replay" } },
      { "id": "sales", "type": "ivr_transfer", "data": { "targetType": "queue", "targetId": 3 } },
      { "id": "bye", "type": "ivr_hangup", "data": {} }
    ],
    "edges": [
      { "source": "start", "target": "menu" },
      { "source": "menu", "target": "sales", "sourceHandle": "1" },
      { "source": "menu", "target": "bye", "sourceHandle": "9" }
    ]
  }
}

ivrFlow: { id, ref, name, channelId, schemaVersion, triggerCondition, triggerPriority, timeoutSeconds, agentRingTimeout, status, structure }.

FieldValuesOmitted
namerequired, ≤255 chars—
structurerequired, { nodes: [], edges: [] }—
channel_refa channel of this tenant; none = tenant-widenull
statusACTIVE, INACTIVEINACTIVE
trigger_conditionALWAYS, ALL_AGENTS_BUSY, ALL_AGENTS_OFFLINE, ALL_AGENTS_UNAVAILABLEALWAYS
trigger_priority0–100000
timeout_seconds1–12010
agent_ring_timeout5–600 — how long an agent the flow transfers to may ring before the call ends as IVR_AGENT_NO_ANSWER60
schema_version11
  • Selection on an inbound call, among ACTIVE flows: flows for that channel first, then tenant-wide flows; within each, lowest trigger_priority first, then most recently updated. The first whose trigger_condition holds takes the call. Conditions are evaluated over the channel's inbound queue.
  • Node types: ivr_start, ivr_menu (plays audioFileId, waits for a key; edges' sourceHandle is the digit), ivr_play, ivr_transfer (targetType: queue|agent, targetId = queue/agent id; no targetId = the channel's inbound queue; offlineAction/busyAction with offlineAudioFileId/busyAudioFileId for unavailable targets), ivr_hangup. Ids inside nodes are Calloop ids (audio assets, queues, agents).
  • structure is checked on save, and the first problem is a 400 whose details.field is its path (e.g. structure.nodes[2].data.digits): at most 500 steps and 2000 edges; unique step ids; known node types; at most one ivr_start; an ivr_menu's digits are distinct keys 0–9 * # and its timeoutSeconds 1–120; noInputAction replay|hangup, offlineAction hangup|queue|replay, busyActionwait|hangup|queue|replay; every audio, queue and agent id is this tenant's; every edge joins two steps. An unfinished flow (a menu without a prompt, a key leading nowhere) may still be saved.
  • Keys are detected in-band from the customer's audio.

Calloop — the call engine behind your product.