Criteria-Based Search Results

Returns the results for search based on the searchable object configuration and search criteria configuration defined by the admin.

Resource 

1/connect/criteria-based-search/searchable-object/results

Example 

1https://yourInstance.salesforce.com/services/data/v68.0/connect/criteria-based-search/searchable-object/results

Available Version 

58.0

Requires Chatter 

No

HTTP Methods 

POST

Request Body for POST 

JSON Example 

1{
2  "searchCriteriaConfigurationName": "Config_Name",
3  "pageNumber": 1,
4  "pageSize": 50,
5  "freeTextFieldName": "Field Name",
6  "globalSearchTerm": "Keyword",
7  "offset": 0,
8  "fetchAllRecordIds": false,
9  "aggregationCriteriaFieldset": [
10    "ProviderType",
11    "FacilityName"
12  ],
13  "sortingCriteriaFieldset": [
14    {
15      "isSortAscending": false,
16      "sortFieldName": "FacilityName"
17    }
18  ],
19  "searchCriteria": [
20    {
21      "searchCriteriaFieldName": "ProviderType",
22      "searchCriteriaFieldOperator": "like",
23      "searchFieldCriteriaValueList": [
24        "Medical Doctor"
25      ],
26      "searchCriteriaFieldType": "text"
27    }
28  ]
29}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
aggregationCriteriaFieldsetString[]Fields that you select in the search criteria configuration as the basis for querying data.Optional58.0
freeTextFieldNameStringName of the search criteria field used by the user for the search.Optional58.0
fetchAllRecordIdsBooleanWhen set to true, returns up to 2,000 matching record IDs in a single response. When enabled:
  • searchResultFields returns an empty array
  • searchResultRecords contains only record IDs (one per row.)
  • pageNumber, pageSize, offset, summary, and mapData are omitted.
When set to false or omitted, standard pagination applies.
Optional67.0
globalSearchTermStringThe keyword that you use to perform a comprehensive search across all text-indexed columns of the specified object.Optional61.0
latitudeDoubleUser’s latitude that’s used to find search results within a certain distance from the user’s location.Optional58.0
longitudeDoubleUser’s longitude that’s used to find search results within a certain distance from the user’s location.Optional58.0
offsetIntegerNumber of records to skip before searching for records. The default value is 0.Optional61.0
pageNumberIntegerNumber of the page you want returned. If you don’t specify a value, the first page is returned by default.Optional58.0
pageSizeIntegerNumber of search result records on each page.Optional58.0
searchCriteriaUnified Object Search Criteria[]Name of the search criteria configuration.Optional58.0
searchCriteriaConfigurationNameStringName of the search definition.Optional58.0
sortingCriteriaFieldsetUnified Object Search Sort By Field[]Details of the fields that you use to sort the search results.Required58.0

Response Body for POST 

Unified Object Search Data