Where the script goes
Admin Center → Channels → Guide → Customize design → Edit code, then opennew_request_page.hbs. Inside <div id="main-content" class="form">, put the
script immediately before <div id="new-request-form"></div>:
The selectors
Zendesk’s markup differs between the classic theme and the current Copenhagen one, and again on any theme your team has customised. Start with the attribute selectors — they survive a theme change that renames ids:
Anchoring after the description field rather than at the button puts the
notice where the reader is already looking — they have just finished typing into
it — and keeps the strip clear of whatever your theme has stacked around the
submit control.
onClick because the Copenhagen theme’s submit is a real <button> with a
click handler. On an older theme it is an <input type="submit"> and onSubmit
is right; the deflector writes value on an input and textContent on a button
either way, so only the event differs.
Extra fields worth sending
The subject and the product dropdown, as labelled context:
A Zendesk custom field’s id is the numeric field id from Admin → Fields. The
dropdown sends its visible label, so “Product area: Billing” reaches the model
rather than “Product area: 360001”.
Copy
Hand-off into a hidden field
Create a custom field in Zendesk (Admin → Fields → Add field, type Multi-line), and set its permission to Agents can edit so it never renders for the requester. Then:
Now every ticket that arrives despite an answer carries the question, the answer
and the sources — so the agent starts from “that page didn’t cover your case”.
The rich-text case
If your Guide theme uses Zendesk’s rich-text description editor, the field is acontenteditable, not a textarea. Set Question field is a rich-text editor
on and point the question field at the editor’s own element — the deflector
converts the markup to text before sending it.
Do not point the hand-off target at that field: a rich-text editor can
rewrite its own value at submission time and drop what was written into it. Use
the hidden custom field above.
Signed-in vs anonymous
The anonymous requester email field exists only for signed-out requesters. On a Guide that requires sign-in there is no email field to read, and the deflection stays anonymous under the browser id — which is fine, and is what user tracking documents.Test it
- Open the request form signed out, in a private window, with
data-debug-mode="true"on the tag. - Type a real question of at least 25 characters into the description.
- Press submit. The modal should open with an answer and its sources.
- Press Continue to submit ticket. The ticket is created, with the transcript in the hidden field.
- Check Activity on the deflector — the interception should appear under Filed anyway.
Not the same as the Zendesk connector
Two different features, often confused:- This page — the deflector, on the form, before a ticket exists.
- Zendesk as a source — indexing your solved tickets so they can be answered from.
- Helpdesk automation — answering tickets that were filed anyway, from inside Zendesk.