Case Deflection component
Case Deflection component
To augment case deflection, the Coveo Case Deflection component lets you display relevant content that dynamically changes depending on the content of a request.
|
Note
The Coveo Case Deflection component requires Zendesk v0.0.2 or later. |
Use the Coveo Case Deflection component
For steps on accessing the folders in the Customize design window of Zendesk, see Customizing your help center theme.
-
Go to your theme customization page and click Edit Code.
-
Locate the page template that corresponds to the new request page (generally
new_request_page.hbs
). -
Enter your page template code where indicated in the code block.
<CoveoCaseDeflection> <!-- Replace this comment with your page template --> </CoveoCaseDeflection>
Use Coveo hosted search pages for case deflection
The Coveo Case Deflection component can be used in conjunction with the Coveo Hosted Search Page component. To do so, you must replace your page template with the Coveo Hosted Search Page component.
<CoveoCaseDeflection>
<CoveoHostedSearchPage data-page-name='ZendeskCaseDeflection' />
</CoveoCaseDeflection>
When you save and reload the page, you’ll see the results displayed on your new request page.
|
Note
For increased accessibility, you can modify the layout to display the form and the results side by side. For example:
|
Filter results with request context
Once the component is in place, you can see additional context sent with every Coveo query request. Upon opening the browser developer tool, you can locate a REST query going to https://platform.cloud.coveo.com/rest/search/v2
.
By scrolling to the bottom, you’ll see the context
parameter. This parameter sends a JSON with the attributes of the request and should look like this:
context: {"subject":"Issues with my widget","description":"My widget is broken"}
The keys in this JSON are useful for configuring your Case Deflection component where you’ll configure your query pipeline. Any key in this JSON can be used in your query pipeline. For example:
$context.subject
Configure your Case Deflection component
-
In your Coveo organization, select or create the query pipeline used by your Case Deflection component.
-
In the Machine Learning tab, add a new Coveo ML model, such as an Automatic Relevance Tuning (ART) model, with the Enable Intelligent Term Detection (ITD) option selected. See Configure an Automatic Relevance Tuning model for Case Deflection or Case Assist Document Suggestions for instructions on how to create a Coveo ML ART model that’s optimized for case deflection.
-
In the Query Parameters tab, add rules overriding the basic query expression (
q
) and the large query expression (lq
) parameter values:-
Click Add a query parameter rule.
-
On the Add a query parameter rule subpage, select q (basic query expression), and then click Next.
-
Under q (basic query expression), enter the following expression:
<@+ $context.subject +@>
.If you enabled the query syntax in your Case Deflection component, you must remove the
<@` and `@>
markers from the query parameter rule overriding the q. When the query syntax is enabled, you must enter the following rule:$context.subject
-
Under Condition, select or create a
Query is empty
condition. -
Click Add rule.
-
To add a rule to override the
lq
parameter value, click Add a query parameter rule once again. -
On the Add a query parameter rule subpage, select lq (large query expression), and then click Next.
-
Under lq (large query expression), enter the following expression:
<@+ $context.description +@>
. -
Under Condition, select or create a
Query is empty
condition. -
Click Add rule.
-