Skip to main content

Auto Connect Agent

Audience: Sales · Management · QA · Support · Engineering · Where in app: Settings → AI Agents → Auto Connect (tabs: Behavior, Default Messages, Manual Triggers, Appearance) · Plan availability: Plans with the auto_connect feature flag (see Plan & limits)

The Auto Connect Agent is the proactive AI: instead of waiting for a visitor to click the widget, it reaches out first. When a visitor lingers on a page, it pops up a small message ("real human, not a bot — need help?") and invites them to start a chat or a call. The text the visitor sees is partly written by you (a seed/default message) and partly generated live by AI based on the page they're browsing, so the invite reads as page-aware and personal rather than canned.

It is the agent-config front-end for the platform's two proactive-engagement systems: the AI auto-trigger (chat/call popup driven by a lead-score threshold) and the call auto-trigger (the auto-connect call popup). For the full runtime mechanics of those systems, see Auto-Triggers and Widget Page Rules.

Naming note: in the UI this card is titled Auto Connect; the config it edits lives under company.ai_auto_trigger (and partly company.call_auto_trigger). The "Manual Triggers" tab in code is the URL Rules feature.

What it does

  • Watches widget visitors and, when eligibility is met, shows a proactive popup inviting them to chat or call.
  • Writes a page-aware message: your seed/default message is placed at the start, and the AI continues it from the visitor's current page context (e.g. "…Saw you're looking at our emergency services. Need help with anything?").
  • Lets you force the popup on specific pages via URL Rules — no lead score required, with a per-rule trigger type (chat/call), delay, and custom message.
  • Applies a threshold (0–100) so that, off the URL-rule path, the popup only fires for sufficiently engaged visitors.
  • Carries a configurable agent name and photo so the popup looks like a named human teammate.
  • Styles the call auto-connect popup (background and accent/text colours) to match your brand.
  • Feeds the engagement loop: when a visitor accepts/replies, lead-score points fire and the conversation continues under the Chat Agent or Call Agent.

How it works

  1. Enable. The Auto Connect card shows an Edit/Create button plus a toggle. The toggle (ai_auto_trigger.enable) only appears once an ai_auto_trigger.ai_model is set. Enabling it also auto-activates the call auto-trigger (call_auto_trigger.is_activated = true) so the call-popup path is live too (see AutoConnectAgentCard.vue handleToggle).
  2. Eligibility (runtime, in the widget). A visitor sees a proactive popup when all of these hold (per Auto-Triggers):
    • the page URL matches a configured rule (or general eligibility applies);
    • the visitor hasn't already been triggered this session (localStorage flag kk_ai_auto_triggered_at);
    • they've dwelled on the page for at least the configured delay/duration;
    • the widget is online per working hours (unless configured to work offline);
    • page rules / mobile suppression (mobile_disable, hide_on_pages) don't hide the widget.
  3. Message assembly. The selected default message is used as the literal opening; the AI then appends a short, page-aware line driven by the System Instructions persona (the decision matrix prefers call if a prior chat attempt is detected, chat if a prior call attempt is detected, else chat).
  4. Trigger type. A URL Rule can force chat or call. The chat path opens a chat under the Chat Agent; the call path shows the auto-connect call popup (accept/decline + countdown), which on accept routes to the AI voice agent or a live agent per the company's call_routing.
  5. Threshold path. Outside URL rules, the threshold (default 50) gates firing — higher = more selective.
  6. Persistence. Each surfaced message is logged to ai_auto_trigger_messages (AIAutoTriggerMessageModel) with type (chat/call), accepted, company_id, user_session_id, page_title — this is what powers the Auto-Engage dashboard's "engaged by AI" and acceptance-rate stats.

Configuration & options

All settings are edited under Settings → AI Agents → Auto Connect and saved via PUT /company/:id. They persist under company.ai_auto_trigger (and the Appearance tab under company.call_auto_trigger).

Behavior tab (ai_auto_trigger)

FieldStored asDefaultNotes
Thresholdthreshold50Integer 0–100. Higher = more selective auto-triggering (validated 0–100).
System Instructionssystem_instructionsBuilt-in "in-store greeter" promptRequired. Defines how the AI decides when to proactively engage and what tone to use. Ships with a default decision-matrix prompt (prefer call after a prior chat, prefer chat after a prior call, else chat; no invented facts, no discount/medical/financial claims, mirror visitor language).

Default Messages tab (ai_auto_trigger)

FieldStored asNotes
Agent Photoagent_photoJPG/PNG/SVG, max 1 MB. Uploaded as auto_trigger_photo (multipart). "Remove" auto-saves agent_photo: null immediately.
Agent Nameagent_nameShown to visitors in the auto-trigger message. Blank → null.
Default messagesdefault_messages[]Up to two entries: a seed default message (always present, not deletable) plus one optional custom message. Each is { text, is_default }. Exactly one is selected (is_default: true) — it becomes the literal opening line the AI continues from.

