Add a UserActions component to the Coveo Insight Panel Classic Component

Note

For the Coveo Insight Panel Lightning Component, see Add the UserActions component to the Coveo Insight Panel Lightning Component.

You can take advantage of the UserActions component to allow agents to see the actions performed by the end user before or after the creation of a case within the Salesforce console (see UserActions Component).

When creating a case, the unique VisitId of the session is stored in the case in the VisitId__c custom field. With that information, the UserActions Component retrieves from the Coveo Usage Analytics (Coveo UA) system all actions that have been performed by the end user in that session so that agents can easily refer to the information in the Coveo Insight Panel Classic Component.

To implement the UserActions component

  1. In Salesforce, access your Coveo Insight Panel Classic Component.

  2. In the Coveo Insight Panel Classic Component, select Customize Panel to access the Interface Editor.

  3. Add code to get your user VisitId from Coveo UA.

    Important
    Important

    Skip to step 4 step if you’re using Coveo for Salesforce v2.6 or higher.

    1. In the Interface Editor, check the Advanced Mode box, and select Code.

    2. Add a script tab with the following code:

       $(".CoveoAnalytics").coveo().client.getCurrentVisitIdPromise().done(function(visitId) {
           $("#{!$Component.VisitId}").val(visitId); // Assuming that you have an <apex:inputfield /> element with "VisitId" as id.
       });
  4. Add the UserActions component.

    1. In the Interface Editor, select the Code View tab at the top of the page, or check the Advanced Mode box and select Code when using an older version of Coveo for Salesforce.

    2. Locate the coveo-box-popups-section div of your component.

    3. In this div, add the following divs:

       <div class="CoveoBoxPopup" data-title="User actions" data-full-width="true" data-full-height="true" data-icon="coveo-sprites-tab-people">
           <div class="CoveoUserActions"></div>
       </div>
    4. Save the page by selecting Save.

Your page should now have a User actions button under your tabs.

37103205