ON_START branch can match, or a channel does not deliver a proactive welcome.
Concept
A fallback greeting is the safe default that keeps the first turn from feeling broken. You need one in three cases:- No branch condition matches.
- A value that a branch or template reads is empty.
- The channel does not send the
ON_STARTwelcome.
The difference between the first two rows matters when the agent has a
FLOW. A branch-selected welcome, including ELSE, is the whole startup turn. The first flow step waits for the first customer message. A top-level RESPOND that no branch replaced is a prelude. The first flow step runs right after it, in the same turn.
Branch conditions must be expressions. A plain-language condition such as "the customer is returning" never matches. It also produces missing-variable warnings at compile time.
Minimal working example
session.interaction.current.language holds the language code the runtime resolved for the session. It comes from the session request, the contact profile, the channel, or the agent default language. It is empty when none of them supplies a language. An empty value never equals "fr", so the fallback runs.
The ready step stands in for your own flow.
How it works
The runtime runsON_START in this order:
- Top-level
SETandCALLrun first. - A top-level
SET_INTERACTION_LANGUAGEorCLEAR_INTERACTION_LANGUAGEruns next, before branch selection. - Branches are checked in order. The first matching branch wins.
- If no branch matches, the runtime uses the top-level
RESPONDand records adsl_on_start_branchtrace withmatched: false. - If no branch matches and there is no top-level
RESPOND, the runtime sends no welcome.
ready step waits for the first customer message. Any other session gets the generic welcome followed by “How can I help?” in the same turn.
A condition that fails at run time is skipped. The runtime records a dsl_on_start_branch_error trace and checks the next branch. A condition with invalid syntax in authored ABL fails compilation with INVALID_CEL_SYNTAX, so it does not reach a customer.
In customer-visible text, a {{name}} that has no value renders as an empty string. “Welcome back, .” becomes “Welcome back, .”. Use a {{#if}} section when the value can be missing.
Common variations
Start without ON_START
Use the first flow step as the greeting when the channel or product experience should not send proactive content.Use an ELSE branch
UseELSE when the generic welcome must replace the other branches and own the startup turn.
ready step runs when the customer sends the first message. Put ELSE last. A top-level HANDOFF in ON_START never runs when an ELSE branch exists, and the compiler warns with ON_START_HANDOFF_UNREACHABLE.
Greet by name only when the name exists
Use oneRESPOND with a {{#if}} section when the personal part is optional. The lookup_customer tool is a project-local assumption. It needs an execution binding in your project and returns a first_name field when the profile has one.
ON_START has no RESPOND and the tool returns a text content field, the runtime sends that text as the welcome. A RESPOND always takes priority over content.
Set the language before the greeting
UseSET_INTERACTION_LANGUAGE when a tool or profile holds the customer language. The runtime sets the language before it selects a branch. The branch then matches on session.interaction.current.locale.
load_profile tool is a project-local assumption. It needs an execution binding and returns a language tag such as fr-CA. The runtime rejects a tag that is invalid or not allowed for the session. Voice channels accept only the languages configured on the channel. Other sessions need language detection turned on in the project. A rejected or empty value leaves the language unchanged, so the generic fallback runs. A failed CALL leaves the language unchanged in the same way.
Know the channel fallbacks
Some channels apply their own fallback whenON_START provides no usable text.
Realtime voice never speaks a greeting that still contains an unresolved
{{placeholder}}. Agent Assist skips it the same way.
Verification
- Start a session that matches a branch. Confirm the branch response and a
dsl_on_start_branchtrace withmatched: true. - Start a session that matches no branch, for example with no language set. Confirm the fallback response and a
dsl_on_start_branchtrace withmatched: false. - Start a session where the optional value is missing. Confirm the greeting has no empty gap such as “Welcome back, .”.
- Start a session without
ON_START. Confirm the first flow step produces a clear first response. - On a channel that does not send the welcome, confirm a
dsl_on_start_skippedtrace. Confirm the first customer message still gets a response. - If you set the language, find
interaction_language_override_changed. Confirmappliedis true for a supported tag and false for an unsupported one.
Production readiness checklist
- Define a generic fallback with a top-level
RESPONDor anELSEbranch. - Keep fallback copy broad enough for unknown users.
- Do not put sensitive personalization in fallback text.
- Check that every value a condition reads has a source: a
SET, aCALL, memory, or caller context. - Test the branch match, the branch miss, and the missing-value cases.
- Test every deployed channel, including voice channels with a Welcome Message or Greeting Audio clip set.