The seed default text is generated from the signed-in user's name, e.g. Hey! 👋 {first_name} here — real human, not a bot. Need help with anything?. An inline "How it works" explainer shows that the bold part is your default message and the italic part is AI-generated from the page.

Manual Triggers / URL Rules tab (ai_auto_trigger.url_rules[])

Define pages where the popup fires immediately, bypassing the lead-score threshold. Each rule:

FieldStored asDefaultNotes
URLurlPath/pattern, e.g. /pricing, /contact, /services. Rules with an empty URL are dropped on save.
EnabledenabledtruePer-rule on/off toggle.
Trigger typetrigger_typechatchat or call.
Delay (seconds)duration5Dwell time before the trigger (0–300).
Custom messagemessagenullOptional; blank falls back to the selected default message.

Appearance tab (call_auto_trigger)

Styles the call auto-connect popup with a live preview that mirrors the widget's AIAutoTriggerCall.vue.

FieldStored asDefaultNotes
Popup background colorcall_auto_trigger.call_background.background_color#163236Hex (#RGB/#RRGGBB), validated. Drives the popup content background.
Accent / text colorcall_auto_trigger.text_color#2feae2Hex, validated. Drives the message text colour and the popup border.

For QA/Support: each tab tracks its own unsaved-changes state and prompts "Save and Continue / Don't Save / Cancel" on navigation away. Saves surface a toast ("URL rules updated", "Default messages updated", "Behavior settings updated", "Popup appearance updated"). The card toggle uses an optimistic update that rolls back on error.

Behaviors & edge cases

  • Toggle gated on a model. The enable toggle on the card only renders when ai_auto_trigger.ai_model exists. Before that, the card shows Create (vs Edit Agent).
  • Enabling auto-connect enables the call popup too. Turning on ai_auto_trigger.enable also sets call_auto_trigger.is_activated = true in the same request.
  • One custom message only. The Default Messages tab supports a single custom message alongside the immutable seed; removing the selected custom message re-selects the default.
  • URL rules win over the threshold. A matching, enabled URL rule fires the popup immediately regardless of the engagement threshold.
  • Once per session. The widget's kk_ai_auto_triggered_at localStorage flag prevents repeated triggers on every page load.
  • Cold-start seed. If no default_messages are saved yet, the UI shows the generated seed text but does not auto-select it until you save.
  • Photo removal is immediate. Clicking "Remove" on the agent photo persists agent_photo: null right away (not deferred to the Save button).
  • The AI Engine tab is hidden. The AIEngine sub-component exists but is commented out in index.vue; model selection for this surface is not user-facing here.

Plan & limits

  • Gating flag: the Auto Connect card renders only when hasFeature('auto_connect') is true (Agents.vue, hasAutoConnect). This is a plan/feature entitlement, not a per-company admin toggle.
  • Operational enable: even when entitled, the agent only fires once ai_auto_trigger.enable is on (and an ai_model is set).
  • AI credits: the AI-written portion of each message and any resulting chat/call consume AI credits like any other agent surface — see AI Credits. (verify exact per-trigger credit accounting for the auto-trigger message generation specifically.)
  • Sales/Management framing: Auto Connect lifts engagement by reaching out on high-intent pages; the Auto-Engage dashboard reports fires, acceptance rate, and top URL rules so the value is measurable.

Technical implementation

  • Frontend config UI: frontend/src/views/settings/ai/agents/AutoConnectAgent/index.vue (tabs), Behavior.vue (threshold + system instructions), DefaultMessages.vue (agent name/photo + messages), UrlRules.vue (per-URL rules), Appearance.vue (call-popup colours). Card: AutoConnectAgentCard.vue. Grid gating: frontend/src/views/settings/ai/Agents.vue.
  • Persistence: all writes go through PUT /company/:id and merge into company.ai_auto_trigger / company.call_auto_trigger.
  • Models: backend/app/models/AIAutoTriggerMessageModel.js (ai_auto_trigger_messages — per-fire log, indexed for dashboard stats), backend/app/models/CallAutoTriggerModel.js (call_auto_triggercompany_id + page_urls[] for the call-popup page list, edited under Widget Setup → Auto-Triggers). Routes: backend/app/routes/callAutoTriggerRoutes.js (CallAutoTriggerController).
  • Runtime: the widget evaluates eligibility client-side and renders the popup; the AI message generation is served by the AI service. See ms-ai, ms-communication, and the Nox assistant for how Nox reports on (but cannot toggle) auto-triggers.