It would be valuable for users of my SaaS app if they could integrate with QuickBooks. I’m on a mission to see how easy that actually is. I’m starting with the ZeroCode QuickBooks Accounting Plugin. I know there’s other options for anyone in the Bubble ecosystem, but this one seems to be the easiest and quickest option. So far setup has been easy.
If you’re interested in adding QuickBooks to your bubble app, follow me through this journey - as I try and make this all work.
Users of my SaaS product could login to their own QB account through my app. They should be able to perform multiple tasks, such as: find QB customer info in my app, create QB invoices for specific customers through my app, etc.
Purpose of this Thread:
I will walk you through how I accomplish each step, and then will post an update each time I get stuck. The number of updates will be determined by how often I get stuck. (Hopefully just one more long update when I’m done - but that’s unlikely )
@ZeroqodeSupport I need help getting my repeating group and drop down to display customer information from QuickBooks. I can’t get it to work.
I purchased the QuickBooks Accounting Plugin. I followed your documentation and even referenced your bubble demo to preview the settings. By the way, it seems like your live demo is not actually working (just an FYI). Below is a detailed account of exactly what I did (you might want to jump to step 8). I’ve gotten everything working to the point where a user would click on the “Connect to QuickBooks” button to authorize the account and then it would redirect back to my app and the URL would display the realmld.
I’m stuck with getting the repeating group and drop down to display the customer data from QuickBooks. I followed your bubble demo workflows and repeating group settings, and it still won’t work.
I created a new app in QuickBooks
Then in QuickBooks, I updated my URLs under Development > Keys & Oauth > App URLs. I clicked save and then it confirmed the change.
Then in QuickBooks I navigated to Development > Keys & Oauth > Redirect URIs. I then clicked “Add URI” and entered my redirect info. I clicked save and got confirmation.
After completing 1-3 above for Development mode, I completed all of the details for the settings and then completed the same steps for Production mode. Then I hit Save and got confirmation.
I went into bubble and navigated to my Plugins page. I clicked on the QuickBooks accounting plugin and added my ID and secret for both Dev and Production.
In bubble, I built a new page to test the QuickBooks integration. The page consisted of two items. The button to login through QB and a drop-down to display customer information.
I tested it out and it seems to link with my QuickBooks account. It redirects back to my page without any errors and the URL shows the “realmld” - Good - it seems to work this far.
However, I could not get my above drop-down to display info from QuickBooks. I looked over your bubble demo to review how ZeroCode set up the repeating group and workflows for login and decided to match it. So I added a repeating group and updated workflows as such:
- The customer info will still not show. I went back to QuickBooks to make sure I was searching for the correct type of info - which I am. Here’s a screen shot from the dummy QB account I created.
Note to people following along:
There’s two ZeroCode Quickbook apps - “Accounting” and “Authenticate”. Accounting is apparently for users of your app to link with their own QB data. Authenticate is apparently for only you to login to your QB account through your app (I’m guessing this would be for internal software use cases). I am starting with “Accounting” since I would like multiple users of my app to integrate with their own Qb account.
I found the fix.
Again, my repeating group was not showing information from QuickBooks. Everything else seemed to be working fine. My RealmID was displaying in the URL after I logged into QB and it redirected me back to my app. So the Oauth and redirect worked. I was in my bubble application with Authorization to view QB data…I just couldn’t view the data.
Here’s what I did incorrect:
I used the standard Data Source> API provider, (path)companyID, and (path)selectstatesment which came pre-set in the plugin.
What I should have Done (THE FIX!):
Thanks to the ZeroCode team (Excellent support so far). They helped me find the below solution. I’m on their forum getting help.
Since the DataSource> “(path) /companyID” should be dynamic, based on your user’s company ID in QuickBooks. I needed to remove the pre-set data and replace with dynamic data.
QuickBooks assigns a RealmID to each company using their software. This RealmID is transferred back to my application via the URL…yourdomain.com/apploginrealmID=xxxxxxxxxxxxxxx
I used bubble’s “Get data from page URL” feature to grab the realmID from the URL and then placed it dynamically into the “(path) /companyID”.
AND IT WORKS. Now anyone with a quickbooks account can authorize my application to view their company’s QB data through my app (in this case the customer list).
Right now I have the data displaying in a repeating group.
I need to figure out how to select the QB customer data and add it to a workflow. I would like to take the QB customer data and use it later in my application. Then, further down the road, I’d like to record activities and create invoices in QB.
more to come.
Since I’m able have users login to my app (normal username and PW), then click a button to “Connect to Quickbooks” which would display QB data via Oauth, I wanted to test and verify before moving to the next step.
This is where I ran into issues.
Sometimes Oauth will redirect back to my application perfectly and QB data will display in my app fine. Other time’s I run into these issues:
- While on mobile I’ve seen error code 400 “redirect ID invalid”. This seems to happen occasionally, I can just refresh and try again and the issue corrects itself.
- I get an error about the email already on another account for this email. Occasionally I can fix this by trying to connect QuickBooks multiple times, which creates the same RealmID and adds it to the URL (?realmId=xxxxxxxx&?realmId=xxxxxxxx&?realmId=xxxxxxxx&?realmId=xxxxxxxx&). Somehow this eventually works. There’s two known issues which might help explain this:
You can’t log into an app with a normal username and password and then press a button to authorize a login via another service. Bubble was built to log you out and then log you in under the quickbooks account credentials. There’s a couple threads on this already. Here’s one thread and here’s the other. You’ll see here that this is NOT the case anymore. Bubble will allow you to login via username and PW and then click a button to Oauth another service all while still logged in. (I’m not sure if this is confirmed - I occasionally get logged out).
It seems you can’t Oauth multiple bubble users to one quickbooks account. Here’s details on that.
I’ll continue to explore the issues on 1 and 2 above. I need to fix, or fully understand, both items before building workflows with QB data. Depending on how things work out, it might be a deal breaker for my app.
I’ve asked my team to look into this for you.
Let’s see how to get you there faster
We’ll get back to you here about the next steps!
We received same request on Zeroqode Forum and we’re working on there.
Thanks! For anyone else following along, or trying to solve a similar problem, here’s the link to my ZeroCode Forum Post.
Any update on this? I’m having the same error about not being able to link my account to this email because there is already an account for this email.
Hey @blake1! Glad to see someone else working on this. I’m still waiting to hear from Zeroqode, but have worked through a few issues myself. This might help:
Question: Can I Outh two traditional bubble users to one QuickBooks account? In other words: can BubbleUser1 and BubbleUser2 both Oauth to QuickBooks_XYZ_CompanyID?
Answer: According to @NigelG: you can only connect one bubble user to each Oauth account. Both BubbleUser1 and BubbleUser2 can NOT Oauth to the same QuickBooks company ID/ Account. In fact, if BubbleUser1 first uses my bubble app to Oauth QuickBooks_XYZ_CompanyID and then BubbleUser2 tries to use my bubble app to Oauth QuickBooks_XYZ_CompanyID - the login state will switch from BubbleUser2 to BubbleUser1.
@blake1 did you have any luck on this? I’m still struggling through the same error.
@ZeroqodeSupport can you help us understand this error:
Nope. I had it working for a while, then recently started getting this error.
Were you using the Zeroqode QuickBooks plugin? I’m wondering if the issue would continue if I bypassed the plugin and set up my own API. That seems a bit more challenging, so it would be helpful to know if you’re getting the error with a direct API anyway, .
Yes, using the Zeroqode plugin. I haven’t attempted to connect directly via API.
Hello @brad.h, @blake1,
Unfortunately, our team is still working on fixing the plugin. We continue to work on different approaches that could fix the plugin and do our best to provide a working solution at the first opportunity. Please accept our sincere apologies for taking so long with fixing the plugin! We will notify you when the updated version of the plugin will be available.
Thanks so much for sharing your progress here @brad.h!
Any progress on getting the plugin fixed @ZeroqodeSupport? I’m debating whether to start down this path with a direct API integration or whether to use the plugin.
I’m still waiting for the Plugin fix. Would love to hear if you succeed with the direct API.
I have been working on the direct Outh 2.0 with no plugin. I had it working for a while and now throws the same error as the plugin it looks. Email already connected error. :(. Seems to be a Quickbooks error.
How was the API set-up? Was it a pain? I think I’m taking that route too.
Absolute pain, here is the setup for Outh User-Agent flow that was working so you can eliminate the struggle I went through. I am trying to go manually handled without Outh-User Agent to see if that will fix it but no luck. Just a pain to get going! I will keep you updated though.
@schnetzlerjoe thank you! I’ve been looking for a screen shot. That’s a huge help.
Indeed, thanks for sharing. I’ll let you know if I make any progress…