--- title: CaseDeflection component slug: '2758' canonical_url: https://docs.coveo.com/en/2758/ collection: coveo-for-salesforce source_format: adoc --- # CaseDeflection component The _CaseDeflection_ component allows you to insert a case deflection component in your community. It takes care of wrapping and including the correct scripts and different resource references needed to do so. ## Options The component offers the following options: ### `queryContextFilter` The form fields you want to exclude of your case deflection component. You can add any fields that you want to remove from the context sent by the query. The selected fields appear under **Selected values**. Your fields should use their Salesforce API name (see [Find the API name of a field](https://help.salesforce.com/articleView?id=000007594&type=1&language=en_US)). By default, this box is empty. ### `queryDelay` The delay in milliseconds before the query is executed after a listened input has changed. Default value is `500`. ### `disableQueryForEmptyForm` Whether to run the query when the case form is empty. Default value is `false`. > **Notes** > > When setting `disableQueryForEmptyForm` to `true`, you should also set [`autoTriggerQuery`](https://coveo.github.io/search-ui/components/searchinterface.html#options.autotriggerquery) to `false` on the [`SearchInterface`](https://coveo.github.io/search-ui/components/searchinterface.html) component. > This disables the search query on the initial page load. > As a result, queries are only performed when the user starts typing in the case creation form. ### `emptyFormMessage` The message displayed in the `CaseDeflection` component when the query is disabled and the form is empty. Default value is `Fill in the case information to see relevant suggestions.`. ## Events The component responds to the following events: ### `CaseSubmit` When you want to signal to this component that a case has been submitted. All key-value pairs that you pass as argument to this event will be included as metadata in the sent UA event. ### `CaseUnload` When you want to signal to this component that the page was unloaded. All key-value pairs that you pass as argument to this event will be included as metadata in the sent UA event. ### `CaseInputChange` When you want to signal to this component that a field has changed on the Create A Case form. All key-value pairs that you pass as argument to this event will be included as metadata in the sent UA event. #### `Field` The name of the field that has its value changed. #### `Value` The new value of the field. ## Methods This component doesn't provide any method. ## Usage This component is included by default in the [CaseDeflection Lightning component](https://docs.coveo.com/en/1312/), as follows: ```xml
```