Overview

In QuickBooks Desktop, both “customers” and “jobs” are represented as Customer objects. Jobs are considered a subset of customers and cannot be queried separately. This data model is a quirk of QuickBooks Desktop and is outside of Conductor’s control.

Differences between jobs and customers

A job in QuickBooks Desktop differs from a customer in the following ways:

  1. ParentRef: A job has a ParentRef property that points to the parent customer.

  2. FullName: A job’s FullName property is the concatenation of the parent customer’s FullName and the job’s Name.

    • Example: If the parent customer’s FullName is "Annie's Alligators" and the job’s Name is "Swamp", the job’s FullName will be "Annie's Alligators:Swamp".
  3. Sublevel: A job has a Sublevel property set to 1, while the parent customer’s Sublevel property is set to 0.

Querying customers and jobs

To fetch all customers and jobs for a given end-user, use the following query:

Fetching all customers and jobs
const customersAndJobs = await conductor.qbd.customer.query("{{END_USER_ID}}");

If you’re looking for a specific job in QuickBooks Desktop, you must query for the customer and then filter the results to find the job.

To see all of the request parameters and response fields for , check out our client library’s amazing autocomplete.

Some objects in QuickBooks Desktop, such as SalesOrders, are associated with a customer’s job instead of directly with the customer. In these cases, querying using the EntityFilter.ListID parameter set to a customer’s ListID will return no results.

To fetch objects related to a customer’s jobs, use the EntityFilter.ListIDWithChildren parameter with the customer’s ListID. This will return the objects corresponding to all of the customer’s jobs. For example:

Fetching SalesOrders for all jobs of a customer
const salesOrders = await conductor.qbd.salesOrder.query("{{END_USER_ID}}", {
  EntityFilter: {
    // The `ListID` of the customer whose jobs' SalesOrders you want to fetch.
    ListIDWithChildren: "800000AB-1234567890",
  },
});

By using the ListIDWithChildren parameter, you can effectively query for objects related to a customer’s jobs without having to query for each job individually.