Coveo for Salesforce (v3.23) JavaScript Components - Generated From Code

Coveo for Salesforce comes with a set of JavaScript search user interface components. This article provides component API reference documentation that is automatically generated from the source code.

Components

Components are the building blocks of the Coveo JavaScript Search Framework (see Components ).

AttachToCase Component

Component HTML element class: CoveoAttachToCase

The AttachToCase component is a Result Templates component that allows you to link a result to a Salesforce case.

When wanting to attach Knowledge articles, ensure that the sfkbid, sfkbversionnumber (legacy), sfversionnumber (express), and sflanguage fields are properly populated on the article (see Add/Edit Mapping for Cloud V2 and Managing Fields for a Source for Cloud V1).

<div class="CoveoAttachToCase"></div>

Options

Option

(type)

Description
displayText

(boolean)

Specifies if the component should include the Attach/Detach text. Default value is false.

<div data-display-text='true'/>
displayTooltip

(boolean)

Specifies if the component should include the Attach/Detach tooltip. Default value is false.

<div data-display-tooltip='true'/>
readonly

(boolean)

Specifies if the component should be in read only mode. When in read only mode, you cannot Attach or Detach results. The default value is false.

<div data-readonly='true'/>
options

(object)

The possible options for AttachToCase

options.displayText

(boolean)

Specifies if the component should include the Attach/Detach text. Default value is false.

<div data-display-text='true'/>
options.displayTooltip

(boolean)

Specifies if the component should include the Attach/Detach tooltip. Default value is false.

<div data-display-tooltip='true'/>
options.readonly

(boolean)

Specifies if the component should be in read only mode. When in read only mode, you cannot Attach or Detach results. The default value is false.

<div data-readonly='true'/>
BoxdisplayText

(boolean)

Specifies if the component should include the Attach/Detach text. Default value is false.

<div data-display-text='true'/>
BoxdisplayTooltip

(boolean)

Specifies if the component should include the Attach/Detach tooltip. Default value is false.

<div data-display-tooltip='true'/>
Boxreadonly

(boolean)

Specifies if the component should be in read only mode. When in read only mode, you cannot Attach or Detach results. The default value is false.

<div data-readonly='true'/>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Boxbind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

BoxcomponentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

BoxcomponentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

Boxdisabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

Boxlogger

(Logger)

Allows component to log in the dev console.

BoxqueryController

(QueryController)

Contains the singleton that allows to trigger queries.

BoxqueryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

Boxroot

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

BoxsearchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

BoxusageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

BoxID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Boxconstructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Box Component

Component HTML element class: CoveoBox

The Box component represents the container that includes all the other box components. It inherits from a SearchInterface Component and supports all of its options.

<div class='CoveoBox'></div>

Options

Option

(type)

Description
enableAutomaticResponsiveMode

(boolean)

Whether the component should automatically adapt to the screen size. Default value is true.

<div data-enable-automatic-reponsive-mode="true"></div>
enableBoxStateHistory

(boolean)

Specifies if you wish to save and reload the Box state when the page is closed and reopened. This saves the current state of the current tab that is selected.

If set to false, the tab reverts to the default one on each page load.

If set to true, each time you reload the page, the last tab that you selected will be automatically selected.

Default value is true.

<div data-enable-box-state-history="true"></div>
excerptLength

(number)

Specifies the length (in characters) of the result text (excerpt) to display. Default value is 80.

Minimum value is 0.

<div data-excerpt-length="80"></div>
resultsPerPage

(number)

Specifies the number of results you want per page. Default value is 20.

Minimum value is 0.

<div data-results-per-page="20"></div>
useLocalStorageForBoxState

(boolean)

Specifies if you wish to use the local storage to save the box state. This means that the query state is only loaded on page load. Default value is true.

<div data-use-local-storage-for-box-state="true"></div>
withAnalytics

(boolean)

Specifies if the box should automatically include an analytics component. If you already have one on the page, then it is not added twice. However, setting it to false removes it from the page on initialization.

Default value is true.

<div data-with-analytics="true"></div>

Properties

Property

(type)

Description
disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

responsiveComponents

(ResponsiveComponents)

Allows to get and set the different breakpoints for mobile and tablet devices. This is useful, amongst other, for Facet, Tab and ResultList

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Creates a new SearchInterface. Initialize various singletons for the interface (e.g., usage analytics, query controller, state model, etc.). Binds events related to the query.

Coveo.ModalBUTTON

The button to use when creating a ModalBox

Coveo.ModalModalBox

Content of a ModalBox

Coveo.ModalModalbuttons

(HTMLElement)

The availables buttons (Ok, Apply, Cancel, etc.)

Coveo.ModalModalclose

The function that can be called to close the modal box. Note that this is also called by validation button such as APPLY, YES, etc.
Force close will close all open modalbox and skip the validation (if one was provided)

Coveo.ModalModalcontent

(HTMLElement)

The content itself

Coveo.ModalModalmodalBox

(HTMLElement)

The modalBox container itself

Coveo.ModalModaloverlay

(HTMLElement)

The overlay added on the body, which can be clicked to close the modalbox

Coveo.ModalModalwrapper

(HTMLElement)

The wrapper of the content

Coveo.ModalOptions

Possible options when creating a ModalBox

Coveo.ModalOptions.body

(HTMLElement)

Specify the content that you wish to put inside the modal box

