Query extension samples
Query extension samples
This is for:
DeveloperIn this article
Here are some sample use cases for query extensions.
Service and support
The following samples would be used in a Coveo for Salesforce Insight Panel.
Next issue avoidance
-
Returns parent cases of related cases:
(NOT @syssfid=={!>id}) (NOT @syssfcaseid=={!>id}) {{relatedCases = @objecttype=="Case" $some(keywords: '{!>Subject}', match:1) @sfparentcasenumber $correlateResultSet(resultSet: @syssfid=={!Id}, field: '@sysconcepts', maximumValues: '25', modifier: '1000')}} $valuesToResultSet(values: $valuesOfField(field: '@sfparentcasenumber', resultSet: {{relatedCases}}), field: '@sfcasenumber')
Get the parent cases. Extract the parent cases from the related cases. -
Returns knowledge docs related to parent cases of related cases:
(NOT @syssfid=={!>id}) (NOT @syssfcaseid=={!>id}) {{relatedCases = @objecttype=="Case" $some(keywords: '{!>Subject}', match:1) @sfparentcasenumber $correlateResultSet(resultSet: @syssfid=={!Id}, field: '@sysconcepts', maximumValues: '25', modifier: '1000')}} {{parentCases = $valuesToResultSet(values: $valuesOfField(field: '@sfparentcasenumber', resultSet: {{relatedCases}}), field: '@sfcasenumber' )}} $some(keywords:$removeStopWords(keywords:$anyKeywords(keywords:$valuesOfField(field: '@title', resultSet: {{parentCases}}))))
Extract related cases. Extract parent cases of related cases. Find some relevant knowledge.