Skip to content

Flow blocks

Every block the flow designer offers, grouped as its palette groups them. A block's settings are the fields it carries in a flow document, and its output ports are where a cable can leave it.

Generated

This page is built from the flow schema the engine validates against and from the designer's block catalogue, so it describes exactly the release it was published with.

Start

Inbound number

inbound: Where calls to your numbers start.

Where calls to these numbers start. A call takes the most specific claim that matches it: a number named in numbers, then a block in ranges, then catch_all. Output port: next.

Settings

  • numbers (required): list of text. Dialled numbers, digits with an optional leading +. A number leads to one flow on the whole system, and beats any block that holds it.
  • ranges (optional): list of number range (default []). Blocks of consecutive numbers, so a block of numbers needs no row per number. No two blocks anywhere on the system may hold the same number. Left out, the flow claims no block, which is what a flow written before blocks existed claimed.
    • from (required): text. The block's first number.
    • to (required): text. The block's last number, which the block includes.
  • catch_all (optional): true or false (default false). Whether every other number of the organisation reaches this flow: one its carrier offers that no number and no block of any of its flows claims. One flow per organisation. It widens nothing: the call still has to arrive over one of the organisation's own trunks.

Outbound call

outbound: Where calls your people place start.

Where calls your people place start, and where an inbound flow's divert hands a call over. Output port: next.

Routing

Destination

destination: Branch on where the dialled number goes.

Branch on where the dialled number goes, read against the organisation's dialling plan. Output ports: emergency, internal, national, international, premium, other.

Time schedule

time_schedule: Inside hours, outside hours or a holiday.

Branch on a time schedule. Output ports: inside, outside, holiday.

Settings

  • schedule (required): id. The id of a schedule.

Override

override: A switch you flip, such as night service.

Branch on a toggle someone switches, such as night service. Output ports: normal, override.

Settings

  • toggle (required): id. The id of a toggle.

Set override

set_override: Flip a switch, such as putting the office into night service.

Flip a switch, such as putting the office into night service. Output ports: next, failed.

Settings

  • toggle (required): id. The id of a toggle.
  • state (required): one of "on", "off", "flip". What to put the toggle in. "flip" sets it to the opposite of what it is, which two callers running it at once leave where it started, so "on" and "off" on two blocks are the safer pair.

Set variable

set_variable: Remember a value for later in the call.

Store a value in a call variable for the rest of the call. Output port: next.

Settings

  • name (required): variable name. A call variable: letters, digits, _, . and -. Names starting caller. or dialled. (caller.number, caller.delivered, caller.national, caller.name, dialled.number and the rest) are built in and read-only.
  • value (required): one of the forms below.
    • from: "static"
      • value (required): text.
    • from: "variable"
      • name (required): variable name. A call variable: letters, digits, _, . and -. Names starting caller. or dialled. (caller.number, caller.delivered, caller.national, caller.name, dialled.number and the rest) are built in and read-only.

Match variable

match_variable: Branch on a variable, such as the caller's number.

Branch on a call variable. Cases are tried in order and the first that matches takes its own port; otherwise no_match. Output ports: one per case, named by its port, then no_match.

Settings

  • name (required): variable name. A call variable: letters, digits, _, . and -. Names starting caller. or dialled. (caller.number, caller.delivered, caller.national, caller.name, dialled.number and the rest) are built in and read-only.
  • cases (required): list of object.
    • port (required): id.
    • matcher (required): one of the forms below.
      • kind: "equals"
        • value (required): text.
      • kind: "starts_with"
        • prefix (required): text.
      • kind: "one_of"
        • values (required): list of text.

Extension status

extension_status: Branch on how many people are free.

Branch on how many of these extensions are available: all of them, at least threshold_percent of them, or fewer. Output ports: all_available, some_available, none_available.

Settings

  • extensions (required): list of id. Extension numbers.
  • threshold_percent (required): whole number (1 to 99).

