Query Extension Language

In a search box, end users typically enter simple queries made up of one or more keywords. Experienced users may also use double-quote delimited strings to perform phrase searches, use prefixes, operators, or fields to create more precise queries. Some more advanced users may even go as far as to use the Coveo Cloud query syntax (see Coveo Query Syntax Reference).

The Coveo query extension language pushes the power of queries further by allowing you, an administrator or a developer, to integrate contextual business information in queries to return highly relevant content to your users. You can use query extensions in components such as Coveo Insight Panels in Salesforce to automatically present personalized context related content in search interfaces so that your end users can discover business relationships without even having to type a query.

Coveo for Salesforce takes advantage of query extensions to define the content of Coveo Insight Panels. In the Salesforce Cases tab, when the user selects a case, the Coveo Insight Panel presents one or more boxes that are automatically filled with relevant information (see Coveo for Salesforce).

The Similar Cases box shown below lists cases that share subject and concept keywords with the currently selected case.

The following query, used to generate the content of the Insight Panel, is built using the Coveo query extension language.

@objecttype==case(NOT @sfid=="{!Id}")
$correlateResultSet(resultSet: @sfid=="{!Id}", field: "@sysconcepts", maximumValues: '25', modifier: '10000')
$correlateUsingIdf(keywords: "{!>Subject}")

You can use the Coveo for Salesforce user interface to create Coveo Insight Panels using predefined or custom query extensions (see Creating a Custom Classic Insight Panel).