Skip to main content
Back to how-to guides Use this pattern when startup data can be missing, no 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_START welcome.
ABL gives you four ways to write a fallback. Choose by what the greeting must do next. 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 runs ON_START in this order:
  1. Top-level SET and CALL run first.
  2. Branches are checked in order. The first matching branch wins.
  3. If no branch matches, the runtime uses the top-level RESPOND and records a dsl_on_start_branch trace with matched: false.
  4. If no branch matches and there is no top-level RESPOND, the runtime sends no welcome.
In the example, a French session gets only the French welcome. The 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, {{name}}. 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

Use ELSE when the generic welcome must replace the other branches and own the startup turn.
Both welcomes own the startup turn here. The 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 one RESPOND 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.
If the lookup fails or returns no name, the customer sees “How can I help?”. If 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.

Know the channel fallbacks

Some channels apply their own fallback when ON_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

  1. Start a session that matches a branch. Confirm the branch response and a dsl_on_start_branch trace with matched: true.
  2. Start a session that matches no branch, for example with no language set. Confirm the fallback response and a dsl_on_start_branch trace with matched: false.
  3. Start a session where the optional value is missing. Confirm the greeting has no empty gap such as “Welcome back, .”.
  4. Start a session without ON_START. Confirm the first flow step produces a clear first response.
  5. On a channel that does not send the welcome, confirm a dsl_on_start_skipped trace. Confirm the first customer message still gets a response.

Production readiness checklist

  • Define a generic fallback with a top-level RESPOND or an ELSE branch.
  • 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, a CALL, 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 set.

Common mistakes

Troubleshooting