Data Search Step
Search and retrieve records from your organization's datasets, with filters, sorting, and optional user selection.
The Data Search step lets you query one or more of your organization's datasets during a workflow. You define what to search for, how results are selected (automatically or by the user), and which fields to display. The selected record is then available for mapping in later steps.
Datasets
A Data Search step contains one or more dataset configurations.
| name | type | required | description |
|---|---|---|---|
datasetId | string | yes | The id of the dataset to search, as returned by the Data Set Management endpoints. |
setup | object | yes | Search configuration. See Setup below. |
results | object | yes | Results display configuration. See Results below. |
Setup
The setup object defines how the dataset is queried and how a result is selected.
| name | type | required | description |
|---|---|---|---|
required | boolean | yes | Whether a selection is mandatory for the workflow to continue. |
selectionMode | string | yes | How results are selected: AUTOMATIC picks the first match, MANUAL requires user input. |
primarySearchCriteria | object | yes | Main search criteria. See Search criteria below. |
linkedEntitiesFilters | object | yes | Filters for entities linked to the primary entity in this dataset. See Linked entity filters below. Pass an empty object {} if the dataset has no linked entities or you do not need to filter them. |
Selection modes
AUTOMATIC: The first matching record is selected without user input.MANUAL: The user chooses from the matching results before the workflow continues.
Search criteria
Search criteria define how results are filtered and sorted.
| name | type | required | description |
|---|---|---|---|
sortFieldId | string | yes | The id of the field to sort results by, as returned by the Data Catalog field endpoints. |
sortDirection | string | yes | ASCENDING (A–Z, 0–9) or DESCENDING (Z–A, 9–0). |
joinLogic | string | yes | AND (all filters must match) or OR (any filter can match). |
filters | array | yes | One or more filter conditions. See Filters below. |
Linked entity filters
Datasets can include more than one entity — for example, an "Account & Contacts" dataset might have Accounts as the primary entity and Contacts as a linked entity. primarySearchCriteria filters the primary entity. linkedEntitiesFilters lets you apply additional search criteria to each linked entity in the dataset.
linkedEntitiesFilters is a plain object where:
- Each key is the
linkIdof a linked entity, as found in the dataset'slinkAliasesarray (returned byGET /v1/activation/dataset/{datasetId}). - Each value is a search criteria object with the same structure as
primarySearchCriteria—sortFieldId,sortDirection,joinLogic, andfilters. ThefieldIdvalues insidefiltersmust belong to that linked entity, not the primary entity.
If the dataset has no linked entities, or you do not need to filter them, pass an empty object: "linkedEntitiesFilters": {}.
Filters
Each filter narrows the search to records that match a specific condition.
| name | type | required | description |
|---|---|---|---|
fieldId | string | yes | The id of the field to filter on, as returned by the Data Catalog field endpoints. |
operator | string | yes | Comparison operator. See Operators below. |
value | string | yes | The value to filter by. Supports mapping placeholders (e.g. {{Form.email}}). |
Operators
The available operators depend on the scalar type of the field being filtered. You can check the field's type from the Data Catalog field endpoints.
EQUALS: Exact match. Available for all field types.NOT_EQUALS: Not equal to the value. Available for all field types.CONTAINS: Field value contains the string as a substring. Available for text fields only.STARTS_WITH: Field value begins with the string. Available for text fields only.ENDS_WITH: Field value ends with the string. Available for text fields only.GREATER_THAN: Field value is greater than the filter value. Available for number, date, and time fields.GREATER_THAN_OR_EQUALS: Greater than or equal. Available for number, date, and time fields.LESS_THAN: Field value is less than the filter value. Available for number, date, and time fields.LESS_THAN_OR_EQUALS: Less than or equal. Available for number, date, and time fields.
Results
The results object controls how matching records are presented.
| name | type | required | description |
|---|---|---|---|
showConfirmationPage | boolean | yes | Whether to display a confirmation page after a record is selected. |
tableMode | string | yes | DEFAULT shows all fields; CUSTOM shows only the fields listed in fields. |
fields | array | yes | Fields to display in the results table. Required when tableMode is CUSTOM. |
Results fields
| name | type | required | description |
|---|---|---|---|
fieldId | string | yes | The id of the field to display, as returned by the Data Catalog field endpoints. |
customLabel | string | yes | Display label for the field in the table. |
Examples
Let's start with the simplest valid setup: one dataset, automatic selection, no filters, and all fields shown by default.
{
"datasets": [
{
"datasetId": "ds1b2c3d-e5f6-7890-1234-567890abcdef",
"setup": {
"required": true,
"selectionMode": "AUTOMATIC",
"primarySearchCriteria": {
"sortFieldId": "f1b2c3d4-e5f6-7890-1234-567890abcdef",
"sortDirection": "ASCENDING",
"joinLogic": "AND",
"filters": []
},
"linkedEntitiesFilters": {}
},
"results": {
"showConfirmationPage": false,
"tableMode": "DEFAULT",
"fields": []
}
}
]
}Building on that, here's a more complete example with multiple filters (including a mapped value from a previous form step), a linked entity filter, manual selection, and a custom results table.
{
"datasets": [
{
"datasetId": "ds2b3c4d-e5f6-7890-1234-567890abcdef",
"setup": {
"required": true,
"selectionMode": "MANUAL",
"primarySearchCriteria": {
"sortFieldId": "f2b3c4d5-e5f6-7890-1234-567890abcdef",
"sortDirection": "ASCENDING",
"joinLogic": "AND",
"filters": [
{
"fieldId": "f3c4d5e6-e5f6-7890-1234-567890abcdef",
"operator": "EQUALS",
"value": "{{`Form`.`email`}}"
},
{
"fieldId": "f4d5e6f7-e5f6-7890-1234-567890abcdef",
"operator": "EQUALS",
"value": "active"
},
{
"fieldId": "f5e6f7a8-e5f6-7890-1234-567890abcdef",
"operator": "GREATER_THAN_OR_EQUALS",
"value": "2024-01-01"
}
]
},
"linkedEntitiesFilters": {
"l1b2c3d4-e5f6-7890-1234-567890abcdef": {
"sortFieldId": "f6f7a8b9-e5f6-7890-1234-567890abcdef",
"sortDirection": "DESCENDING",
"joinLogic": "OR",
"filters": [
{
"fieldId": "f7a8b9c0-e5f6-7890-1234-567890abcdef",
"operator": "NOT_EQUALS",
"value": "cancelled"
},
{
"fieldId": "f8b9c0d1-e5f6-7890-1234-567890abcdef",
"operator": "GREATER_THAN",
"value": "100"
}
]
}
}
},
"results": {
"showConfirmationPage": true,
"tableMode": "CUSTOM",
"fields": [
{ "fieldId": "f9c0d1e2-e5f6-7890-1234-567890abcdef", "customLabel": "Customer ID" },
{ "fieldId": "f0d1e2f3-e5f6-7890-1234-567890abcdef", "customLabel": "First Name" },
{ "fieldId": "f2b3c4d5-e5f6-7890-1234-567890abcdef", "customLabel": "Last Name" },
{ "fieldId": "f3c4d5e6-e5f6-7890-1234-567890abcdef", "customLabel": "Email Address" },
{ "fieldId": "f4d5e6f7-e5f6-7890-1234-567890abcdef", "customLabel": "Phone Number" }
]
}
}
]
}Updated 20 days ago
