Skip to main content
Back to how-to guides Use this pattern when web chat, voice, messaging, or API channels need different startup behavior.

Concept

Channels do not deliver startup content the same way. The runtime sends the ON_START response only on channels that support proactive delivery. On the other channels, ON_START still runs its SET, CALL, and branch DO: actions, but the welcome text is not sent. A channel-specific welcome has two layers:
  • Conversation welcome. The ON_START response. You write it in ABL and vary it with BRANCHES.
  • Channel configuration. Launcher message, input placeholder, and the voice Welcome Message. You set these in the channel settings in Studio.
Branch on session.channel. This value holds the channel type of the current session, for example sdk_websocket or korevg. Do not use channel.name or system.channel in an ON_START condition. Those names belong to behavior profiles and escalation routing entries. They do not resolve in ON_START, so the branch never matches. The payload that reaches each channel also differs. Voice channels keep only PLAIN_TEXT from the VOICE block and drop rich content. web_chat ignores VOICE. sdk_websocket and web_debug accept the full VOICE block and rich content.

Minimal working example

The ready step stands in for your own flow. The SET line is optional. You can write IF: session.channel == "voice" and skip the variable.

How it works

At session start, the runtime runs ON_START in this order:
  1. Top-level SET and CALL run first. Branch conditions can read the values they set.
  2. Branches are checked in order. The first matching branch wins. An ELSE branch has no condition and always matches.
  3. The selected response is sent if the channel supports proactive delivery. Otherwise the runtime records a dsl_on_start_skipped trace.
  4. The DO: list of the selected branch runs after the welcome.
With a FLOW, a branch-selected welcome is the whole startup turn. The first flow step waits for the first customer message. A top-level RESPOND that no branch replaced is different. The first flow step runs in the same turn, right after the welcome. In the example, channel_name == "voice" matches only the SDK voice channel. Telephony and bridge channels use their own channel types, such as korevg or voice_twilio. The ELSE branch serves all of them.

Common variations

Match every voice channel

Use IN with the voice channel types your project deploys.

Record the channel choice for later steps

Do not write SET or CALL beside RESPOND in a branch. That is a compile error (E380). Put the action in the branch DO: list. The list runs after the welcome and allows SET, CALL, and HANDOFF.
The compiler reports an ON_START_BRANCH_DO_ACTIVATED warning for each DO: list. The warning confirms that the list runs at session start. A branch DO: list cannot change which branch is selected, because the runtime selects the branch first. To hand off by channel at start, see “How to route users from the welcome experience to the right agent”.

Keep channel configuration separate

These settings live in the channel configuration, not in ABL:
  • Web SDK. The theme settings hold the launcher message and the input placeholder.
  • Voice. The Welcome Message field holds a channel-level greeting. On pipeline voice channels, a non-empty value replaces the ON_START greeting. Clear it to use ON_START. On realtime voice channels, the ON_START greeting wins and the Welcome Message is the last fallback.
  • Voice interruption. Pipeline voice channels have an Allow caller to interrupt the welcome setting. A BARGE_IN value written under the RESPOND VOICE block takes priority over that setting.

Verification

  1. Start a session on each target channel.
  2. Check the transcript against the delivery table. Channels in the “not sent” row show no ON_START welcome.
  3. Open the trace. The dsl_set event for channel_name shows the channel value the runtime read.
  4. Find the dsl_on_start_branch event. It shows the matched branch index.
  5. Find the dsl_respond event with source on_start. It shows the text sent.
  6. On a channel in the “not sent” row, confirm the dsl_on_start_skipped event and that SET and DO: side effects still ran.

Production readiness checklist

  • Test each deployed channel separately, including the voice channel types you use.
  • Keep launcher copy and conversation copy distinct.
  • Add an ELSE branch so every other channel gets a valid welcome.
  • Use PLAIN_TEXT for voice wording. Use short voice greetings.
  • Provide plain text with every rich content variant.
  • Check that no voice channel has a Welcome Message that hides your ON_START greeting.
  • Confirm async and API channels do not depend on a proactive welcome.

Common mistakes

Troubleshooting