Adding the User Actions Component to the Coveo Insight Panel Lightning Component

Lightning Experience

Coveo for Salesforce 3.38 (August 2019)

For this feature to work, you must have the corresponding service enabled. Contact us to enable this feature.

The User Actions Component allows users of the Coveo Insight Panel Lightning Component to analyze all of a contact’s recent activities, such as user queries, clicked documents, and page views. It records up to 2,000 events.

Once integrated in a search interface, the component automatically displays the Viewed by Customer label.

To ensure that the actions taken by a user during their multiple visits are displayed accurately, the User Actions component leverages the Coveo User Stitching service.

This component is available for the Coveo Insight Panel Lightning Component, as well as the Full Search page.

3129-userActions

Adding the User Actions Component

  1. Access the Coveo Insight Panel Lightning Component.

  2. Access the Edit mode of the Coveo Insight Panel Lightning Component by clicking Settings and selecting Edit.

  3. Access the Code View tab.

  4. Insert the following code directly below the <div class="coveo-search-section"></div> element:

    <div class="CoveoUserActions"></div>
    
    • Ensure that you don’t insert the code in the result template or in the coveo-main-section.

    • The Start Date is displayed in the language of your browser.

Configure the User Actions Component for Specific Salesforce Object Types

Coveo for Salesforce 3.46 (February 2020)

By default, the User Actions Component shows actions performed by the contact who created the current case. However, you can also use the User Actions Component on other Salesforce object types. In order to do so, you must configure the Coveo Insight Panel Lightning Component to use the correct field to retrieve the user’s activity.

  1. Access the Advanced Configuration mode of the Coveo Insight Panel Lightning Component.

    3129-advancedConfiguration

  2. Locate User Actions email fields, and then set the field that contains the user’s e-mail address.

    Suppose you’re integrating the Coveo Insight Panel Lightning Component in the Contact record page. To display the current contact’s user actions, you would set User Actions email fields to Email.

Validate the User Actions Component Configuration

Coveo for Salesforce 3.46 (February 2020)

When the User Actions Component is configured correctly, the User Actions button appears in the Coveo Insight Panel Lightning Component.

User Actions button in the Insight Panel

If the User Actions button isn’t visible, please verify the field specified in User Actions email fields. It should:

  • Exist on the Salesforce object type and be referenced by its API name.

  • Have a value on the current record.

  • Be visible to the user opening the current record page.

Managing the Viewed by Customer Label

Coveo for Salesforce 3.39 (August 2019)

When the User Actions Component is added to a search interface, the Viewed by Customer label is automatically displayed in search results that the related contact has previously viewed.

3129-viewedByCustomer

The Viewed by Customer label cannot be used if the User Actions Component isn’t initialized in your search interface

Coveo for Salesforce 3.43 (December 2019) The Viewed by Customer label is automatically added in the default page template. For AttachedResults components created before the release of Coveo for Salesforce v3.43, you can either delete the page template or include the HTML element in your search interface.

<div class="CoveoUserActions" data-hidden="true" data-viewed-by-customer="true"></div>

Using the Viewed by Customer Label Without the User Actions Component

You may want to take advantage of the Viewed by Customer label without using the User Actions Component in your search interfaces. To achieve this, you must hide the User Actions Component in your search interface, and then enable the data-viewed-by-customer Component option:

  1. Add the User Actions Component in your search interface.

  2. Modify the User Actions element added in Step 1 as follows:

    <div class="CoveoUserActions" data-hidden="true" data-viewed-by-customer="true"></div>
    
  3. Click Save.

Customizing the Viewed by Customer Label

You may want to modify the position of the Viewed by Customer label in your search results. To achieve this, you must use the CoveoViewedByCustomer component in your result templates:

The CoveoViewedByCustomer component won’t work if the User Actions Component isn’t initialized on your search interface.

  1. Add the User Actions Component in your search interface.

  2. Use one of the following procedures to add the CoveoViewedByCustomer component:

    • Coveo for Salesforce 3.42 (November 2019) Use the Interface Editor to drag and drop, move, or delete the component in the result template. You can modify the Label, if needed, or use the Visibility check box to display an icon beside the results viewed by the customer.

      ViewedByCustomerIE

    • Access the Code View tab and insert the following code in a coveo-result cell, within a <div class="coveo-result-row"> element:

      <span class="CoveoViewedByCustomer"></span>
      
  3. Click Save.

Recommended Articles