Search code examples
quickbooksqbxml

QBXML - Query Customer ID


I am working on a qbxml application with PHP, and looking for some advice. The application will be pulling information from a ecommerce system, and allowing a sync over to quickbooks. I need to be able to query quickbooks for an existing customer, and then either create an invoice for that customer or create a new customer.

I have the process down for creating a new customer, I'm just trying to figure out what the best way is to query QuickBooks for existing customers and retrieve back that customer ID during the web connector update process.

So I have a couple questions:

1) From what i've read, there is no way to query on email like quickbooks online, but the only via the name. Is that correct?

2) Is the correct approach for the first qbxml request to query the customer, and then based on what is found, send another request back as part of that response? Does that type of chaining work correctly?

Thanks in advance for any assistance!


Solution

  • 1) From what i've read, there is no way to query on email like quickbooks online, but the only via the name. Is that correct?

    Yes, that's correct.

    2) Is the correct approach for the first qbxml request to query the customer, and then based on what is found, send another request back as part of that response? Does that type of chaining work correctly?

    Yes, that works.

    Another potential option - on every Web Connector connection, grab all customers that have changed since the last sync. Cache those in your web app.

    Check the cached data for the email address.