Create customer search
Searches across customer data with criteria based on standard Object data and any custom attribute data for standard Objects, including Message, Conversation, and Company objects.
Standard object data, custom object data, and conversation time data is limited to objects that have an updatedAt more recent than in the past 2 years. To query for older, archived data for standard and custom objects, see the Archive Search API.
Older conversation time data is not available via search.
Any one of the following roles is required for this endpoint:
Legacy Role
Equivalent Permission Set Role
org.user.search.read
org.permission.search.create
org.admin.search.read
org.permission.search.update
org.permission.search_global.create
org.permission.search_preview.create
Filter on dates
You can filter by dates in either a local date YYYY-MM-DD format or a UTC date format. If you include a timezone in the query, a local date will be adjusted to account for the included timezone. UTC dates will not be timezone adjusted.
Sorting based on other standard Object attributes is unavailable.
Pagination
There is a hard limit of 100 for the maximum number of pages.
There may be cases where you want to page through more records. For example, let's say you'd like to get an initial snapshot of data and then update the data.
To work around the pagination limit, you can write a query based on the updated_at attribute for a standard Object. You can then use the returned information in following API requests based on the last updated_at value from the response.
Create customer search Searches across customer data with criteria based on standard Object data and any custom attribute data for standard Objects, including Message, Conversation, and Company objects. Standard object data, custom object data, and conversation time data is limited to objects that have an updatedAt more recent than in the past 2 years. To query for older, archived data for standard and custom objects, see the Archive Search API. Older conversation time data is not available via search.
Any one of the following roles is required for this endpoint:
Filter on dates
You can filter by dates in either a local date
YYYY-MM-DD
format or a UTC date format. If you include a timezone in the query, a local date will be adjusted to account for the included timezone. UTC dates will not be timezone adjusted.Example of search criteria with local date
Note
Example of search criteria with UTC date
Filter on standard attributes
For a list of available standard attributes, see Standard attributes JSON schema.
Example of search criteria with standard attributes
Filter on custom attributes for standard Objects
You can query custom attibutes on on standard Objects with the following syntax:
<<standard_object_name>>_custom_<<custom_field_name>>
.Example of search criteria with custom attributes
Filter on custom attributes for custom Objects
You can query custom attributes for custom Object with the following syntax:
kobject_custom_<<klass_name>>_<<custom_field_name>>
.Examples
Sort on customer attributes
You can sort based on the following customer attributes:
Example of sort with customer attributes
Note
Pagination
There is a hard limit of 100 for the maximum number of pages.
There may be cases where you want to page through more records. For example, let's say you'd like to get an initial snapshot of data and then update the data.
To work around the pagination limit, you can write a query based on the
updated_at
attribute for a standard Object. You can then use the returned information in following API requests based on the lastupdated_at
value from the response.Standard attributes JSON Schema