Call Flows

Call flows are the heart of Gomobile. They define exactly what happens during each call—from the initial dial to the final hangup.

Flow structure

Every flow has:

  • A start node - Where execution begins

  • Intermediate nodes - Actions like playing audio or collecting input

  • Terminal nodes - Where the call ends (hangup)

  • Connections - Links between nodes based on outcomes

Node reference

Dial Node

Initiates an outbound call to the contact.

{
  "id": "dial-1",
  "type": "dial",
  "label": "Call Customer",
  "config": {
    "timeout": 30000,
    "enableAMD": true
  },
  "outputs": {
    "onAnswer": "play-greeting",
    "onVoicemail": "play-vm-message",
    "onNoAnswer": "hangup-na",
    "onBusy": "hangup-busy",
    "onRejected": "hangup-rejected",
    "onError": "hangup-error"
  }
}
Config
Type
Default
Description

timeout

number

30000

Ring timeout in milliseconds

enableAMD

boolean

true

Enable answering machine detection

Output
Trigger

onAnswer

Human answered (or AMD disabled)

onVoicemail

Machine detected (AMD enabled)

onNoAnswer

Ring timeout reached

onBusy

Busy signal

onRejected

User rejected during ring

onError

System error

Play Node

Plays audio to the recipient.

Audio item types:

Type
Purpose
Example

audioFile

Pre-recorded audio

Welcome messages

number

Dynamic number playback

Account balances

date

Dynamic date playback

Appointment dates

word

Dictionary word lookup

Custom vocabulary

DTMF Node

Collects keypad input from the recipient.

Modes:

Mode
Use case

single_digit

Menu selections (press 1, 2, 3...)

multi_digit

Numeric input (account numbers, PINs)

Multi-digit configuration:

Record Node

Records the recipient's voice.

The recording ID is stored in the specified variable for later retrieval.

Condition Node

Branches based on variable values.

Operators:

Operator
Meaning

eq

Equals

neq

Not equals

gt

Greater than

lt

Less than

gte

Greater than or equal

lte

Less than or equal

contains

String contains

startsWith

String starts with

endsWith

String ends with

Complex conditions with AND/OR:

Set Variable Node

Stores a value for use later in the flow.

Hangup Node

Ends the call. This is a terminal node with no outputs.

Variable system

Flows can access several types of variables:

System variables

Automatically available during execution:

Variable
Description

sys.callId

Unique call identifier

sys.callStatus

Current call status

sys.callDirection

inbound or outbound

sys.answeredBy

human or machine

sys.contactId

Contact being called

sys.contactPhone

Contact's phone number

sys.contactName

Contact's full name

sys.organizationId

Your organization ID

sys.programId

Program ID (if campaign call)

Contact fields

Standard contact properties:

Custom attributes

Custom fields defined on contacts:

Flow variables

Variables set during execution:

Barge-in

Allow recipients to interrupt audio playback by pressing a key:

When barge-in occurs:

  1. Audio playback stops immediately

  2. The pressed digit is captured

  3. Flow jumps to the specified DTMF node

  4. The digit is available as the first input

Best practices

  1. Always handle errors - Every node should have an error path

  2. Use descriptive labels - Makes debugging easier

  3. Keep flows focused - One flow per use case

  4. Test incrementally - Verify each node works before adding more

  5. Document complex logic - Use the description field

  6. Consider timeout handling - Don't leave users hanging

Last updated