Search code examples
quickbooksintuit-partner-platformquickbooks-online

Determining parent of sub-customer through IDS


I'm syncing data with QBOE using the IDS API V2. I can't figure out how to determine if a customer is a sub-customer. if the Bill With Parent happens to be true, then it's a safe bet, but that's not a guarantee. It also doesn't include the parent id which is needed.

The output of a nested customer is looking like this. Do I need to query the server differently?

<Customer xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
  <Id idDomain="QBO">88</Id>
  <SyncToken>0</SyncToken>
  <MetaData>
    <CreateTime>2013-06-20T17:38:22-07:00</CreateTime>
    <LastUpdatedTime>2013-06-20T17:38:22-07:00</LastUpdatedTime>
  </MetaData>
  <Name>sub client</Name>
  <Phone>
    <DeviceType>Primary</DeviceType>
    <FreeFormNumber>123-4566</FreeFormNumber>
  </Phone>
  <WebSite />
  <Email>
    <Address>[email protected]</Address>
  </Email>
  <GivenName>sub</GivenName>
  <FamilyName>client</FamilyName>
  <CustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="StringTypeCustomField">
    <DefinitionId>Preferred Delivery Method</DefinitionId>
    <Value>EMAIL</Value>
  </CustomField>
  <CustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="StringTypeCustomField">
    <DefinitionId>Resale Number</DefinitionId>
  </CustomField>
  <CustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BooleanTypeCustomField">
    <DefinitionId>Bill With Parent</DefinitionId>
    <Value>true</Value>
  </CustomField>
  <ShowAs>sub client</ShowAs>
  <OpenBalance>
    <Amount>0</Amount>
  </OpenBalance>
</Customer>

Solution

  • To Query for all top level customers without jobs query for customers with IncludeJobs set to false. You will need to query jobs seperately.