ResultQuickAction Component

In this article

Coveo for Salesforce 3.36 (July 2019)

The ResultQuickAction component is a result template component that allows your users to quickly add a custom result action that uses a Salesforce action.

Options

The component offers the following options:

actionName

Specifies the name of the Quick Action bound to this result action.

Default value is empty, even if this field is required.

<div class='CoveoResultQuickAction' data-action-name='<YOUR_ACTION_NAME>'></div>

Where you replace <YOUR_ACTION_NAME> by the name of the Quick Action bounded to this result action.

targetFields

Specifies the fields that will be sent in the arguments of the Quick Action.

This argument must be provided as a JSON object.

Default value is ${FieldName}.

<div class='CoveoQuickResultAction' data-target-fields='{"Body":{"value":"<b>${title}</b>(${ClickUri})<br/><p><i>"${Excerpt}"</i></p>","insertType": "replace"}}'></div>

onSendActionEvent

Specifies the name of the event to dispatch. You could then hook to that event and modify the action arguments before sending the action to Salesforce.

This field is optional.

<div class='CoveoResultQuickAction' data-on-send-action-event='ResultActionsEvents.onYourActionName'></div>

autoSubmit

Specifies if the component should submit the post right away.

Default value is false.

<div class='CoveoResultQuickAction' data-auto-submit='true'></div>

icon

Specifies the icon that the ResultAction will display.

If text is provided, the button will contain that text. If the HTML of an SVG image is provided, that image will be displayed in the button.

<div class='CoveoResultQuickAction' data-icon="<MY_ICON>"></div>

Where you replace <MY_ICON> with the text that the button should contain or the HTML of the SVG image that the button should display.

tooltip

The tooltip that displays on hovering the ResultAction.

Default value is empty.

<div class='CoveoResultQuickAction' data-tooltip="<TOOLTIP>"></div>

Where you replace <TOOLTIP> with the message you want to be displayed when hovering the ResultAction.

Methods

This component doesn’t provide any methods.

Usage

This component can be included in the Coveo Insight Panel Lightning Component. It should be inserted in the <div class='CoveoResultActionsMenu'></div> section.

<div class='CoveoResultQuickAction'></div>