Divert

divert: Forward the call to an extension or a number outside.

Forward the call to an extension or to a number outside, telling the far end that it was diverted and why (History-Info and Diversion). A call that is answered ends the flow. It must reach a caller that is still waiting, so it cannot follow an announcement, an IVR menu or a queue: those answer the caller. Output ports: no_answer, busy, unavailable.

Settings

  • target (required): one of the forms below. Where the call goes.
    • to: "extension": An extension of the organisation, rung through the registrar.
      • extension (required): id. An extension number.
    • to: "number": A number outside, sent through a trunk.
      • number (required): text. The number to divert to, digits with an optional leading +.
      • trunks (required): list of id. The trunks to try, in order. The first that takes the call wins.
      • send_as (required): object. The form the number goes out in.
        • form (required): one of "e164", "national_dialling", "as_dialled", "digits".
        • strip_prefix (optional): text.
        • prepend (optional): text.
      • caller_id (required): object. What the far end is told the call is from. The trunk's own setting decides which of the presented number and the trunk account goes in the From user; the other is asserted beside it.
        • from (required): one of "trunk", "fixed", "caller", "withheld".
        • number (optional): text.
  • reason (required): one of "unconditional", "user_busy", "no_answer", "unavailable". Why the call is being diverted. It becomes the RFC 4458 cause code in History-Info (302, 486, 408, 503) and the RFC 5806 reason token in Diversion.
  • ring_secs (required): whole number (1 to 600).

Go to flow

go_to_flow: Hand the call to another flow, which carries on from its entry.

Hand the call to another flow of the organisation, which carries on from its entry with the variables the call has. Both flows go the same way (inbound to inbound, outbound to outbound). Output port: unavailable, taken when that flow cannot be had: it was deleted, has no live version, or turned out to go the other way.

Settings

  • flow (required): id. The id of a flow of the organisation, other than this one.

Prompts

Announcement

announcement: Play a prompt, then carry on.

Play a prompt, then carry on. Output port: next.

Settings

  • prompt (required): id. The id of a prompt.

Remote announcement

remote_announcement: Play audio fetched from an announcement endpoint, then carry on.

Ask one of the organisation's announcement endpoints for audio for this call, play it, then carry on. Output ports: next, unavailable.

Settings

  • endpoint (required): id. The id of an announcement endpoint.

IVR menu

ivr_menu: Play a menu and branch on the key pressed.

Play a menu and branch on the keys pressed. Output ports: one per option, named by its port, then no_input and invalid.

Settings

  • prompt (required): id. The id of the menu's prompt.
  • attempts (required): whole number (1 to 10). How many times the caller hears the menu before no_input or invalid is taken.
  • response_timeout_ms (required): whole number (1 to 60000). How long to wait for the first key after the prompt ends.
  • digit_timeout_ms (required): whole number (1 to 60000). How long to wait between the keys of an option with several.
  • invalid_prompt (optional): text or null. The id of a prompt played after a wrong key, before the menu repeats.
  • options (required): list of object.
    • port (required): id.
    • digits (required): text.

People

Pick up

pick_up: Take over a call ringing somewhere else.

Take over a call ringing somewhere else in the organisation. A call that is taken over leaves the flow, as an answered ring does. Output ports: nothing_ringing, failed.

Settings

  • from (required): one of the forms below. Whose ringing call to take: whatever is ringing, longest-ringing first, or the call ringing at one named extension.
    • kind: "any_extension"
    • kind: "extension"
      • extension (required): id. An extension number.

Set call handling

set_call_handling: Switch do not disturb or call forwarding for the extension that is calling.

Change how the extension that placed the call is handled: do not disturb, or where its calls forward. It acts on the calling extension and no other, so a call that is not from one of the organisation's phones leaves by failed. Output ports: next, failed.

