How to Create new request after getting response in quickbook desktop

For creating new request in quickbook we need to add this request to queue.

For example:

You want to get customer information which are related to invoice. For this first you will create invoice request function and send xml to web connector.

Function Invoice_request(requestID,user, action, extra, &$err){ <?xml version=”1.0″ encoding=”utf-8″?> <?qbxml version=”‘ . $version . ‘”?> <QBXML> <QBXMLMsgsRq onError=”stopOnError”> <InvoiceQueryRq> <OwnerID>0</OwnerID> </InvoiceQueryRq> <CustomerQueryRq> <OwnerID>0</OwnerID> </CustomerQueryRq> </QBXMLMsgsRq> </QBXML> return xml; }

After processing request web connector will send back response xml.

Function Invoice_response($requestID, $user, $action, $ID, $extra, xml){ Here you will parse xml and get all related customer list_id in array. Array customer_id={list_id}; Now create new request using queue and send customer_id array. $Queue->enqueue(QUICKBOOKS_QUERY_CUSTOMER,0,customer_id); }

When this request will execute by web connector we can get customer list in response method by parsing xml.