Quickbook Webconnector queue concept with Job priorities

Author - Webner
10.03.2017
|
0 Comments
|

Queue plays very important role in Quickbook integration via Web connector. Each new job is created in the queue with priority level according to which it is executed. For example when we add a new user or new product than these events are stored in a queue as a job. Web connector executes these jobs to exchange data with Quickbook. We can set a job priority and web connector will execute these jobs according to the priority.

For example suppose we have three jobs which should be executed in this sequence:

1. Add Customer
2. Add Product
3. Add Invoice

We can achieve it in this way:

$Queue = QuickBooks_WebConnector_Queue_Singleton::getInstance();
	$Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $id,2,);
$Queue->enqueue(QUICKBOOKS_ADD_SERVICEITEM, $id,1,');
$Queue->enqueue(QUICKBOOKS_ADD_INVOICE, $id,0);

Here We assigned priority to the three jobs. High priority job will be executed first so QUICKBOOKS_ADD_CUSTOMER job will execute first, then QUICKBOOKS_ADD_SERVICEITEM job will execute and last QUICKBOOKS_ADD_INVOICE will execute.

Sometimes web connector shows message ‘no data exchange required’ that means there is no job scheduled in a queue.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *