SUPPORT FORM AGENT

Answer before the ticket
is ever submitted

BeforeQuery embeds an AI agent directly in your support or contact form. When a user types their question, the agent searches your knowledge base and shows a cited answer — before they hit submit. Tickets only get created when the AI cannot help.

Everything the agent handles

From the first keystroke to the final analytics report

Pre-submission Deflection

Answer first
  • Intercepts the question before the form is submitted
  • Runs hybrid vector + full-text search across your knowledge base
  • Returns a cited answer with direct links to source pages
  • Confidence threshold gates whether deflection is offered
  • Ticket created only when the AI cannot help or user overrides
  • Configurable fallback message when confidence is too low

Deflection Analytics

Every event logged
  • Confidence score recorded for every deflection attempt
  • Outcome tracked: deflected, overridden, or escalated
  • Per-question knowledge gap detection
  • Deflection rate trend over time in the analytics dashboard
  • Export deflection log for review and audit
  • Feeds gap analysis to surface missing knowledge

Form Integrations

4 platforms + API
  • Zendesk — native Web Widget + Help Center form
  • Freshdesk — contact form and portal widget
  • Front — customer portal contact page
  • Jira Service Management — customer portal request form
  • Any custom HTML form via the HTTP API
  • Client key authentication for public-facing forms
HOW IT WORKS

Live in four steps

Connect a knowledge source, embed on your form, set a threshold, and go live.

01

Connect your knowledge base

Add your docs site, help center articles, Notion wiki, GitHub runbooks, or any combination of sources to a BeforeQuery project. The first index runs in minutes.

02

Embed on your support form

For native integrations, install the BeforeQuery app in Zendesk, Freshdesk, Front, or Jira SM. For custom forms, add a single JavaScript snippet and call the POST /form-deflect API endpoint when the user types or submits.

03

Set your confidence threshold

Configure the minimum confidence score that triggers a deflection answer. A high threshold (0.85+) means fewer deflections but higher quality. Start conservative and tune using the deflection analytics dashboard.

04

Go live and monitor

Enable the agent on your live form. The analytics dashboard shows deflection rate, confidence distributions, and knowledge gaps in real time — so you can keep improving the knowledge base and the threshold.

HTTP API

Integrate with any form in minutes

The form-deflect endpoint accepts a question and returns a confidence score, an AI-generated answer, and structured citations. Your form logic decides what to show the user based on the deflected field. No ticket is created unless you choose to proceed.

  • Authenticate with a public client key — safe for browser use
  • Returns answer, citations array, and confidence score
  • deflected: true when confidence exceeds your configured threshold
  • Works in any JavaScript framework or plain HTML
  • Combine with your existing form validation logic
  • Every call is logged for analytics regardless of outcome
POST /api/v1/public/projects/:projectId/form-deflect
REQUEST
{
  "question": "How do I reset my 2FA?",
  "session_id": "sess_abc",
  "form_context": {
    "page": "contact",
    "category": "account"
  }
}
RESPONSE
{
  "deflected": true,
  "confidence": 0.91,
  "answer": "To reset your 2FA, go to Account
Settings > Security > Reset Authenticator...",
  "citations": [
    {
      "title": "Two-Factor Authentication Guide",
      "url": "https://docs.example.com/2fa",
      "excerpt": "Navigate to Account Settings..."
    }
  ]
}
FORM DEFLECTOR SCRIPT

One script tag. Your form, untouched.

The embeddable Form Deflector script intercepts your existing support or contact form without modifying its HTML. When a user fills in the subject or message field, the script streams an AI-generated answer directly above the submit button — grounded in your knowledge base with cited sources. The user can read the answer and still choose to file the ticket if they need to.

  • Zero changes to your existing form HTML or backend
  • Intercepts on focus-out or keyup (configurable)
  • Streams the answer token by token via SSE for instant feedback
  • Answer UI injected adjacent to the form submit button
  • Citation links open in a new tab — user stays on the form
  • User clicks 'I still need help' to proceed with ticket submission
  • Works on any HTML form — Zendesk, Freshdesk, custom, or raw HTML
  • Single public client key — safe to ship in the browser
