Using the Result Actions

Lightning Experience

Coveo for Salesforce 3.16 (August 2018)

Result actions are buttons that enable users to perform one-click actions on search results from the Coveo Insight Panel Lightning Component (see Integrating a Coveo Insight Panel Lightning Component). In addition to providing a convenient way for your agents to explore and share search results, result actions usage is recorded and intelligently used by Coveo Machine Learning (Coveo ML) Automatic Relevance Tuning (ART) models to improve the search result ranking.

Seven result actions are currently available:

Each action has an icon. Icons are always displayed beside a result.

Attach to Case

The Attach to Case result action adds a paperclip Paperclip to the items suggested in the Coveo Insight Panel Lightning Component. Users can attach those items to any Salesforce object, even non-case objects, by clicking the paperclip icon.

Attached items have a yellow paperclip Paperclip.

attach-to-case-result-action

For more information, see Adding the AttachedToCase Result Action in a Coveo Insight Panel Lightning Component.

Copy to Clipboard

Coveo for Salesforce 3.48 (March 2020)

The Copy to Clipboard result action lets users copy a result to their clipboard by clicking Copy-to-Clipboard.

Quick View

The Quick View result action lets users preview a result without leaving the search page by clicking Quick-View.

Send as Email

The Send as Email result action lets users insert a result link to an email by clicking Send-as-Email.

Coveo for Salesforce 3.46 (February 2020)

By default, the Send as Email result action is automatically handled for all Salesforce standard object types (e.g., Account, Opportunity, etc.), except Case. However, you may want to:

Configuring Send as Email for Cases

  1. Ensure that you enabled the Email-to-Case option (see Enable and Configure Email-to-Case).

    You should also create a Send Email quick action to be able to use the Send as Email result action (see Create a Send Email Quick Action for Cases). You must ensure that the created Send Email quick action name is SendEmail.

  2. In Salesforce, access your Lightning Service Console, and open any of your cases.

  3. Select the Email action.

  4. Hover over a result in the Coveo Insight Panel Lightning Component and click Send-as-Email.

You should now see your recommended solution inserted in your email text box.

Configuring Send as Email for Custom Objects

To take advantage of the Send as Email result action for custom objects, you must set up the Email tab in your custom object record pages:

  1. Select the Allow Activities option on your custom object (see Manage Custom Objects).

  2. Add the Salesforce Activities component to your record pages (see Standard Lightning Page Components).

Post to Feed

The Post to Feed result action lets users insert a result into a chatter post by clicking Post-to-Feed.

  1. In Salesforce, access your Lightning application, and then open any of your records.

    You must open an object record for which the Coveo Insight Panel Lightning Component was integrated.

  2. Access the Chatter Salesforce component, and then select the Post tab.

  3. Hover over a result in the Coveo Insight Panel Lightning Component, and then click Post-to-Feed.

To customize your Post to Feed component, see ResultActionsPostToFeed Component.

Send to Chat

The Send to Chat result action lets users insert a result to a chat conversation by clicking Send-to-Chat.

You won’t be able to use the Send to Chat component in two situations (see Lightning Live Agent Panel is broken [SPRING ‘19]):

  • After upgrading to Salesforce Spring ‘19 while staying with a Coveo for Salesforce version prior to 3.25

  • After upgrading to the Coveo for Salesforce version 3.26 (or up) while staying with the Salesforce Winter ‘18 version

If you don’t want to upgrade Coveo for Salesforce and Salesforce to their latest version, you must create a custom script using the following code to use the component again (see Adding JavaScript to the Coveo for Salesforce Lightning Components with Custom Code):

window.coveoCustomScripts['default'] = function() {
  var root = document.querySelector('.CoveoSearchInterface');
  Coveo.$$(root).on('ResultActionsEvents.onSendToLiveAgent', function(_evt, args) {
    args.args.message = { text: args.args.message };
  });
};
  1. Ensure that you have enabled the Live Agent in your Salesforce organization.

  2. While you’re in an active Live Agent chat session, you can hover over a result in the Coveo Insight Panel Lightning Component and click Send-to-Chat.

To customize your Send to Chat component, see ResultActionsSendLiveAgent Component.

CoveoResultQuickAction

The CoveoResultQuickAction result action is a result template component that lets users add a custom result action that uses a Salesforce action.

You can replace the existing result actions with the generic CoveoResultQuickAction component.

Coveo for Salesforce 3.36 (July 2019)

  1. In Salesforce, access the Lightning Console that contains your Coveo Insight Panel Lightning Component.

  2. Access the Edit mode of your Coveo Insight Panel Lightning Component.

    1. Access the Code View tab.

    2. Under <div class="CoveoResultActionsMenu">, add the following line:

        <div class="CoveoResultQuickAction"></div>
      

    To customize your CoveoResultQuickAction, see CoveoResultQuickAction Component.

Adding the Result Actions to the Full Search Page

You can take advantage of the Attach to Case, Copy to Clipboard, and Quick View result actions in your Full Search page.

Result actions must be added to each result template in the Full Search page.

  1. In your Coveo Insight Panel Lightning Component, click Full Search to access the Full Search page.

  2. Access the Interface Editor of the Full Search page.

  3. In the menu on the left, click the cogwheel icon to access the Result Templates tab.

  4. Choose the result template where you want to insert the result actions, and access the Code tab.

  5. Under the <div class="coveo-result-frame"> element, depending on the result actions you want to add to the search page, add the following snippet:

     <div class="CoveoResultActionsMenu">
       <div class="CoveoAttachToCase" data-display-tooltip="true"></div>
       <div class="CoveoCopyToClipboard"></div>
       <div class="CoveoSalesforceQuickview"></div>
     </div>
    
Recommended Articles