QB Desktop PHP integration via web-connector on system having multiple company files - quickbooks

QB desktop 2021 Enterprise version,
Multi-user mode not enabled,
qwc: Quickbooks Web connector
I am using Consolibyte's PHP sdk to connect QB desktop with our CMS. I am pulling some accounting reports from the QB desktop. My concern is that we have some 10 different company files (10 different clients). I need to pull the report for each client so I have prepared 10 QWC connections i.e one for each company file. My concern is that I cannot set Auto-Run for each web-connector setting (despite of having a gap of 1 hour between each entry). While installing qwc file, I have set automatically open the company file if not open("Always allow access even if Quickbooks is not running") but I keep on getting below error message when ever Auto-run tries to execute the configured app. I get the same error even if I do not open the QB company file in the QB and tries to run the same manually
Application requested to Abort
If I open up the company file in QB and then select the qwc application and select "update selected" then it works fine.
This is creating concern as I am not able to run the qwc apps automatically and have to run it manually. I will be having 50 company files and running it manually is time consuming. Can anyone please guide me as why it needs the company file to open prior running the web-connector (then what is the use of selecting ("Always allow access even if Quickbooks is not running")) and in that case automatic execution of qwc app not possible as somebody has to open the company file first. Kindly guide

Adand,
I had faced similar problem with consilbyte SDK for QBD web connector integration.
Sometime the problem is that QBD services are running in background and connected to one of the company, which we don't know where.
so in order to reset all things and try once again, you should kill following services which are running in your windows PC. and then start all company sync in web connector.
This should solve your problem. if not then share the web connector log file. so i can investigate and provide solution.
additionally you should try these solutions specific to Web Connector https://quickbooks.intuit.com/learn-support/en-us/help-article/open-programs/fix-common-web-connector-errors-quickbooks-desktop/L9slolvg0_US_en_US

I have found the solution for problem. Issue was that when we have multiple company files and if we want QWC to open up the right company file automatically then we have to set the company file path for each QWC user in the QB table (Consolibyte PHP SDK) "quickbooks_user"
UPDATE quickbooks_user SET qb_company_file = 'C:\path\to\your\file.QBW' WHERE qb_username = 'your-web-connector-username'
I have found this answer through below stackoverflow threads
Error in web connector when quickbooks not running
How to set .QBW file path for response in Authenticate for Quickbooks Web Connector?
and from Wiki pages by Keith/Consolibyte:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_integration_php_consolibyte#how_can_i_tell_the_web_connector_to_connect_to_quickbooks_even_if_quickbooks_is_not_open
I have tried this and it works. QB company file is opened up in background by QWC, data pulled and then company file is closed by QWC. I am hopeful that this inbuilt solution will allow me to automate 50+ QWC executions.

Related

How to get company listing in QB desktop and some other questions

