Skill: Customer Upsert

Create, update, or upsert customer records in QuickBooks Online with full control over contact details, addresses, and phone numbers.

The Customer Upsert skill creates new customer records, updates existing ones, or performs an upsert (create if not found, update if exists) in QuickBooks Online. This is the primary skill for managing customer data.

Parameters

ParameterTypeRequiredDescription
actionstringYesThe operation to perform: create, update, or upsert.
display_namestringYes (for create/upsert)The customer’s display name. Must be unique in QuickBooks.
given_namestringNoCustomer’s first name.
family_namestringNoCustomer’s last name.
company_namestringNoAssociated company name.
primary_email_addrstringNoPrimary email address.
primary_phoneobjectNoPrimary phone number. Object with free_form_number field.
mobile_phoneobjectNoMobile phone number. Object with free_form_number field.
alternate_phoneobjectNoAlternate phone number. Object with free_form_number field.
bill_addrobjectNoBilling address. Object with line1, line2, city, country_sub_division_code (state), postal_code, country fields.
ship_addrobjectNoShipping address. Same structure as bill_addr.
idstringYes (for update)QuickBooks customer ID. Required when action is update.
sync_tokenstringYes (for update)QuickBooks sync token for optimistic concurrency. Required when action is update.
Caution

When updating a customer, you must provide the current id and sync_token. These values come from a prior Query Customer call. If the sync_token does not match (because someone else updated the record), the update will fail with a conflict error.

Action modes

ActionBehavior
createCreates a new customer. Fails if display_name already exists.
updateUpdates an existing customer. Requires id and sync_token.
upsertSearches by display_name. If found, updates. If not found, creates.

Example usage

Creating a new customer:

“Add a new customer: Jane Smith at Acme Corp, email [email protected], billing address 123 Main St, Springfield, IL 62701.”

The agent would invoke this skill with:

  • action: create
  • display_name: Jane Smith
  • given_name: Jane
  • family_name: Smith
  • company_name: Acme Corp
  • primary_email_addr: [email protected]
  • bill_addr: { "line1": "123 Main St", "city": "Springfield", "country_sub_division_code": "IL", "postal_code": "62701" }

Updating an existing customer:

“Update Acme Corp’s email to [email protected].”

The agent would first query the customer to get the id and sync_token, then invoke this skill with:

Note

The agent always confirms with the user before executing create or update operations. This behavior is built into the recommended agent instructions for any agent using write skills.

Response structure

The skill returns the created or updated customer record, including:

  • Id — the QuickBooks customer ID.
  • SyncToken — the new sync token (incremented after an update).
  • All customer fields reflecting the current state after the operation.

Related skills: Query Customer | Search Invoices