GraphQL: Customers

Read customers with their organization, properties, jobs, estimates and invoices, and create, update or delete customers.

OperationTypeDescription
customer(id)QueryGet one customer
customers(first, after, filter, sort)QueryList customers
createCustomer(input)MutationCreate a customer
updateCustomer(id, input)MutationUpdate a customer
deleteCustomer(id)MutationDelete a customer

Customer fields

Details

FieldTypeDescription
idID!Customer UID
customer_first_nameString
customer_last_nameString
customer_full_nameStringFirst and last name
customer_company_nameString
customer_categoryCustomerCategory{ id category_name }
customer_tags[String]
is_activeBoolean
custom_fields[CustomField!]!
external_ids[ExternalId!]!{ key value }

Contact details and addresses

FieldTypeDescription
customer_emailString
additional_emails[String!]!
customer_contact_noContactNumbers{ mobile home work }
customer_addressAddress
customer_billing_addressAddress

Related records

FieldTypeDescription
customer_organizationOrganization
propertiesPropertyConnection!Paginated, with first (default 10), after, filter: PropertyFilter and sort: PropertySort
jobsJobConnection!Jobs where this is the primary customer. Paginated, with first (default 10), after, filter: JobFilter and sort: JobSort
estimatesEstimateConnection!Paginated, with EstimateFilter and EstimateSort
invoicesInvoiceConnection!Paginated, with InvoiceFilter and InvoiceSort
no_of_jobsIntNumber of jobs for this customer

Audit

FieldTypeDescription
created_atDateTime
updated_atDateTime

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 jobsAfter set to jobs.page_info.end_cursor. Each nested list pages on its own.


List customers

customers(first, after, filter, sort) returns a paginated list.

CustomerFilter

FieldTypeMatches
emailStringExact customer_email (case-sensitive)
mobileStringExact mobile number
category_uidIDCustomer category
organization_uidIDThe customer's organization
is_activeBooleanActive or inactive customers
created_after / created_beforeDateTimeRange on created_at
updated_afterDateTimeCustomers 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

FieldTypeRequiredDescription
customer_first_nameStringYes
customer_last_nameStringNo
customer_company_nameStringNo
customer_emailStringSee note
additional_emails[String!]No
customer_contact_noContactNumbersInputNo{ mobile home work }
category_uidIDNoCustomer category
organization_uidIDNo
customer_addressAddressInputNo
customer_billing_addressAddressInputNo
customer_tags[String!]No
custom_fields[CustomFieldInput!]No{ label value }

Note: customer_email is required when your account is set up to require an email for every customer. Creating a customer that already exists returns HTTP_409 in user_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": [] } } }

Did this page help you?