Query
query SearchCustomers($searchQuery: CustomersSearchQuery!) {
searchCustomers(searchQuery: $searchQuery) {
edges {
cursor
node {
id
externalId
fullName
shortName
email {
__typename
}
avatarUrl
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
}
}Variables
{
"searchQuery": {}
}Response
{
"data": {
"searchCustomers": {
"edges": [
{
"cursor": "string",
"node": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"__typename": "EmailAddress"
},
"avatarUrl": "string"
}
}
],
"pageInfo": {
"hasPreviousPage": true,
"hasNextPage": true,
"startCursor": "string",
"endCursor": "string"
}
}
}
}Queries
searchCustomers
Search for customers using a case-insensitive partial match across name, short name, email, and
external ID. Results are sorted by most recently active first. Best suited for human-driven
lookups (e.g. a search box) rather than precise programmatic resolution — use customerByEmail
or customerByExternalId for exact lookups. Optionally narrow the results with filters
(group membership, company, tenant, Slack channel and more). Requires the customer:read permission.
QUERY
searchCustomers(searchQuery: CustomersSearchQuery!, filters: CustomersFilter, first: Int, after: String, last: Int, before: String): CustomerSearchConnection!Arguments
searchQuery
required
filters
first
Int
after
String
last
Int
before
String
Returns
edges
pageInfo
Query
query SearchCustomers($searchQuery: CustomersSearchQuery!) {
searchCustomers(searchQuery: $searchQuery) {
edges {
cursor
node {
id
externalId
fullName
shortName
email {
__typename
}
avatarUrl
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
}
}Variables
{
"searchQuery": {}
}Response
{
"data": {
"searchCustomers": {
"edges": [
{
"cursor": "string",
"node": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"__typename": "EmailAddress"
},
"avatarUrl": "string"
}
}
],
"pageInfo": {
"hasPreviousPage": true,
"hasNextPage": true,
"startCursor": "string",
"endCursor": "string"
}
}
}
}Was this page helpful?

