#how do i get the agent to recognize the widget vs a call. transfer in teh widget for example wont w

1 messages · Page 1 of 1 (latest)

worthy edgeBOT
#
AI-generated Answer for sari_33713

Short answer

  • Detect channel in‑agent: check for telephony system variables. If system__caller_id / system__called_number exist → it’s a phone call; if they’re absent → it’s the web widget/chat. These variables are only set for voice calls. (elevenlabs.io)
  • “Transfer to Human/Number” only works on phone calls. It’s not available in the chat/widget, so a transfer action there won’t fire. (elevenlabs.io)

How to implement

  • In your system prompt or tool logic, branch on dynamic variables:
    • Example condition: “If {{system__caller_id}} is present, you may use transfer_to_number; otherwise, avoid human transfer.” Telephony vars are documented as call‑only. (elevenlabs.io)
  • If you want the front end to explicitly label the channel, pass a custom dynamic variable from the widget embed:
    • <elevenlabs-convai agent-id="..." dynamic-variables='{"channel":"widget"}'></elevenlabs-convai> and branch on {{channel}} in prompts/tools. (elevenlabs.io)

Alternatives for the widget

  • Use Agent→Agent transfer (transfer_to_agent) to hand off between ElevenLabs agents; this is configured as a system tool and is channel‑agnostic. (elevenlabs.io)
  • For “handoff” UX in the widget (since phone transfer isn’t supported there), trigger client‑side actions via Client Tools (e.g., redirect to a help page, ticket form, or scheduling flow). (elevenlabs.io)

Telephony caveat

  • If you connected Twilio via the “register call” approach (not the native import), call transfers are not supported at all. Use the native integration or SIP for transfer features. (elevenlabs.io)

Relevant docs

  • Dynamic variables (telephony‑only vars) (elevenlabs.io)
  • Widget customization (dynamic-variables attribute, Client Tools) (elevenlabs.io)
  • Transfer to Human/Number (not available in widget) (elevenlabs.io)
  • Agent→Agent transfer tool (elevenlabs.io)
  • Twilio register‑call limitations (no transfers)
river apex
#

how about a branch that is only a widget and only that branch has the widget enabled?