I have to create an integration app for Quickbooks Desktop (first) and Quickbooks online (later). App is to only read and save data in local mssql DB, which is gonna be accessed from a web site. Data of interest are : list of companies, list of each company accounts and ledger info.
Since this is a web app - integration app (asp.net/c#) I plan to create a web service to be called by QB's Web Connector app.
I installed / run WCWebService from SDK samples, authenticate web method returns path to QB db file or empty string to use currently opened db file.
Is there a way to get list of company files out of quickbooks,
Also then my app has to enumerate company list, open each file and read required set of data from it, is it possible at all ?
Do I understand correct: there is no single web api to access both QB desktop and online ?
(I read a couple of artiles on it and people said that: QB Desktop -> QBSDK/Web Connector, QB Online -> IPP REST api. However I see that quickbooks desktop allows to upload it's local DB file to be accessed from web.)
Thanks,
Vlad
Is there a way to get list of company files out of quickbooks
No.
Also then my app has to enumerate company list, open each file and read required set of data from it, is it possible at all ?
You can certainly read data from them, yes. You won't be able to get a list of company files though without some end-user interaction (the end-user needs to go through a connection process for each file).
there is no single web api to access both QB desktop and online ?
Correct.
(I read a couple of artiles on it and people said that: QB Desktop -> QBSDK/Web Connector, QB Online -> IPP REST api.
This is correct.
SDK/Web Connector for QuickBooks DESKTOP
REST v3 API for QuickBooks ONLINE

The application trying to connect to QuickBooks is not supported while multiple instances of QuickBooks are running.

My application Connecting to QuickBooks 2013 with QBFC 12.
QuickBooks is running on a Server
Multiple users login to the same server and run QuickBooks from the server at the same time.
Application is also running on the Server.
Application connects to QuickBooks if only ONE user is logged in to the Server and has QB running.
If any other user logs in to the server and opens QuickBooks then the application does not connect.
Message Type: ERROR
Message: The application trying to connect to QuickBooks is not supported while multiple instances of QuickBooks are running.
at Interop.QBFC11.QBSessionManagerClass.BeginSession(String qbFile, ENOpenMode openMode)
at QBFSSyncManager.OpenQBSession()
Message: The application trying to connect to QuickBooks is not supported while multiple instances of QuickBooks are running.
at Interop.QBFC11.QBSessionManagerClass.BeginSession(String qbFile, ENOpenMode openMode)
at Turbo.THUB.QBProcess.QBFSSyncManager.OpenQBSession()
Solution that I found (if it applies to your problem):
If you are running your application from within Visual Studio (any version), make sure VS is NOT running as an Administrator.
This took me hours of hair pulling, name calling, forum screaming and a broken mouse to figure out.
My application works with multiple users, each with separate computers and separate instances of QB, all working in the same QB file via network file share.
I recommend move your application to a separate computer with its own QB instance and open the QB file remotely (not by remote desktop).
A common approach is to move Quickbooks to its own machine , and then write your application such that it receives requests from the other machines. The request can be processed and some sort of message returned. The message can be either a result set or a message letting the caller know if it worked, or if there was a problem.
Without knowing more about what you are trying to do, its hard to give specific advice.

How to connect to QuickBooks online from a desktop application

OK. This question has been asked a number of times and answered. However, it seems Intuit changed things on their part so:
Their own latest documentation is no longer correct
All the answers I found so far on the Internet no longer work
Therefore, the only option left is to ask the same question again.
I'm building a console application in C# that need to import data (invoices, customers, etc.) to QB online. It is an internal integration application that will be used by only one company. I definitely do not want to go on the SaaS route.
By all accounts it seems that I should the QuickBooks QBXML SDK v12 and should registered the application in QBOE at "www.appreg.intuit.com". However, this address no longer exists and the registration procedure has changed. QBOE currently support three types of applications:
QuickBooks API - SaaS
Customer Account Data API
Payments (QBMS) App
By considering the functionality I need (create invoices etc.) I should probably create a "QuickBooks API" application. However, this is a SaaS application which is unusable to me.
The "Customer Account Data API" is definitely not what I need.
The only option left is the "Payments (QBMS) App" which does not seem to be the right choice either. However, this is the only one of the three application types that can be either hosted or desktop and have "AppID" and "AppLogin" attributes described in various integration articles on the Internet when using the traditional SDK.
Therefore, I created a "Payments (QBMS) App" (Desktop, Production), followed documentation and articles, did all required settings and used the traditional SDK COM objects to connect to QuickBooks.
During the first connection attempt I approved the application in my QBOE account and set the connection token. Gave all permissions to the connection with no user authentication required.
In the end all I got is the following uninformative exception thrown by the QBSessionManager.BeginSession method:
System.Runtime.InteropServices.COMException (0x80040403): Problem communicating with QuickBooks Online Edition
If I turn on log-in security a dialog appears prompting me to log-in and paste a ticket. Upon opening the log-in URL
https://login.quickbooks.com/j/qbn/sdkapp/sessionauth2?serviceid=2004&appid=[AppID]
the following message appears
There is a problem with sharing your financial data between applications.
Error Message: Application [AppLogin] is not designed to work with service 2004
I also tried using qbXML directly which resulted in a "400 Bad request" error.
Is connecting to QBOE via the SDK still supported and what I'm supposed to do to achieve that?
Go here to create a QBOE application - http://developer.intuit.com/Application/Create/QBOE.
You should use traditional QBSDK.
Please refer this link - https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0250_qb
Thanks

QB PRO 2013 + Web Connector with closed company

I have Quickbooks Pro 2013 with the Web Connector installed.
I have created a sync application, granted permissions and everything, and I get the Web connector to exchange data between the company file (QB PRO 2013) and a web service successfully.
This happens only while QB PRO 2013 is OPEN. It doesn't require a logged in user, just keeping the application open is good enough for the Web Connector to connect to the company file and exchange data.
The thing is when I close the application the Web Connector starts complaining with a QBWC1013 error, saying:
Could not start QuickBooks. - second row in this link: http://www.zoho.com/crm/help/quickbooks/troubleshooting.html#sthash.hk3Dc8dl.dpuf
I'm used to QB POS, where I don't need the company open. Is this behavior different on non POS products ? Do I need to keep QB open all the time ? The path to the company file is OK as well as the syncing logic, we are able to connect, authenticate, exchange data both ways smoothly but only while QB is open (being logged in is not necessary, just keeping the app open).
It is like the Web Connector needs a running instance of QuickBooks to authenticate, because when it does so, QuickBooks flickers like if someone were logging in and then logging out.
The Web Connector application has been granted full access and Admin login to the company file.
Any thoughts :)
First, know that the very first time you connect things you have to make sure QuickBooks is open. If you haven't had QuickBooks open at all yet, make sure it's open the very first time to get things connected.
After that, QuickBooks does not have to be open, provided you have configured things correctly.
To answer your questions:
Is this behavior different on non POS products ?
Yes. Slightly.
Do I need to keep QB open all the time ?
No.
The path to the company file is OK as well as the syncing logic, we are able to connect, authenticate, exchange data both ways smoothly but only while QB is open (being logged in is not necessary, just keeping the app open).
Hit F2 in QuickBooks, and make sure that the path that's shown in the dialog window that pops up is EXACTLY the path that your web service is returning to the Web Connector. It must be EXACTLY the same.
If you're still having trouble, double-check that the app is allowed to connect in the QuickBooks settings, and that a valid user is chosen in the settings, restart the computer, and try again.
If you're still having trouble, post your Web Connector logs (in VERBOSE mode: QuickBooks Web Connector - how to set VERBOSE mode) so that we can help you troubleshoot.

Must your 3rd party app be signed to integrate with Quickbooks?

On my development machine (which has the Quickbooks SDK installed) I can connect and interact with QB just fine; the standard workflow of granting access to the external app from w/i QB works. However, on my production machine I get various and sundry errors:
Can't start QB.
Can't start QB because it's already running.
Can't open more than one company file.
The dev docs lead you to believe that the app must be signed while elsewhere I've found examples where you could run an un-signed example app. So what is it? If signing isn't strictly required then any clues as to why I can't get this to work?
Production Machine
QuickBooks Pro 2011 Release R9P (US)
Our installed, OOB, Silverlight app
Dev Machine
Quickbooks Premier Contractor Edition 2010 Release R13P (US)
Silverlight 4 using COM/C# to connect to QB
Quickbooks SDK 11.0
As I've said, the dev machine works as it should. On the production machine we've tried every combo of not having QB open, having it open but no client file open, having it open and a client file open and we'll get one error or another right at the point we're trying to open a connection. Also, our app never shows up in the integrated applications settings page (but it does show up on the dev machine's QB). We've tried both admin and non admin.
No, you DO NOT need to sign your apps.
You didn't provide anywhere near enough information for us to really give you a solution.
Did you check your SDK logs?
What version/year/edition/country of QuickBooks?
Are you building for the Web Connector, or using C#, or VB .NET, or...?
If you're using the Web Connector, what do your Web Connector logs look like?
Are you logged in as the QuickBooks admin user?
Is QuickBooks already running?
Is there another QuickBooks company file already open?
Did you revoke permission from the integrated application?
If you expect answers, you have to post some details.
It's a Silverlight app with full trust. It looks as though it was something with SL itself. Once we upgraded to SL5 it worked fine.

Resources