Drop into your page — no form changes needed
HTML SNIPPET
<script
  src="https://widget.beforequery.com/v1/deflect.js"
  data-project-id="proj_abc123"
  data-client-key="bq_pk_..."
  data-form-selector="#support-form"
  data-question-field="[name=subject]"
  data-body-field="[name=description]"
  data-trigger="blur"
  data-theme="auto"
  async
></script>
STREAMED ANSWER UI (auto-injected)
AI Answer
To reset your 2FA, go to Account Settings...
[1] Two-Factor Auth Guide
This answered my question
I still need help
SUPPORTED PLATFORMS

Works where your support form lives

Native integrations for the most common helpdesks, plus an open HTTP API for any custom form.

Zendesk

Installs via the Zendesk Marketplace. The agent intercepts the Help Center contact form and Web Widget submission flow, answering before the ticket API is called.

Freshdesk

Embeds on the Freshdesk customer portal contact form. Answered questions never reach the ticket queue. Unanswered requests create a ticket as normal.

Front

Attaches to the Front customer portal contact page. When confidence is high, the user sees an AI answer and can opt to still submit if needed.

Jira Service Management

Hooks into the Jira SM customer portal request form. Deflected questions are logged; escalated requests create a service request as usual.

Custom Forms

Any HTML form can integrate via the HTTP API. POST the user question to /api/v1/public/projects/:projectId/form-deflect with your client key and render the returned answer and citations.

HTTP API

Authenticate with a public client key (bq_pk_...). The response includes the AI answer, citation array, confidence score, and a deflected boolean so your form logic can decide what to show.

DEFLECTION ANALYTICS

Every deflection logged with a confidence score

The analytics dashboard shows deflection rate, confidence score distributions, which questions were answered, which were overridden by users, and which exposed gaps in your knowledge base. Use the gap report to prioritize what to document next.

  • Deflection rate over time — daily, weekly, monthly
  • Confidence score histogram for threshold calibration
  • Top deflected questions and their citations
  • Override rate: users who still submitted after seeing an answer
  • Knowledge gap list: questions with low confidence scores
  • Export CSV or connect via API for your BI tooling
DEFLECTION REPORT — LAST 30 DAYS
4,812
Form queries
68%
Deflected
94%
Answer quality
How do I cancel my subscription?0.97DEFLECTED
Where is my invoice PDF?0.93DEFLECTED
Billing charged wrong amount0.38ESCALATED

Frequently Asked Questions

Common questions about the BeforeQuery Support Form Agent

A chat widget sits on your page for open-ended conversation. The Support Form Agent is specifically designed for the moment a user is about to submit a support ticket. It intercepts the submission intent, searches your knowledge base, and shows a cited answer — before any ticket is created. If the AI cannot help or the user still wants to contact support, the form submits as normal. This produces higher deflection rates because the user is already in the problem-solving mindset.
When the confidence score is below your configured threshold, BeforeQuery does not show a deflection answer. The form behaves exactly as it would without the agent — the submission goes through to your helpdesk as normal. The low-confidence question is still logged in the analytics dashboard and surfaced in the knowledge gap report so you can create the missing content.
Yes. The deflection UI always includes a clear option to continue to submit the ticket if the user feels the AI answer did not fully resolve their issue. When a user overrides a deflection, that outcome is tracked separately in analytics. The override rate tells you how often your AI answers are resolving the issue versus falling short.
Call the POST /api/v1/public/projects/:projectId/form-deflect endpoint with the user's question and your public client key (bq_pk_...) in the X-Client-Key header. The response includes the answer, citations, confidence score, and a deflected boolean. Show the answer in your form UI when deflected is true. The endpoint is safe to call from the browser because public client keys are scoped read-only.
You set the confidence threshold in the BeforeQuery project settings — a number between 0 and 1. Start at 0.85 to be conservative: only deflect questions where the AI is highly confident. After a week, review the deflection analytics: if the override rate is high, lower the threshold; if you want more deflections on clear-cut questions, raise it slightly. The confidence score histogram in the dashboard makes this calibration straightforward.
Yes. Every call to the form-deflect endpoint is logged regardless of whether the confidence threshold was met. You can see the full distribution of confidence scores, which questions were deflected, which were escalated, and which were overridden by users. The analytics data is available in the dashboard and via the usage API for export to your BI tools.

Stop tickets before they start

Connect your knowledge base and add the form agent to your support form today. Most teams see deflection results within the first hour.