Settings

  • change (required): one of the forms below. What to change.
    • kind: "do_not_disturb"
      • state (required): one of "on", "off", "flip".
    • kind: "forward"
      • when (required): one of "always", "busy", "no_answer". Which forward: every call, a call that finds the phone busy, or one it rings without an answer.
      • target (required): text. An extension number of the organisation, or a number outside written as it is dialled, which is read against the organisation's dialling plan. An emergency number is refused when it is written.
    • kind: "cancel_forward"
      • when (required): one of "always", "busy", "no_answer", "all".

Ring extension

ring_extension: Ring one person.

Ring one extension. An answered call leaves the flow. Output ports: no_answer, busy, unavailable.

Settings

  • extension (required): id. An extension number.
  • timeout_secs (required): whole number (1 to 600).

Ring group

ring_group: Ring several people, together or in turn.

Ring several extensions, all at once or one after another. An answered call leaves the flow. Output ports: no_answer, busy, unavailable.

Settings

  • extensions (required): list of id. Extension numbers.
  • strategy (required): one of "all", "sequential".
  • timeout_secs (required): whole number (1 to 600). For all, how long the group rings; for sequential, how long each member rings.

Queue

queue: Wait in line for the next free agent.

Wait in a queue for the next free agent. An answered call leaves the flow. Output ports: failover, and breakout while a breakout key is set.

Settings

  • queue (required): id. The id of a queue.
  • breakout_key (optional): text or null. A key a waiting caller presses to leave the queue through breakout.

Dial out

dial_out: Place the call out through a trunk.

Place the call out through a trunk. A call that is answered ends the flow. Output ports: no_answer, busy, rejected, no_route.

Settings

  • trunks (required): list of id. The trunks to try, in order. The first that takes the call wins.
  • number (required): object. The form the number goes out in.
    • form (required): one of "e164", "national_dialling", "as_dialled", "digits".
    • strip_prefix (optional): text.
    • prepend (optional): text.
  • caller_id (required): object. What the far end is told the call is from.
    • from (required): one of "trunk", "fixed", "caller", "withheld".
    • number (optional): text.
  • ring_secs (required): whole number (1 to 600).

Messages

Voicemail

voicemail: Let the caller leave a message.

Let the caller leave a message. The call ends there; no output ports.

Settings

  • mailbox (required): id or object. Which mailbox the message goes in: the id of a mailbox, or the mailbox of a party of the call.
    • of (required): one of "ringing_extension". ringing_extension is the one phone that was ringing when the call gave up, which in a group rung one at a time is its last member. The flow is refused unless every path to the block rings one.

Record

record_call: Record the call, and tell the parties first if you like.

Record the call's audio from here on, telling the parties first if a prompt is named. The step answers the call, because a recording is written from the media engine's session for it. The call carries straight on. Output ports: next, failed.

Settings

  • announcement (optional): text or null. The id of a prompt played to both parties before the recording starts. Telling them is a legal requirement in many places; it is offered rather than forced, because where the obligation falls differs by jurisdiction. Unset starts recording at once.
  • max_secs (required): whole number (1 to 14400). The longest one part of the recording may run. A ceiling the media engine enforces, so a call nobody hangs up cannot write until the disk is full.

Voice AI

Transcribe

transcribe: Transcribe the call, and optionally summarise it.

Transcribe the call from here on, and optionally summarise it. The call carries straight on; the transcript is made when the call ends. Output ports: next, failed.

Settings

  • summarise (optional): true or false (default false). Whether to also ask a language model to summarise the transcript once the call has ended. A separate decision from transcribing, because it sends the transcript to a second provider.

Translate

translate: Translate the call between the caller and whoever answers.

Translate the call between its two parties, from the moment it connects: a bot sits between them and each hears only its translation. The call carries straight on and the translation takes effect once a ring, a queue or a dial after this step connects. This step is the consent. Output ports: next, failed.

