Every deflector setting, with its dashboard field, script-tag attribute, JavaScript option and default. A dashboard setting applies to every page that uses the deflector. An attribute on the script tag, or an option passed to attach(), wins on that one page.
Leave an attribute off to keep the dashboard value. An empty value ("") is not the same: it replaces it. For on/off attributes, any value except "false" or "0" means on.

Setup

The Setup tab. Dashboard only.
SettingDefaultWhat it does
NameHow the deflector is listed
Knowledge baseWhere answers come from. To change it, pick a public key from the new knowledge base in the same save, then update the snippet on your page
Public client keyThe kl_pk_… key in the snippet. Must belong to the knowledge base
Allowed domainsAny siteSites that may use the deflector, one per line. An exact origin (https://support.example.com), https://*.example.com for one level of subdomains, or a regular expression starting with ^. localhost always passes this list. The public key’s own allowed origins still apply, with no exception for localhost
Confidence threshold55%Answers below it are not shown, and the ticket is filed
VoiceKnowledge base’s own personaA customization to answer in
Live / DisabledLiveA disabled deflector stops answering. The form submits as normal

Script tag

AttributeOptionWhat it does
data-knowledge-base-idknowledgeBaseIdRequired. The knowledge base to answer from
data-client-keyclientKeyRequired. The public client key (kl_pk_…)
data-deflector-iddeflectorIdThe deflector to load settings from. Without it, put the form and question field on the tag

Form wiring

The Form wiring tab. Most forms need only the first two; the rest are under Advanced.
SettingAttributeOptionDefaultWhat it does
Form selectordata-deflect-formdeflectFormThe <form> to intercept
Question fielddata-deflect-question-fielddeflectQuestionFieldThe field where the reader describes the problem
Submit elementdata-submit-element-query-selectorsubmitSelectorThe formThe element whose event starts the answer. Set it when the button is outside the form
Intercept ondata-submit-element-event-typesubmitEventonSubmitonSubmit (Submit event) or onClick (Click event)
Submit buttondata-submit-button-query-selectorsubmitButtonSelectorThe submit elementDisabled while the answer is generated
Anchor elementdata-anchor-element-query-selectoranchorSelectorThe submit button, then the formWhere the notice, progress line and reopen button appear
Positiondata-anchor-element-positionanchorPositionbeforebeginbeforebegin, afterbegin, beforeend or afterend
Email fielddata-user-email-query-selectoruserEmailSelectorThe form’s email input. See User tracking
Question field is a rich-text editordata-main-input-formats-htmlquestionFieldIsHtmlOffTurns the field’s HTML into text before sending
A selector can be CSS, a name or an id. To reach inside an iframe or a shadow root, see Crossing DOM boundaries.
Start with Submit event. If the ticket is filed with no pause, switch to Click event. With Submit event the deflector listens on the form; with Click event, on the submit element.

What gets sent

SettingAttributeOptionWhat it does
Extra inputsdata-extra-input-query-selectors and data-extra-input-namesextraFieldsOther fields sent as context, such as a product dropdown. Comma-separated selectors and their labels, paired in order. The option takes [{ selector, label }]
data-deflect-subject-fieldsubjectFieldThe ticket subject, searched together with the question. Defaults to a field named subject
Answer only from these source groupsdata-source-group-idssourceGroupIdsAnswer only from these source groups. On the Behaviour tab
data-extra-input-query-selectors="#request_subject,#request_product"
data-extra-input-names="Subject,Product area"
  • An extra input reaches the answer as Product area: Billing. It adds context but is not searched. A dropdown sends the label the reader sees.
  • Up to 12 extra inputs are sent, each cut to 500 characters.
  • Source groups set in the dashboard always win. The page can’t change them.

Deflection tracking

The Multi-step forms card on the Form wiring tab. See Multi-step forms.
SettingAttributeOptionDefaultWhat it does
Ticket-submitted elementdata-deflection-failure-query-selectorfailureSelectorNot setThe element that actually files the ticket. Once it is found, only it counts a ticket as filed anyway. See Multi-step forms
Watched eventdata-deflection-failure-event-typefailureEventonSubmitonSubmit or onClick

Who asked

Script tag only, and shared with the Ask AI widget. See User tracking.
AttributeOptionDefaultWhat it does
data-user-iduserIdYour own id for a signed-in reader
data-user-emailuserEmailThe reader’s email, if the page knows it. A filled-in Email field wins
data-user-analytics-cookie-enabledanonymousIdtrueSend an anonymous browser id
data-user-analytics-fingerprint-enabledfingerprintfalseBuild the id from the browser instead of storing one

Copy

The Copy tab. Leave a field empty to keep the default. Labels can be up to 120 characters, the notice up to 500.
SettingAttributeOptionDefault
Submit button text while armeddata-submit-button-text-overridesubmitButtonTextThe page’s own label
Element holding the labeldata-submit-button-text-query-selectorsubmitButtonTextSelectorThe button
Notice shown before generatingdata-pre-submit-info-textpreSubmitTextNothing
Modal titledata-deflect-modal-titlemodalTitleWe found an answer for you
Reopen buttondata-modal-button-textreopenTextView the answer again
While generatingdata-modal-loading-textloadingTextUnderstanding your issue…
loadingSubTextOur AI assistant might have an answer for you in 10–15 seconds. No need to wait for a human reply if it helps.
Skip the waitdata-modal-skip-textskipTextSkip and submit
Modal — satisfieddata-modal-dismiss-textdismissTextThat answered my question
Modal — file anywaydata-modal-submit-textsubmitTextContinue to submit ticket
Follow-up placeholderdata-follow-up-placeholderfollowUpPlaceholderAsk a follow-up question...
Follow-up send buttondata-follow-up-send-textfollowUpSendTextAsk
Rating promptdata-feedback-textfeedbackTextDid this solve your issue?
Rating — solveddata-feedback-yes-textfeedbackYesTextYes, this solved it
Rating — not solveddata-feedback-no-textfeedbackNoTextNo, I still need help
  • Submit button text while armed needs a Submit element or Submit button selector. It shows once the question is long enough to check, and the page’s own label returns after an answer is shown.
  • Element holding the label is for a button with an icon: point it at the text inside (often span) so the icon stays.
  • loadingSubText is the line under While generating, set from JavaScript only. An empty string hides it.
  • data-modal-title also works, but it sets the Ask AI widget’s title too.

When it runs

The Behaviour tab. The timings are under Timing.
SettingAttributeOptionDefaultWhat it does
Minimum question lengthdata-min-question-lengthminQuestionLength25Shorter questions go straight through
Repeat window (seconds)data-query-cache-secondscacheSeconds7200Submitting the same question again within this time files the ticket. -1 turns it off
Wait for form (ms)data-wait-for-elements-timeoutwaitForElementsMs10000How long to look for the form and question field. -1 waits forever
Delay before attaching (ms)data-render-timeoutrenderTimeoutMs0Wait before looking for the form. Try 500 for a form your framework re-renders after load
Hold back “skip” for (ms)data-option-to-cancel-answer-delaycancelAnswerDelayMs0Delay before Skip and submit appears
Attach as soon as the page loadsdata-render-on-loadrenderOnLoadOnOff means you attach it yourself. See Rendering manually
  • Kelu also checks the minimum length against the dashboard value, so a lower value on the page won’t let shorter questions through.
  • The repeat window is per browser and per question. An edited question is checked again. With -1, every press asks again.

The modal

The Behaviour tab.
SettingAttributeOptionDefaultWhat it does
Allow follow-up questionsdata-follow-up-enabledfollowUpOnA box under the answer for more questions, in the same conversation
Ask whether the answer helpeddata-resolution-tracking-enabledresolutionTrackingOnYes/No buttons under each answer. Votes go to analytics. The reader never sees a count

Hand-off

The Hand-off tab. See Conversation hand-off.
SettingAttributeOptionDefault
Carry the conversation onto the ticketdata-handoff-enabledhandoffEnabledOff
Target fielddata-handoff-target-query-selectorhandoffTargetSelectorRequired when hand-off is on
What to writedata-handoff-formathandoffFormatlink

Debugging

AttributeOptionDefaultWhat it does
data-debug-modedebugfalseLogs what the deflector found, decided and sent to the browser console

JavaScript API

The script installs window.KeluFormDeflector:
window.KeluFormDeflector.attach({
  knowledgeBaseId: "YOUR_KNOWLEDGE_BASE_ID",
  clientKey: "kl_pk_...",
  deflectorId: "YOUR_DEFLECTOR_ID",   // loads every other setting
});

window.KeluFormDeflector.render();    // attach now
window.KeluFormDeflector.unmount();   // remove everything the deflector added
attach() takes any option from the tables above and replaces a deflector that is already attached. See Rendering manually. Moving from kapa.ai? The deflector also reads kapa’s attribute names.