FAQ
How should I configure data-submit-element-event-type
and data-submit-element-query-selector
?
The combination of data-submit-element-query-selector
and data-submit-element-event-type
tells the support form deflector what DOM element to monitor for what kind of event to know when to trigger an answer generation.
We recommend that you try following combinations in order:
Override the form element's onSubmit
event.
data-submit-element-query-selector="<query selector for your form element>"
data-submit-element-event-type="onSubmit"
This configuration listens to the onSubmit
event on the form element and blocks all form submission attempts, including those initiated by keyboard shortcuts.
Override the submit button onClick
event.
If the above does not work, due to other event listeners with higher precedence overriding the deflector, we recommend the following configuration:
data-submit-element-query-selector="<query selector for your form's submit button>"
data-submit-element-event-type="onClick"
This configuration listens to the onClick
events of the form's submit button. It triggers before the onSubmit
event.
This approach will not prevent form submissions initiated by actions such as keyboard shortcuts.
Can I see the deflection rate of my tickets?
Yes, you can see the deflection rate of your support form deflector on the homepage of the kapa platform in the aggregate statistics.
How is the deflection rate calculated?
A support ticket counts as deflected if the user does not submit their ticket after seeing kapa's answer. Reversely, a ticket counts as deflecton failure if the user still submits their ticket after seeing kapa's answer.
Technically, this is implemented as follows: the support form deflector will count a ticket as deflection failure if it observes a data-submit-element-event-type
event on the data-submit-element-query-selector
DOM elment after it has finished generating an answer, i.e. the user is clicking the submit button of the form again after having read kapa's answer.
In case of a multi step form additional configuration is required to calculate the deflection rate correctly. To illustrate, in a multi step form data-submit-element-query-selector
is the next button on the first page of the form. When the user clicks this button we want to generate an answer. However, the actual button to submit the form is on the next page where the user needs to fill in their contact information. In this scenario we need to additionally configure data-deflection-failure-trigger-element-query-selector
and data-deflection-failure-trigger-element-event-type
to monitor the button that submits the form.