Creating a Coveo Case Deflection Component in a Lightning Community

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.

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 Managing Dimensions on Custom Metadata).

Requirements

  1. Log in to Salesforce using an administrator account.
  2. Ensure your Salesforce Organization is linked to a Coveo Cloud Organization (see Configuring the Coveo for Salesforce Application).
  3. Ensure you have created a new community (see Create Communities).

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

Step 1 - Add the Coveo Case Deflection Component in Salesforce

  1. Access your Community Builder(see Navigate Community 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 are using an older community version created before Spring ‘18, ensure 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, click 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 wish 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 Cloud organization.

Step 2 - Configure Your Case Deflection Component in Coveo Cloud

  1. In your Coveo Cloud Administration Console (see Logging in to Coveo Cloud V2), select or create the query pipeline used by your Case Deflection and access the query pipeline Query Parameters (see Managing Query Pipeline Query Parameters).

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

  2. In the Machine Learning tab, add a new Machine Learning model, surch as Automatic Relevance Tuning (ART) model, with the Enable Intelligent Term Detection (ITD) option selected (see Activating Machine Learning Intelligent Term Detection (ITD) in Salesforce).

  3. In the Query Parameters tab, add a rule overriding the large query (lq) parameter value:

    1. Click Add Rule, and then select Query Parameters With Code.
      1. In the Add a Rule With Code dialog, in the form editor box, enter the following rule:

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

        When using a version prior to Coveo for Salesforce 3.16, enter the following rule:

         override query lq:"<@+ $context.Subject $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).
      2. Click Add Rule.

    2. In the Action bar, click More, and then select Select condition.

    3. Add a Condition that is applied when an empty query is performed (see Adding a Query Pipeline Condition to Be Applied on Empty Queries).
  4. Your Query Parameters tab should now look like this:

  1. In Salesforce, in Setup, search for and select Visualforce Components.

    With Salesforce Lightning With Salesforce Classic
    Under Platform Tools, select Custom Code > Visualforce Components. Under Build, select Develop > Visualforce Components.
  2. Next to your Case Deflection component, typically communityCaseDeflectionCoveo, select Edit.
  3. In the Visualforce Markup tab, search for the ... class="CoveoSearchInterface" ... element.
  4. Inside this element, add the following code:
     data-pipeline="NameOfYourPipeline"`
    

    The NameOfYourPipeline represents the name of the query pipeline that you selected in Step 2 (see Step 2 - Configure Your Case Deflection Component in Coveo Cloud).

Your Coveo Case Deflection component should now be linked to your Coveo Cloud organization and your query pipeline.

You must add the value and the field custom dimensions to make the events metadata available in your usage analytics reports (see Managing Dimensions on Custom Metadata).

What’s Next?

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

People also viewed