Coveo.ModalOptions.buttons

(number)

The button you wish to create (Using BUTTON enum

Coveo.ModalOptions.className

(string)

Specify that you wish to add a prefix to the class name of the modal box container, to not clash with existing css in the page

Coveo.ModalOptions.fullscreen

(boolean)

Specify if you wish to open the modal box full screen. Default is false. If false, the modal box will fit the size of the content.

Coveo.ModalOptions.overlayClose

(boolean)

Specify if you wish to close the modal box when the overlay (black background) is clicked. Default is false.

Coveo.ModalOptions.title

(string)

Specify the title of the modal box

Coveo.ModalOptions.titleClose

(boolean)

Specify that you wish the modal box to close when the user click on the title. Default is false.

Coveo.ModalOptions.validation

Specify a validation function, which receives the button that was pressed.
If the validation function return true, the modal box closes, otherwise it stays open

BoxBody Component

Component HTML element class: CoveoBoxBody

The BoxBody component takes care of appending a ResultList Component and ensuring the correct CSS styles are applied so that infinite scrolling works properly. By default, the ResultList component is initialized with the following option:

enableInfiniteScroll: true;

When you wish to modify other options on the ResultList component, when initializing the framework, add the following code.

Remember to change #MyBox with the id of your CoveoBoxBody component, and 20 with the page size you wish to modify.

$('#MyBox').coveo('initBox', {
    BoxBody : {
        infiniteScrollPageSize : 20
    }
})

Use this component on your page this way:

<div class='CoveoBoxBody'></div>

Options

Option

(type)

Description
autoSelectFieldsToInclude

(boolean)

Specifies whether the ResultList should scan its result templates to discover which fields it must request to be able to render all results. Setting this option to true ensures that the Coveo Search API does not return fields that are unnecessary for the UI to function.

Default value is false, which means that for each result, the Coveo Search API returns all available fields (unless you specify a list of values in the fieldsToInclude option, in which case the Coveo Search API only returns those fields, if they are available).

Many interfaces created with the JavaScript Search Interface Editor explicitly set this option to true.

<div class="CoveoBoxBody" data-auto-select-fields-to-include="true"></div>
enableInfiniteScroll

(boolean)

Specifies whether the component should automatically load more results when the user has reached the bottom of the result list. Default value is true.

<div class="CoveoBoxBody" data-enable-infinite-scroll="true"></div>
enableInfiniteScrollWaitingAnimation

(boolean)

When the enableInfiniteScroll option is true, specifies whether to display the waitingAnimation while fetching additional results. Default value is true.

<div class="CoveoBoxBody" data-enable-infinite-scroll-waiting-animation="true"></div>
fieldsToInclude

Specifies a list of fields to include in the query results. If you set the autoSelectFieldsToInclude option to true, the Coveo Search API returns the fields you specify for this option (if those fields are available) in addition to the fields which the ResultList automatically requests.

Otherwise, the Coveo Search API only returns the fields you specify for this option (if those fields are available), unless you leave this option undefined, in which case the Coveo Search API returns all available fields.

<div class="CoveoBoxBody" data-fields-to-include="@myFirstField,@mySecondField,@myNthField"></div>
infiniteScrollContainer

When the enableInfiniteScroll option is true, specifies the element that triggers fetching additional results when the end user scrolls down to its bottom. You can change the container by specifying its selector (e.g., data-infinite-scroll-container-selector='#someCssSelector').

By default, the framework uses the first vertically scrollable parent element it finds, starting from the ResultList element itself. A vertically scrollable element is an element whose CSS overflow-y attribute is scroll.

This implies that if the framework cannot find a scrollable parent, it uses the window itself as a scrollable container.

This heuristic is not perfect, for technical reasons. There are always some corner case CSS combination which the framework will not be able to correctly detect as 'scrollable'.

It is highly recommended that you manually set this option if you wish something else than the window to be the scrollable element.

<div class="CoveoBoxBody" data-infinite-scroll-container="myElement"></div>
infiniteScrollPageSize

(number)

If the enableInfiniteScroll option is true, specifies the number of additional results to fetch when the user scrolls down to the bottom of the infiniteScrollContainer. Default value is 10. Minimum value is 1.

<div class="CoveoBoxBody" data-infinite-scroll-page-size="10"></div>
resultContainer

(HTMLElement)

Specifies the element inside which to insert the rendered result templates. Performing a new query clears the content of this element.

You can change the container by specifying its selector (e.g., data-result-container-selector='#someCssSelector').

If you do not specify a value for this option, a div element will be dynamically created and appended to the result list. This element will then be used as a result container.

<div class="CoveoBoxBody" data-result-container="myElement"></div>
waitAnimation

(string)

Specifies the type of animation to display while waiting for a query to return. The possible values are:

  • fade: Fades out the current list of results while the query is executing.
  • spinner: Shows a spinning animation while the query is executing.
  • none: Use no animation during queries.

See also the waitAnimationContainer option.

Default value is none.

<div class="CoveoBoxBody" data-wait-animation="none"></div>
waitAnimationContainer

(HTMLElement)

Specifies the element inside which to display the waitAnimation. You can change this by specifying a CSS selector (e.g., data-wait-animation-container-selector='#someCssSelector').

Default value is the value of the resultContainer option.

<div class="CoveoBoxBody" data-wait-animation-container="myElement"></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxCreateArticle Component

Component HTML element class: CoveoBoxCreateArticle

The BoxCreateArticle component allows the use of the Create Article button in the Coveo Insight Panel (see Adding a Create Article Button to the Insight Panel). Use this component inside the coveo-box-settings div.

<div class="coveo-box-settings">
    <a class="CoveoBoxCreateArticle" target="_blank">
    </a>
    ...
</div>

Options

Option

(type)

Description
articleTypeFilter

Specifies the Knowledge Article types to offer as options when creating an article. By default, all the available Knowledge Article types are displayed.

<a class="CoveoBoxCreateArticle" data-article-type-filter="knowledge__kav,troubleshooting__kav"></a>
hidden

(boolean)

Specifies if the component should be hidden from the display. Default value is true.

<a class="CoveoBoxCreateArticle" data-hidden="true"></a>
openInPrimaryTab

(boolean)

Whether to open the created article in a primary tab or, when set to false, to open it in a sub tab. Default value is true.

<a class="CoveoBoxCreateArticle" data-open-in-primary-tab="false"></a>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxCurrentSort Component

Component HTML element class: CoveoBoxCurrentSort

The BoxCurrentSort component is only meant as a utility to set the title on its BoxPopup Component container. Whenever the current sort changes, for instance when a user clicks on a new Sort Component, this component takes care of setting a new title on the BoxPopup Component. This component must be included inside a BoxPopup component.

<div class='CoveoBoxPopup'>
    <div class='CoveoBoxCurrentSort'></div>
    <div class="coveo-sort-section">
        [[sorts]]
    </div>
</div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxCurrentTab Component

Component HTML element class: CoveoBoxCurrentTab

The BoxCurrentTab component is only meant as a utility to set the title on its BoxPopup Component container. Whenever the current tab changes, for instance when a user clicks on a new Tab Component, this component takes care of setting a new title on the BoxPopup Component. This component must be included inside a BoxPopup component.

<div class='CoveoBoxPopup'>
    <div class='CoveoBoxCurrentTab'></div>
    <div class="coveo-tab-section">
        [[sorts]]
    </div>
</div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Component HTML element class: CoveoBoxEditLink

The BoxEditLink component provides a clickable button that expands the current interface to another page that contains the Interface Editor.

<a class='CoveoBoxEditLink'></a>
Option

(type)

Description

(string)

Specifies the icon that the component should use. Default value is coveo-sprites-box-settings.

<a data-icon='coveo-sprites-box-settings'></a>

(string)

Specifies the text to display alongside the icon. Default value is the localized string for GoToEdition.

<a data-text='My text'></a>

(string)

Specifies the URI of the page that hosts the Interface Editor. This option is normally already set for you when you include the Box Visualforce Component.

<a data-uri='/apex/InterfaceEditor'></a>
Property

(type)

Description

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

(Logger)

Allows component to log in the dev console.

(QueryController)

Contains the singleton that allows to trigger queries.

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

(SearchInterface)

A reference to the root of every component, the SearchInterface.

(IAnalyticsClient)

A reference to the Analytics.client.

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Component HTML element class: CoveoBoxExpandLink

The BoxExpandLink component takes care of creating a clickable link that expands to a full search interface page. It also takes care of sending the current state of the Box component to the full search interface so that you get the same (or a similar) result set when the full search page loads.

<a class="CoveoBoxExpandLink" target="_blank"></a>
Option

(type)

Description

(string)

Specifies the description to display when the full search page loads with a context filter. Default value is the localized string for Context.

<div data-hd='Context'></div>

(string)

Specifies the CSS class of the icon to display on the expand button. Default value is coveo-icon coveo-sprites-box-icon_external.

<div data-icon='custom-icon'></div>

(string)

Specifies the id of the Tab component to load in the full search page when the user expands the box. Default value is undefined, and the component uses the current Tab component as its targetTab when the user expands the box to a full search page.

<div data-target-tab='SomeTabId'></div>

(string)

Specifies the text content to add inside the icon HTML element. Default value is the localized string for GoToFullSearch.

<div data-text='Go To Full Search'></div>

(string)

Specifies the title to display in the tab or sub tab that opens inside the Salesforce console when the user clicks the component to expand the Box. Default value is the localized string for Coveo Search.

<div data-title='Search Page'></div>

(boolean)

Specifies whether to open the full search page as a primary or as a sub tab inside the Salesforce console. Default value is true.

Setting this option to false makes the full search page open as a sub tab inside the Salesforce console.

<div data-to-primary-tab='false'></div>

(string)

Specifies the URI of the full search page to load when the user expands the Box. Most of the time, you do not have to specify a value manually for this option. The Box Visualforce Component already takes care of setting this option correctly.

<div data-uri='https://mysalesforce.na15.visual.force.com/apex/CoveoSearch'></div>
Property

(type)

Description

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

(Logger)

Allows component to log in the dev console.

(QueryController)

Contains the singleton that allows to trigger queries.

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

(SearchInterface)

A reference to the root of every component, the SearchInterface.

(IAnalyticsClient)

A reference to the Analytics.client.

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxHeader Component

Component HTML element class: CoveoBoxHeader

The BoxHeader component takes care of instantiating a Searchbox component with preconfigured options and a placeholder (see Coveo Searchbox Component). Optionally, this component can also display a Remove context checkbox. You should normally place this component at the top of your box.

<div class='CoveoBoxHeader'></div>

Options

Option

(type)

Description
allowNonContextualSearch

(boolean)

When includeSearchbox is true, specifies whether to display a Remove context checkbox when the end user starts typing in the search box. When checked, this checkbox removes the part of the query expression that was added by the query components.

When a user opens a case about a Power Generator, items related to the Power Generator are shown. When the user starts typing the search box while allowNonContextualSearch is true, a checkbox will appear to allow them to disable the query and show items outside of the Power Generator scope.

Default is false.

<div data-allow-non-contextual-search='true'></div>
enableSearchAsYouType

(boolean)

When the includeSearchbox option is enabled, activates the search-as-you-type feature for the search box. Default value is true.

<div data-enable-search-as-you-type="true"></div>
includeSearchbox

(boolean)

Specifies whether to initialize a Searchbox component. Default value is true.

When this option is set to true, the component initializes a Searchbox component with the enableSearchAsYouType and searchAsYouTypeDelay options.

<div data-include-search-box='true'></div>
includeSettings

(boolean)

Whether to include the settings icon, which is usually to the right of the search box. Default value is false.

<div data-include-settings="false"></div>
placeholder

(string)

When includeSearchbox is true, specifies the placeholder to set in the Searchbox. Default value is the localized string for Search.

<div data-placeholder='Enter your query here'></div>
searchAsYouTypeDelay

(number)

When the includeSearchbox and enableSearchAsYouType options are enabled, specifies the amount of time, in miliseconds, before refreshing the query based on what the user has typed. Minimum value is 0.

Default value is 300.

<div data-search-as-you-type-delay="300"></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxPopup Component

Component HTML element class: CoveoBoxPopup

The BoxPopup component is only a container inside of which you can drop any other content or component. Since the Box component is designed to be included in the Salesforce console sidebar with a limited amount of space, it might be useful to add section that can be hidden or shown when the user clicks on them.

The HTML content inside the BoxPopup div is used to determine what is shown or hidden when the panel is opened and closed.

<div class='CoveoBoxPopup'>
  <div class='coveo-facet-column'>
    <div class='CoveoFacet' data-field='@myfirstfacet'></div>
    <div class='CoveoFacet' data-field='@mysecondfacet'></div>
    <div class='CoveoFacet' data-field='@mythirdfacet'></div>
  </div>
</div>

Options

Option

(type)

Description
fullHeight

(boolean)

Specifies if the popup should open with the fully available height of the page. Default value is false.

<div data-full-height='false'></div>
fullWidth

(boolean)

Specifies if the popup should open with the fully available width of the page. Default value is false.

<div data-full-width='false'></div>
hidden

(boolean)

Specifies whether the component should be hidden. Defaut value is false.

<div data-hidden='false'></div>
icon

(string)

Specifies the CSS class used for your icon.

<div data-icon='custom-icon-class'></div>
title

(string)

Specifies the static title to display. Default value is Click here to open.

Since this component exposes methods to set its title, it is possible that other components contained inside this container dynamically set it.

<div data-title='Click here to open'></div>
withAnimation

(boolean)

Specifies if the popup should open with an animation. The animation is completely CSS based. To modify the animation itself, modify the CSS rules that apply to the relevant elements.

Default value is true.

<div data-with-animation='true'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxQuerySome Component

Component HTML element class: CoveoBoxQuerySome

The BoxQuerySome component is used to automatically include Salesforce fields to the query of an Insight Panel. By default, the fields are included in the advanced query (see Advanced Expression). This component is included in the default Insight Panel to include the case subject.

<div class="CoveoBoxQuerySome"></div>

Options

Option

(type)

Description
include

(string)

A comma separated list of fields to automatically add to the query. Default value is Subject.

<div data-include='Subject'></div>
includeCurrentRecords

(boolean)

Specifies whether to include the currently viewed case in the search results. Default value is false.

<div data-include-in-current-record='false'></div>
disableOnNonContextualSearch

(boolean)

Specifies whether to disable the added query from the `include` option when a user decides to perform a non-contextual search. Default value is true.

<div data-disable-on-non-contextual-search='true'></div>
useSomeQRE

(boolean)

Specifies whether to generate the query using the `$some` query extension (see [Standard Query Extensions - $some](https://developers.coveo.com/x/ZQMv#StandardQueryExtensions-$some)). Setting this option to `false` changes the query from an `aq` to a long query (see [Long Expression](https://developers.coveo.com/x/P4CpAQ#ProfilingaQuery-LongExpression)), enabling Coveo Machine Learning Intelligent Term Detection (ITD). Default value is true.

<div data-use-some-q-r-e='true'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxQuerySummary Component

Component HTML element class: CoveoBoxQuerySummary

The BoxQuerySummary component inherits from the QuerySummary component (see Coveo QuerySummary Component). Its only added functionality is to display the range of currently displayed results when the result list is using infinite scrolling.

<div class='CoveoBoxQuerySummary'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxResultAction Component

Component HTML element class: CoveoBoxResultAction

The BoxResultAction component displays a small actionable button inside each result. When clicked, this button displays other sub components in a menu, such as the BoxQuickview Component.

For more information on how to implement your own custom actions inside this component, see Creating Custom Actions for an Insight Panel or a Custom Box.

This component is intended to be included inside a BoxBody ResultList Component.

<div class='CoveoBoxResultAction'>
  <!-- Include other components here, such as the BoxQuickView or BoxAttachToCase components -->
</div>

Options

Option

(type)

Description
displayInline

(boolean)

Specifies that components contained inside the ResultAction component should instead be displayed inline, and not inside a clickable menu. Setting this option to true also displays icons to identify the actions.

Default value is false.

<div class='CoveoBoxResultAction' data-display-inline='false'></div>
menuDelay

(number)

Specifies the delay, in milliseconds, before the menu disappears when the user's mouse leaves the menu icon. Minimum value is 0.

Default value is 300.

<div class='CoveoBoxResultAction' data-menu-delay='300'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Cancel Component

Component HTML element class: CoveoCancel

The Cancel component adds a button to cancel the case creation.

<div class='CoveoCancel'></div>

Options

Option

(type)

Description
redirectUrl

(string)

Specifies where to redirect the user once the case has been canceled. This option is empty by default.

<div data-redirect-url='http://www.coveo.com'></div>
title

(string)

Specifies the text to display on the button. The default value is Cancel.

<div data-title='Cancel'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

CaseCreation Component

Component HTML element class: CoveoCaseCreation

The CaseCreation component creates a form that allows Salesforce users to submit a case. The form automatically searches for solutions while the user is filling form parameters. To work, this component needs to interact with other components that contain the necessary information to create the case.

Warning:

A CaseCreation component must be present on the page for the form to work.

<div class='CoveoCaseCreation'></div>

Options

Option

(type)

Description
openLinkInNewWindow

(boolean)

Specifies whether to open the link that the component creates in a new window. Default value is true.

<div data-open-link-in-new-window='true'></div>
searchDelay

(number)

Specifies the delay (in milliseconds) before triggering a new query when the end user types new text inside a Field component. Default value is 500.

Minimum value is 0.

<div data-search-delay='500'></div>
searchSort

(string)

Specifies how to sort the results. Default value is relevancy.

For more information on the way sorting works, see Standard Query Extensions - $sort. The fielddescending and fieldascending sorts are unavailable for this component.

<div data-search-sort='relevancy'></div>
searchType

(string)

Specifies to return only a certain type of results (see Standard Query Extensions - $type). Default value is the empty string.

<div data-search-type='Account'></div>
sendCaseDataToAnalytic

(boolean)

Specifies whether the component should send case-related metadata when logging case creation events in the Coveo Usage Analytics service. Default value is true.

<div data-send-case-data-to-analytic='true'></div>
someBest

(string)

Specifies an absolute or relative (percentage) value indicating the number of best keywords that the query must match (see Standard Query Extensions - $some). Keywords that occur less frequently in the index are considered better than those that are very common.

Specifying a value for this option is only useful if the useSomeQRE option is true.

Default value is an empty string.

<div data-use-some-q-r-e='true' data-some-best='50%'></div>
<div data-use-some-q-r-e='true' data-some-best='2'></div>
someMatch

(string)

Specifies an absolute or relative (percentage) value indicating the minimum number of keywords that the query must match (see Standard Query Extensions - $some). Specifying a value for this options is only useful if the useSomeQRE option is true.

Default value is the string 1.

<div data-use-some-q-r-e='true' data-some-match='50%'></div>


<div data-use-some-q-r-e='true' data-some-match='5'></div>
someMaximum

(number)

Specifies the maximum number of keywords to use (see Standard Query Extensions - $some). If the query contains a larger number of keywords, remaining keywords are simply ignored.

Specifying a value for this options is only useful if the useSomeQRE option is true.

Default vlaue is 300.

Minimum value is 0.

<div data-use-some-q-r-e='true' data-some-maximum='100'></div>
useDefaultRule

(boolean)

Specifies whether to use the Assignment Rules (see Set Up Assignment Rules). Default value is true.

<div data-use-default-rule='true'></div>
useSomeQRE

(boolean)

Specifies whether to generate the query using the $some query extension instead of CoveoÔäó Machine Learning (see Standard Query Extensions - $some). Setting this option to true effectively disables Coveo Machine Learning for this component. Default value is false.

<div data-use-some-q-r-e='true'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

ChatterThumbnail Component

Component HTML element class: CoveoChatterThumbnail

The ChatterThumbnail component is used in result templates to display the Chatter avatar of users. It is included by default in the User result template.

<span class="CoveoChatterThumbnail"></span>

Options

Option

(type)

Description
height

(string)

Specifies the height of the thumbnail. Default value is 45px.

<span height='45px'></span>
width

(string)

Specifies the width of the thumbnail. Defaut value is 45px.

<span width='45px'></span>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

CommunityStateManager Component

Component HTML element class: CoveoCommunityStateManager

The CommunityStateManager component is used to connect your Lightning search component to the Coveo Standalone Searchbox (see Including the Standalone Searchbox in Your Community). This component is used in a Lightning search page, in the coveo-search-section, as such:

<div class="coveo-search-section">
  <div class="CoveoCommunityStateManager"></div>
</div>

Options

Option

(type)

Description
enableLowercaseOperators

(boolean)

Performs the same function as the Querybox option of the same name (see Querybox - enableLowercaseOperators).

<div data-enable-lowercase-operators="false"></div>
enablePartialMatch

(boolean)

Performs the same function as the Querybox option of the same name (see Querybox - enablePartialMatch).

<div data-enable-partial-match="false"></div>
enableQuerySyntax

(boolean)

Performs the same function as the Querybox option of the same name (see Querybox - enableQuerySyntax).

<div data-enable-query-syntax="true"></div>
enableQuestionMarks

(boolean)

Performs the same function as the Querybox option of the same name (see Querybox - enableQuestionMarks).

<div data-enable-question-marks="false"></div>
enableWildcards

(boolean)

Performs the same function as the Querybox option of the same name (see Querybox - enableWildcards).

<div data-enable-wildcards="false"></div>
partialMatchKeywords

(number)

Performs the same function as the Querybox option of the same name (see Querybox - partialMatchThreshold). This feature is only available to Coveo for Salesforce Pro and Enterprise users.

<div data-partial-match-keywords="5"></div>
partialMatchThreshold

(string)

Performs the same function as the Querybox option of the same name (see Querybox - partialMatchThreshold).

<div data-partial-match-threshold="50%"></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Input Component

Component HTML element class: CoveoInput

The input component is used by the Field and the Picklist components.

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Coveo.Textconstructor

Creates a new TextInput.

ResultActionsMenu Component

Component HTML element class: CoveoResultActionsMenu

The ResultActionsMenu component adds a floating result action menu, meant to be used inside result templates (see Result Templates). It is designed to contain other components that can execute actions related to the result, typically the Quickview and AttachToCase components.

<script type="text/html" class="result-template" [...]
  <div class="coveo-result-frame">
    <div class="CoveoResultActionsMenu">
      <div class="CoveoAttachToCase" data-display-text="false"></div>
      <div class="CoveoQuickview"></div>
    </div>
  [...]
</script>

Options

Option

(type)

Description
openOnMouseOver

(boolean)

Specifies whether the menu should open when the user hovers over the result. When set to false, the menu opens only when clicking on the result.

Default value is true.

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

menuItems

A list containing menu items for this menu.

parentResult

(HTMLElement)

The rendered result that contains this menu.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Coveo.bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

Coveo.componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

Coveo.componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

Coveo.disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

Coveo.logger

(Logger)

Allows component to log in the dev console.

Coveo.menuItems

A list containing menu items for this menu.

Coveo.parentResult

(HTMLElement)

The rendered result that contains this menu.

Coveo.queryController

(QueryController)

Contains the singleton that allows to trigger queries.

Coveo.queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

Coveo.root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

Coveo.searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

Coveo.usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

Coveo.ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Coveo.constructor

Creates a new ResultActionsMenu component.

ResultActionsPostToFeed Component

Component HTML element class: CoveoResultActionsPostToFeed

The ResultActionsPostToFeed component is a Result Template component designed to work with the ResultActionsMenu Result Template component. Its main purpose is to insert the current result in a Salesforce Chatter "Post".

<div class="CoveoResultActionsMenu">
 <div class="CoveoResultActionsPostToFeed"></div>
</div>

Options

Option

(type)

Description
autoSubmit

(boolean)

Specifies if the component should submit the post right away. Default value is false.

<div data-auto-submit='true'/>
body

(string)

Specifies the template that will be inserted in the "body" of the post. Default value is <b>${title}</b> (${ClickUri})<br /><p><i>"${Excerpt}"</i></p>.

<div data-body='<b>${title}</b> (${ClickUri})<br /><p><i>"${Excerpt}"</i></p>'/>
insertType

(string)

Specifies how the component should insert the text in the post. Possible values are begin, end, cursor and replace. Default value is replace.

<div data-insert-type='cursor'/>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

ResultActionsSendEmail Component

Component HTML element class: CoveoResultActionsSendEmail

The ResultActionsSendEmail component is a Result Template component designed to work with the ResultActionsMenu Result Template component. Its main purpose is to insert the current result in a Salesforce "Email".

<div class="CoveoResultActionsMenu">
 <div class="ResultActionsSendEmail"></div>
</div>

Options

Option

(type)

Description
htmlBody

(string)

Specifies the template that will be inserted in the "htmlBody" of the Email. Default value is <a href="${ClickUri}">${title}</a>..

<div data-html-body='<a href="${ClickUri}">${title}</a>.'/>
insertType

(string)

Specifies how the component should insert the text in the email. Possible values are begin, end, cursor and replace. Default value is replace.

<div data-insert-type='cursor'/>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

ResultActionsSendLiveAgent Component

Component HTML element class: CoveoResultActionsSendLiveAgent

The ResultActionsSendLiveAgent component is a Result Template component designed to work with the ResultActionsMenu Result Template component. Its main purpose is to insert the current result in a Salesforce Live Agent chat window.

<div class="CoveoResultActionsMenu">
 <div class="CoveoResultActionsSendLiveAgent"></div>
</div>

Options

Option

(type)

Description
text

(string)

Specifies the template that will be inserted in the "text" of the message. Default value is ${title} ${ClickUri}.

<div data-text='${title} ${ClickUri}'/>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

SalesforceQuickview Component

Component HTML element class: CoveoSalesforceQuickview

The SalesforceQuickview component inherits from the Quickview component, and thus provides all the same options(see Coveo Component Quickview). It is made to support LockerService (see What is LockerService?).

<div class='CoveoSalesforceQuickView'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

SalesforceThumbnail Component

Component HTML element class: CoveoSalesforceThumbnail

The SalesforceThumbnail component is used in result templates to display a thumbnail preview for Salesforce content documents. It is included by default in the Document result template.

Objects without attachments may fail to render a preview. You should only use it for Salesforce Content documents.

<span class="CoveoSalesforceThumbnail"></span>

Options

Option

(type)

Description
height

(string)

Specifies the height of the thumbnail. Default is auto, meaning that it scales with the given width.

<span data-height='auto'></span>
width

(string)

Specifies the width of the thumbnail. Default value is 120px.

<span data-width='120px'></span>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Submit Component

Component HTML element class: CoveoSubmit

The Submit component adds a button to submit a case.

<div class="CoveoSubmit"></div>

Options

Option

(type)

Description
redirectUrl

(string)

Specifies where to redirect the user once the case has been submitted. By default, this option redirects to the newly created case page.

<div data-redirect-url='http://www.coveo.com'></div>
title

(string)

Specifies the text to display on the button. Default value is Submit.

<div data-title="Submit"></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

UserActions Component

Component HTML element class: CoveoUserActions

The UserActions component allows your agents to see the actions performed by the end-user before or after the creation of a case within the Salesforce console. The component takes the information from the Coveo Usage Analytics events performed during the visit in which the case was created, as seen from the Visit Browser page of the Coveo Cloud Administration Console (see Reviewing User Visits With the Visit Browser).

You can configure which events the component displays.

The component typically appears in a tab of the Insight Panel, but can also be included as a standalone component in a Visualforce page (see Implementing the UserActions Component).

In an Insight Panel, the component would look like this:

<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>

To add the UserActions component as a standalone component, you need to add the UserActions Visualforce Component in your Visualforce page (see UserActions Visualforce Component).

You also need to create a custom handler to open/close the component, or you can simply use the showButton property.

<div class="CoveoUserActions" data-bind-on-box="false" data-show-button="true"></div>

Options

Option

(type)

Description
enableBindOnBox

(boolean)

Specifies if the component should listen to the onPopupOpen event fired by the closest BoxPopup component to open itself. Default value is true.

<div class="CoveoUserActions" data-enable-bind-on-box="false"></div>
filters

Specifies which events the UserActions component should display. You typically want to include only events that are manually performed by the end-users, including appropriate custom events, and omitting the ones that are generated automatically by the components.

These typically are the Click, Search, and Custom dimension causes (see Usage Analytics Dimensions).

showButton

(boolean)

Specifies if the component should render a button to open/close itself. Default value is false.

<div class="CoveoUserActions" data-show-button="true"></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxAttachToCase Component

Component HTML element class: CoveoBoxAttachToCase

The BoxAttachToCase component allows you to attach a result to the current Salesforce object. This component normally renders itself inside the BoxResultAction Component.

Your Salesforce users must have Attached Result object permissions to be able to use this component (see Granting Access to Attach to Case Users).

Options

Option

(type)

Description
displayText

(boolean)

Specifies if the component should include the Attach/Detach text. Default value is false.

<div data-display-text='true'/>
displayTooltip

(boolean)

Specifies if the component should include the Attach/Detach tooltip. Default value is false.

<div data-display-tooltip='true'/>
readonly

(boolean)

Specifies if the component should be in read only mode. When in read only mode, you cannot Attach or Detach results. The default value is false.

<div data-readonly='true'/>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

BoxFieldTable Component

Component HTML element class: CoveoBoxFieldTable

The BoxFieldTable component is meant to be included inside a ResultList Component.

<div class='CoveoBoxFieldTable'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Creates a new FieldTable.

BoxQuickview Component

Component HTML element class: CoveoBoxQuickview

The BoxQuickview component inherits from the Quickview component, and thus provides all the same options(see Coveo Component Quickview).

<div class='CoveoBoxQuickView'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Creates a new Quickview component.

CaseDeflection Component

Component HTML element class: CoveoCaseDeflection

The CaseDeflection component is used to allow administrators to increase case deflection by recommending items to your users as they enter a case. To learn how to implement it, see CaseDeflection Lightning Component

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Field Component

Component HTML element class: CoveoField

The Field component adds a text input to a case creation form, where a user can enter text.

<div class="CoveoField"></div>

Options

Option

(type)

Description
caseField

(string)

Specifies the field used to save the input value when the user submits the form.

<div data-case-field='Subject'></div>
enableAnalytic

(boolean)

Specifies whether to enable analytics on the component. Default value is true.

<div data-enable-analytic='true'></div>
enableSearch

(boolean)

Specifies whether to include the entered keywords in the search for related cases. The default value is true.

Note:`

If addQre, addSome, and addCorrelateUsingIdf are all set to false, useSomeOnAllKeywords on the CaseCreation component needs to be enabled for this option to be useful.

<div data-enable-search='true'></div>
isRequired

(boolean)

Specifies whether the input has to be filled before the form can be submitted. Default value is true.

<div data-is-required='true'></div>
numberOfLines

(number)

Specifies the input height in number of lines. Default value is 1.

<div data-number-of-lines='1'></div>
title

(string)

Specifies the title to display above the input.

<div data-title='Your Title'></div>
tooltip

(string)

Specifies a short hint displayed inside the input before the user enters a value.

<div data-placeholder='Enter a subject...'></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Picklist Component

Component HTML element class: CoveoPicklist

This component adds a drop down list to a case creation form.

<div class="CoveoPicklist"></div>

Options

Option

(type)

Description
addQre

(boolean)

Specifies whether to add a QRE in the query using the searchField and the selected option as expression. Default value is true.

This option is useful only when enableSearch is set to true.

<div data-add-Qre='true'></div>

The generated expression looks like this, where:

  • searchField is the searchField option.
  • selectedOption is the option the user selected.
  • queryModifier is the queryModifier option.
$qre(expression: searchField=selectedOption, modifier: queryModifier)

For more information on the $qre expression, see Standard Query Extensions - $qre.

caseField

(string)

Specifies the field used to save the drop down list value when the user submits the form.

<div data-case-field='Priority'></div>
defaultValue

(string)

Specifies the default selected value in the drop down list.

<div data-default-value="Low"></div>
enableAnalytic

(boolean)

Specifies whether to enable analytics on the component. Default value is true.

<div data-enable-analytic='true'></div>
enableSearch

(boolean)

Specifies whether to include the selected option keywords in the search for related cases. The default value is false.

If addQre, addSome, and addCorrelateUsingIdf are all set to false, useSomeOnAllKeywords on the CaseCreation component needs to be enabled for this option to be useful.

<div data-enable-search='true'></div>
isRequired

(boolean)

Specifies whether an option has to be selected before the form can be submitted. Default value is false.

<div data-is-required='false'></div>
queryModifier

(number)

Specifies how to affect the ranking score for items where the searchField is equal to the selected option (see Standard Query Extensions - $qre). Default value is 50.

This option is used with searchField to boost item by adding a query ranking expression (QRE) where the searchField is equal to the selected option.

This option is useful only when the addQre option is enabled.

<div data-query-modifier='50'></div>
searchField

(IFieldOption)

Specifies the field to use in the QRE added to the search query. This option is useful only when the addQre option is enabled.

<div data-search-field="@sfcasepriority"></div>
title

(string)

Specifies the title to display above the drop down list.

<div data-title='Your Title'></div>
tooltip

(string)

Specifies what to display when the user's mouse is over the title.

<div data-tooltip='The priority'></div>
values

Specifies the values to display in the drop down list. If this option is left empty, the values are automatically obtained using the caseField option.

<div data-values="Low, Medium, High"></div>

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Create a new Component. Resolve all IComponentBindings if not provided.
Create a new Logger for this component. Attach the component to the SearchInterface.

Component HTML element class: CoveoSalesforceResultLink

The SalesforceResultLink component is used to open result links as Salesforce tabs. It inherits from the ResultLink Component.

<a class='CoveoSalesforceResultLink'></a>
Option

(type)

Description

(boolean)

Specifies that the result link should try to open as a primary console tab. If it fails, it instead opens in a new browser tab. Default is true.

<a class='CoveoSalesforceResultLink' data-open-in-primary-tab='true'/>

(boolean)

Specifies that the result link should try to open as a secondary console tab. If it fails, it instead opens in a new browser tab. Default is false.

<a class='CoveoSalesforceResultLink' data-open-in-sub-tab='true'/>
Property

(type)

Description

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

(Logger)

Allows component to log in the dev console.

(QueryController)

Contains the singleton that allows to trigger queries.

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

(SearchInterface)

A reference to the root of every component, the SearchInterface.

(IAnalyticsClient)

A reference to the Analytics.client.

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Creates a new ResultLink component.

StandaloneSearchbox Component

Component HTML element class: CoveoStandaloneSearchbox

The StandaloneSearchbox component is used to replace the default community searchbox. Its options are fronted in the Community Builder (see Customizing the Standalone Searchbox).

To learn how to implement this component in your community, see Including the Standalone Searchbox in Your Community.

Options

Option

(type)

Description
enableFieldAddon

(boolean)

Specifies whether or not field names should be suggested (see Omnibox - enableFieldAddon).

enableQueryExtensionAddon

(boolean)

Specifies whether or not to complete query extensions (see Omnibox - enableQueryExtensionAddon).

enableQuerySuggestAddon

(boolean)

Specifies whether or not to enable Coveo Machine Learning (see Omnibox - enableRevealQuerySuggestAddon).

placeholder

(string)

Specifies the placeholder text to put in the searchbox when no query is typed.

searchPageName

(string)

The name of the search page where the searchbox should redirect. Default value may change depending on your Coveo for Salesforce version. For more information, see Including the Standalone Searchbox in Your Community.

triggerQueryOnClear

(boolean)

Specifies whether or not to trigger a query when the search box is cleared (see Querybox - triggerQueryOnClear).

Properties

Property

(type)

Description
bind

(ComponentEvents)

Allows the component to bind events and execute them only when it is enabled.

componentOptionsModel

(ComponentOptionsModel)

Contains the state of options for differents component. Mainly used by ResultLink.

componentStateModel

(ComponentStateModel)

Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.

disabled

(boolean)

A disabled component will not participate in the query, or listen to ComponentEvents.

logger

(Logger)

Allows component to log in the dev console.

queryController

(QueryController)

Contains the singleton that allows to trigger queries.

queryStateModel

(QueryStateModel)

Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.

root

(HTMLElement)

A reference to the root HTMLElement (the SearchInterface).

searchInterface

(SearchInterface)

A reference to the root of every component, the SearchInterface.

usageAnalytics

(IAnalyticsClient)

A reference to the Analytics.client.

ID

(string)

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

constructor

Creates a new Omnibox component. Also enables necessary addons and binds events on various query events.