Skip to main content
The public interview route at /e/[workspace_id] is where customers land when they click a cancel button with an embedded Magic Link. This page conducts anonymous AI exit interviews to understand why customers are leaving.

Features

  • No authentication required - Fully public-facing for anonymous access
  • Multi-language support - AI detects and responds in customer’s language
  • Streaming AI conversation - Real-time responses using Vercel AI SDK
  • Save offer presentation - Dynamic offer cards via json-render
  • Auto-redirect - Handles cancel_url and save_url redirects based on interview outcome
  • PII protection - Automatic scrubbing before database storage
  • Webhook notifications - Real-time status updates to merchant systems

URL Structure

Parameters

Mode precedence: ?mode= on the magic link wins over the workspace’s configured magicLinkMode. This lets one workspace serve both blocking (pre) and non-blocking (post) links — e.g., Stripe post-cancel invites always use ?mode=post.
Redirect URL config: cancel_url/save_url URL params win over workspace config.redirectUrls.{cancelUrl,saveUrl} (the canonical config location — onboarding writes there).

Modes

Pre-Cancel Mode (mode=pre)

  • Blocking interview - Customer must complete before canceling
  • Use when you want to understand churn before final cancellation
  • Escape affordances: “Skip” link (mobile top bar) and ”×” close button (desktop top bar) plus a “Skip interview →” footer link on desktop — all bail out via cancel_url
  • Decision screen: After interview, customer chooses between “Continue cancelling” or “I’ll stay”
  • Redirects to cancel_url (completed) or save_url (offer accepted)

Post-Cancel Mode (mode=post)

  • Non-blocking feedback - Interview happens after cancellation
  • Use when you want feedback without interrupting the cancel flow
  • Thank-you screen: After interview, shows thank you message with star rating for Offboard.tech
  • The AI may present win-back offers if save offers are configured
  • “Return to ” link shown if cancel_url is configured
  • Redirects to save_url if win-back offer accepted

Layout

The interview page uses a full-bleed conversation layout (no card chrome):
  • Top bar — agent avatar monogram, company name, and “Exit interview with ” subtitle; hosts the pre-mode escape affordance.
  • Conversation column — centered, max-width ~680px; assistant messages carry the agent avatar, customer replies render as right-aligned bubbles.
  • Input dock — pill-shaped input with a circular send button tinted by the workspace’s accentColor when configured.
  • Footer — “Powered by Offboard” attribution (and the desktop skip link in pre-mode).
All end screens (decision, thank-you, redirecting, error) share the same top bar and a centered content column.

Implementation

Replace your cancel button link:

Workspace-Level Redirect URLs

You can also configure default redirect URLs in workspace settings:
URL Priority (from highest to lowest):
  1. URL params (dynamic per-customer overrides)
  2. Workspace config (default fallback)
  3. Stay on page (no redirect)

2. Handle Interview Completion

The interview lifecycle is prepare → explicit finalize:
  1. The AI calls complete_interview, which scrubs and stores the summary but leaves status='abandoned' and emits a [PREPARED] marker.
  2. The customer then takes an explicit action — “Accept offer & stay”, “I’ll stay”, “Continue cancelling”, or “Finish” — which calls POST /api/e/{workspaceId}/interview/{interviewId}/finalize.
  3. Only finalize writes the terminal status (completed/saved) and enqueues webhook/billing/email events atomically.
Mode-Aware Redirects:

3. Receive Webhook Notifications

Configure webhook URL to receive real-time updates:
Example webhook handler:

AI Tools

The interview agent has access to two tools:

present_save_offer

Presents a save offer when churn reason matches configured conditions:

complete_interview

Saves the interview and triggers webhook:

System Prompt

The AI agent is configured with:
  • Agent persona from workspace settings (name, tone)
  • Product context (company name, product description)
  • Churn concerns (common reasons customers leave)
  • Save offers (available retention offers)
  • Mode (pre-cancel blocking vs post-cancel feedback)
Example prompt generated per workspace:

PII Scrubbing

Before any database write, interview summaries go through two-pass PII scrubbing:

Pass 1: Regex Pre-pass

Removes obvious patterns:
  • Email addresses
  • Phone numbers
  • URLs
  • IP addresses
  • Credit card numbers
  • Social Security Numbers
  • UUIDs
  • Street addresses

Pass 2: AI Redaction

Uses Gemini 2.5 Flash to identify and redact:
  • Names of people
  • Company names
  • Locations
  • Usernames/handles
  • Account/reference numbers

Customization

Agent Persona

Configure in workspace settings:

Save Offer Conditions

The AI matches customer reasons to offers:
Note:
  • In pre-cancel mode: Save offers are presented to prevent cancellation
  • In post-cancel mode: Win-back offers may be presented if save offers are configured — these are framed as “We’d love to have you back — here’s a special offer”
  • Offers are never presented before the second turn of conversation
  • Only one offer is presented per conversation

Multi-Language

The AI detects language from the first message and responds in kind:
  • Customer: “Hola, ¿por qué te vas?”
  • AI: “Hola, soy Sarah de [Empresa]…”
All UI elements (buttons, cards) are also rendered in the detected language.

Edge Cases

No Cookie/Tracker Policy

The /e/ route intentionally has:
  • ❌ No authentication cookies
  • ❌ No analytics trackers
  • ❌ No pixel tracking
  • ✅ Only workspace_id and URL params

Interview Abandonment

If a customer leaves mid-interview:
  • Status remains abandoned
  • No webhook is sent
  • Interview can be resumed via interview_id param

Minimum Turn Requirement

The complete_interview tool checks for:
  • Minimum 3 AI turns before allowing completion
  • Ensures meaningful conversation, not accidental clicks

Architecture

Best Practices

  1. Always provide cancel_url and save_url - Don’t leave users stranded
  2. Use mode=pre for high-value customers you want to retain
  3. Use mode=post for low-touch cancellation flows
  4. Configure meaningful save offers - Match offers to common churn reasons
  5. Set up webhooks - Get real-time notifications for follow-up
  6. Test magic links - Verify redirects work in production