Settings

  • caller_language (required): language tag. The language the caller speaks.
  • callee_language (required): one of the forms below. The language of the party the call connects to: whoever answers the ring, from their own spoken language with a fallback for a user who has none, or one fixed language.
    • kind: "answering_user"
      • fallback (required): language tag. A BCP 47 language tag of a language, then optionally a script and a region: en, zh-Hant, en-GB, es-419. Case is normalised.
    • kind: "fixed"
      • language (required): language tag. A BCP 47 language tag of a language, then optionally a script and a region: en, zh-Hant, en-GB, es-419. Case is normalised.

Prepare bot

prepare_voice_bot: Ring the caller while a voice bot gets ready, then carry on.

Tell a voice bot about the call while it is still ringing, so it is ready when the caller is put through to it, and carry on once it says it is. The call is not answered here: the caller hears ringing while the bot gets ready. A later voice block that names the same bot reuses what was prepared. Output ports: ready, unavailable (the bot refused, could not be reached, or was not ready in time).

Settings

  • bot (optional): id or null. Which of the organisation's voice bots is prepared. Omitted or null resolves exactly as a voice bot block's does: to the organisation's bot while it has exactly one, otherwise to none and the call takes unavailable, so name one.
  • max_wait_secs (optional): whole number (1 to 60, default 10). How long to wait for the bot to say it is ready before taking unavailable. The caller hears ringing the whole time.

Voice bot

voice_bot: Let the caller talk to a voice bot.

Hand the caller's audio to one of the organisation's voice bots and let them talk to it. The bot is a media peer: it hears the caller and speaks back, and reports when it is done. Output ports: completed, unavailable.

Settings

  • bot (optional): id or null. Which of the organisation's voice bots takes the call. Omitted or null resolves to the organisation's bot while it has exactly one, which is what keeps a version published before this field could be written working; with several bots it resolves to none and the call takes the unavailable port, so name one.
  • instructions (required): text (up to 4000 characters). What the bot is told to do, in words. It reaches the bot as the conversation's system prompt, and is the only thing about this call that leaves the machine besides the caller's audio.
  • max_secs (required): whole number (1 to 600). How long the conversation may run before the flow stops waiting and takes unavailable.
  • destinations (optional): list of text. Which of the organisation's transfer destinations the bot is told about, by name. Omitted is every one of them; an empty list is none. A name the organisation does not list, or one named twice, is refused at publish.

Spoken menu

voice_menu: Ask what the caller wants in words, and route on one of the options you list.

Ask the caller what they want in words, and branch on which of the declared options they asked for. Output ports: one per option, named by its port, then no_match and unavailable. The option set is the flow's: what the bot reports is checked against the options declared here, and anything else takes no_match, so an option a model invents cannot route a call.

Settings

  • bot (optional): id or null. Which of the organisation's voice bots takes the call. Omitted or null resolves to the organisation's bot while it has exactly one, which is what keeps a version published before this field could be written working; with several bots it resolves to none and the call takes the unavailable port, so name one.
  • instructions (required): text (up to 4000 characters). What the bot is told to ask, and how to behave while asking. The options are passed to it separately, so instructions that forget to list them still work.
  • options (required): list of object.
    • port (required): id. The port this option leaves by, and the word the bot reports to choose it.
    • description (optional): text (up to 400 characters). What the option covers, for telling the options apart.
  • max_secs (required): whole number (1 to 600). How long to wait for the caller to be understood before taking unavailable.
  • destinations (optional): list of text. Which of the organisation's transfer destinations the bot is told about, by name. Omitted is every one of them; an empty list is none. A name the organisation does not list, or one named twice, is refused at publish.

End

Reject

reject: Refuse the call and say why.

Refuse the call and say why. The call ends there; no output ports.

Settings

  • cause (required): one of "busy", "not_allowed", "unknown_number". Why the call is refused, which decides the final response the caller is answered with.

Hang up

hang_up: End the call.

End the call. No output ports.