GraphQL: Customers
Read customers with their organization, properties, jobs, estimates and invoices, and create, update or delete customers.
| Operation | Type | Description |
|---|---|---|
customer(id) | Query | Get one customer |
customers(first, after, filter, sort) | Query | List customers |
createCustomer(input) | Mutation | Create a customer |
updateCustomer(id, input) | Mutation | Update a customer |
deleteCustomer(id) | Mutation | Delete a customer |
Customer fields
Details
| Field | Type | Description |
|---|---|---|
id | ID! | Customer UID |
customer_first_name | String | |
customer_last_name | String | |
customer_full_name | String | First and last name |
customer_company_name | String | |
customer_category | CustomerCategory | { id category_name } |
customer_tags | [String] | |
is_active | Boolean | |
custom_fields | [CustomField!]! | |
external_ids | [ExternalId!]! | { key value } |
Contact details and addresses
| Field | Type | Description |
|---|---|---|
customer_email | String | |
additional_emails | [String!]! | |
customer_contact_no | ContactNumbers | { mobile home work } |
customer_address | Address | |
customer_billing_address | Address |
Related records
| Field | Type | Description |
|---|---|---|
customer_organization | Organization | |
properties | PropertyConnection! | Paginated, with first (default 10), after, filter: PropertyFilter and sort: PropertySort |
jobs | JobConnection! | Jobs where this is the primary customer. Paginated, with first (default 10), after, filter: JobFilter and sort: JobSort |
estimates | EstimateConnection! | Paginated, with EstimateFilter and EstimateSort |
invoices | InvoiceConnection! | Paginated, with InvoiceFilter and InvoiceSort |
no_of_jobs | Int | Number of jobs for this customer |
Audit
| Field | Type | Description |
|---|---|---|
created_at | DateTime | |
updated_at | DateTime |
Get a customer
customer(id: ID!) returns one customer, or null if the UID doesn't exist in your account.
This example also returns the customer's latest jobs, estimates waiting for a response, and unpaid invoices.
query CustomerDetails($id: ID!, $jobsAfter: String) {
customer(id: $id) {
id
customer_full_name
customer_company_name
customer_email
additional_emails
customer_contact_no { mobile home work }
customer_category { category_name }
customer_organization { id organization_name }
customer_address { street city state country zip_code }
customer_billing_address { street city state country zip_code }
customer_tags
custom_fields { label value }
no_of_jobs
is_active
properties { nodes { id property_name property_address { city } } }
jobs(first: 10, after: $jobsAfter, sort: { field: CREATED_AT, direction: DESC }) {
nodes { id work_order_number job_title current_status { status_name } }
page_info { has_next_page end_cursor }
}
estimates(first: 5, filter: { status_in: [AWAIT_RESPONSE, AWAIT_SIGNATURE] }) {
nodes { id estimate_no_string estimate_status total expiry_date }
}
invoices(first: 5, filter: { is_paid: false }, sort: { field: DUE_DATE, direction: ASC }) {
nodes { id invoice_no_string total amount_due due_date }
}
created_at
}
}{ "id": "<customer_uid>", "jobsAfter": null }Note: To see more of this customer's jobs, send the same query with
jobsAfterset tojobs.page_info.end_cursor. Each nested list pages on its own.
List customers
customers(first, after, filter, sort) returns a paginated list.
CustomerFilter
| Field | Type | Matches |
|---|---|---|
email | String | Exact customer_email (case-sensitive) |
mobile | String | Exact mobile number |
category_uid | ID | Customer category |
organization_uid | ID | The customer's organization |
is_active | Boolean | Active or inactive customers |
created_after / created_before | DateTime | Range on created_at |
updated_after | DateTime | Customers changed at or after this time |
custom_field | [CustomFieldFilter!] | { label, value } exact matches |
CustomerSortField: CREATED_AT, UPDATED_AT
Example: find a customer by email or mobile number
Aliases let you run both lookups in one request.
query FindCustomer($email: String, $mobile: String) {
by_email: customers(first: 1, filter: { email: $email }) {
nodes { id customer_full_name customer_email }
}
by_mobile: customers(first: 1, filter: { mobile: $mobile }) {
nodes { id customer_full_name customer_contact_no { mobile } }
}
}{ "email": "[email protected]", "mobile": "+15555550123" }Example: an organization's active customers changed since a date
query OrgCustomersSync($org: ID!, $since: DateTime!, $after: String) {
customers(
first: 100
after: $after
filter: { organization_uid: $org, is_active: true, updated_after: $since }
sort: { field: UPDATED_AT, direction: ASC }
) {
nodes {
id
customer_full_name
customer_email
customer_contact_no { mobile }
customer_category { category_name }
updated_at
}
page_info { has_next_page end_cursor }
}
}{ "org": "<organization_uid>", "since": "2026-11-01T00:00:00Z", "after": null }Example: customers of a category with a custom field value, created in a date range
query CustomersByCategory($category: ID!, $cf: [CustomFieldFilter!], $from: DateTime, $to: DateTime) {
customers(
first: 50
filter: { category_uid: $category, custom_field: $cf, created_after: $from, created_before: $to }
sort: { field: CREATED_AT, direction: ASC }
) {
nodes { id customer_full_name customer_tags custom_fields { label value } created_at }
page_info { has_next_page end_cursor }
}
}{
"category": "<customer_category_uid>",
"cf": [{ "label": "Region", "value": "West" }],
"from": "2026-01-01T00:00:00Z",
"to": "2026-06-30T23:59:59Z"
}Create a customer
createCustomer(input: CustomerCreateInput!)
CustomerCreateInput
| Field | Type | Required | Description |
|---|---|---|---|
customer_first_name | String | Yes | |
customer_last_name | String | No | |
customer_company_name | String | No | |
customer_email | String | See note | |
additional_emails | [String!] | No | |
customer_contact_no | ContactNumbersInput | No | { mobile home work } |
category_uid | ID | No | Customer category |
organization_uid | ID | No | |
customer_address | AddressInput | No | |
customer_billing_address | AddressInput | No | |
customer_tags | [String!] | No | |
custom_fields | [CustomFieldInput!] | No | { label value } |
Note:
customer_emailis required when your account is set up to require an email for every customer. Creating a customer that already exists returnsHTTP_409inuser_errors.
mutation CreateCustomer($input: CustomerCreateInput!) {
createCustomer(input: $input) {
customer {
id
customer_full_name
customer_email
customer_contact_no { mobile }
customer_category { category_name }
customer_organization { organization_name }
}
user_errors { field message code }
}
}{
"input": {
"customer_first_name": "Jane",
"customer_last_name": "Cooper",
"customer_company_name": "Cooper Dental",
"customer_email": "[email protected]",
"additional_emails": ["[email protected]"],
"customer_contact_no": { "mobile": "+15555550123", "work": "+15555550199" },
"category_uid": "<customer_category_uid>",
"organization_uid": "<organization_uid>",
"customer_address": { "street": "1200 Market St", "city": "San Francisco", "state": "California", "country": "United States", "zip_code": "94102" },
"customer_billing_address": { "street": "1200 Market St", "city": "San Francisco", "state": "California", "country": "United States", "zip_code": "94102" },
"customer_tags": ["vip"],
"custom_fields": [{ "label": "Region", "value": "West" }]
}
}Possible user_errors messages include Invalid Customer Organization UID (HTTP_400).
Update a customer
updateCustomer(id: ID!, input: CustomerUpdateInput!) changes only the fields you send. CustomerUpdateInput has the same fields as CustomerCreateInput, all optional.
mutation UpdateCustomer($id: ID!, $input: CustomerUpdateInput!) {
updateCustomer(id: $id, input: $input) {
customer { id customer_full_name additional_emails customer_tags customer_contact_no { mobile } }
user_errors { field message code }
}
}{
"id": "<customer_uid>",
"input": {
"additional_emails": ["[email protected]", "[email protected]"],
"customer_tags": ["vip", "amc"],
"customer_contact_no": { "mobile": "+15555550124" }
}
}Note: You can't remove a customer's email once it's set. The update fails with Customer Email cannot be removed.
Delete a customer
deleteCustomer(id: ID!)
mutation DeleteCustomer($id: ID!) {
deleteCustomer(id: $id) {
deleted_id
user_errors { field message code }
}
}{ "id": "<customer_uid>" }{ "data": { "deleteCustomer": { "deleted_id": "<customer_uid>", "user_errors": [] } } }Updated about 21 hours ago
