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
Live in four steps
Connect a knowledge source, embed on your form, set a threshold, and go live.
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.
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.
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.
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.
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
{
"question": "How do I reset my 2FA?",
"session_id": "sess_abc",
"form_context": {
"page": "contact",
"category": "account"
}
}{
"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..."
}
]
}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
<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>
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.
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
Frequently Asked Questions
Common questions about the BeforeQuery Support Form Agent
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.