Integrating a Coveo Case Deflection Component

Pro and Enterprise editions only

Pilot Feature in 3.10 Generally Available in 3.29+

The Coveo Case Deflection component increases self-service in a Salesforce Community. As the user enters information into the Salesforce Create Case Form, the Coveo Case Deflection component automatically displays recommended solutions related to their issue.

Case Deflection

As of Coveo for Salesforce 3.16, the CaseSubmit event is recorded as a custom event. You have to create new custom dimensions for subject and description to be able to view this information in the Visit Browser and your analytics reports (see Manage Dimensions on Custom Metadata).

Requirements

  1. Log in to Salesforce using an administrator account.

  2. Ensure that your Salesforce Organization is linked to a Coveo organization (see Configuring the Coveo for Salesforce Application).

  3. Ensure that you have created a new community (see Create an Experience Cloud Site).

    When creating a community, the only supported template is Customer Service.

Step 1: Add the Coveo Case Deflection Component in Salesforce

  1. Access the Salesforce Experience Builder.

  2. Access the page where you want to insert your Coveo Case Deflection component, typically the Contact Support page.

    If you choose the Contact Support page, delete the existing Salesforce Case Deflection component before adding the Coveo component.

    If you’re using an older community version created before Spring ‘18, ensure that you replace the Salesforce Create Case Form component with the Salesforce Contact Support Form (see Migrate to the Contact Support Form and Case Deflection Components).

  3. In the left sidebar, select the Components tab.

  4. In the Components tab, under Custom Components, drag the Coveo Case Deflection component and drop it on the right side of the Contact Support Form, in the Sidebar section.

  5. At the top right of the page, click Preview.

  6. In the Coveo Case Deflection component, click Set Up a Search Page.

  7. Choose the tabs you want to have in your panel and select Create Page. You can always change the tabs later.

Now that you have your Coveo Case Deflection component, you must set a query pipeline to link your component to your Coveo organization.

Step 2: Configure Your Case Deflection Component in Coveo

The process of configuring the Case Deflection Component in Coveo slightly differs depending on the Coveo for Salesforce version you’re using:

Coveo for Salesforce 3.16 and Later Versions

  1. In your Coveo organization, select or create the query pipeline used by your Case Deflection Component.

    You should note the query pipeline name you entered for a further step.

  2. In the Machine Learning tab, add a new Coveo Machine Learning (Coveo ML) model, such as an Automatic Relevance Tuning (ART) model, with the Comply With 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 is optimized for case deflection.

  3. In the Query Parameters tab, add rules overriding the basic query expression (q) and the large query expression (lq) parameter values:

    1. Click Action-Menu, and then select Add query parameters rule with code.

    2. On the Add a Rule With Code subpage, in the form editor box, enter the following rules:

       override query q:"<@+ $context.subject +@>"
      
       override query lq:"<@+ $context.description +@>"
      

      If you enabled the query syntax in your Case Deflection Component, you must remove the <@+ and +@> markers from the query parameter rule overriding the basic query expression (q). When the query syntax is enabled, you must enter the following rules:

       override query q:"$context.subject"
      
       override query lq:"<@+ $context.description +@>"
      
    3. Click Add With Code.

    4. Back in the Query Parameters tab, click the created rules, and then in the action bar, click Edit.

    5. In the Edit a Query Parameter Rule subpage that opens, under Condition, select or create a condition that applies when an empty query is performed.

    6. Click Save.

    Your Query Parameters tab should now look like this:

Coveo for Salesforce Versions Prior 3.16

  1. In your Coveo organization, select or create the query pipeline used by your Case Deflection Component.

    You should note the query pipeline name you entered for a further step.

  2. In the Machine Learning tab, add a new Coveo Machine Learning (Coveo ML) model, such as an Automatic Relevance Tuning (ART) model, with the Comply With 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 is optimized for case deflection.

  3. In the Query Parameters tab, add rules overriding the basic query expression (q) and the large query expression (lq) parameter values:

    1. Click Action-Menu, and then select Add query parameters rule with code.

    2. On the Add a Rule With Code subpage, in the form editor box, enter the following rules:

       override query q:"<@+ $context.Subject +@>"
      
       override query lq:"<@+ $context.Description +@>"
      
      • If you enabled the query syntax in your Case Deflection Component, you must remove the <@+ and +@>markers from the first query parameters rule. When the query syntax is enabled, you must enter the following rules:

          override query q:"$context.Subject"
        
          override query lq:"<@+ $context.Description +@>"
        
      • As of Coveo for Salesforce 3.16, the field names are modified in snake case format (see Snake Case)

          override query lq: "<@+ $context.My__CUSTOM_Description__c +@>"
        

        must become

          override query lq: "<@+ $context.my_custom_description +@>"
        
      • To add a customData field in a version prior to Coveo for Salesforce 3.16, the field name has to be exactly the selected Salesforce custom field name (see Create Custom Fields).

    3. Click Add With Code.

    4. Back in the Query Parameters tab, click the created rules, and then in the action bar, click Edit.

    5. In the Edit a Query Parameter Rule subpage that opens, under Condition, select or create a condition that applies when an empty query is performed.

    6. Click Save.

    Your Query Parameters tab should now look like this:

Step 3: Route Queries to the Desired Query Pipeline

Now that the query pipeline is configured to handle case deflection queries, you should make sure that every query originating from the Case Deflection component are routed to that query pipeline.

The most recommended and flexible query pipeline routing mechanism is condition-based routing. In this scenario, search requests are authenticated with a search token that contains a searchHub parameter, and each query pipeline except the default one should have a distinct query pipeline condition based on a specific search hub value such as Search Hub is Case Deflection. When using this routing mechanism, you ensure that search requests are routed according to the search interface from which they originate.

See Configure the Search Token for a Case Deflection Component for instructions on how to configure a custom search token that is generated server side for your Case Deflection component.

What’s Next?

For more information about the Search Interface, see Coveo SearchInterface Component

What's Next for Me?