pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

QuickBooks Webhook Sources

Open celestebancos opened this issue 4 years ago • 13 comments

This is a custom webhook source for QuickBooks that allows the user to choose which entities to emit (e.g. Invoices, Bills, Purchase Orders) as well as which operations to emit and which to ignore (e.g. Created, Updated, Emailed)

Since the contribution guidelines encourage creating components that address specific use-cases, I also created a source that is hard-coded to emit only Customer events. This file can be a template for creating other sources that are specific to different entities but I figured I’d better first get feedback on what I currently have.

Instead of creating separate sources to handle New Customers, Updated Customers, Deleted Customers, etc. I put all the operations into one source with a prop to allow the user to customize which operations are emitted.

Webhook Setup

I searched for a way to subscribe to webhooks programmatically but unfortunately it looks like setting up QuickBooks webhooks requires a complicated manual process. The worst thing is that this has to be done for each endpoint the user wants to connect to — you have to create a new App in the Intuit Developer Dashboard and authenticate it with your QB company before any webhooks are sent to the new endpoint. It’s a big hassle.

I wrote a step-by-step guide and included a link in the source descriptions to give users all the info in one place so they don’t have to go spelunking through the official QB documentation.

Source Names

I included the list of operations (Created, Updated, Merged, Deleted, Voided or Emailed) in the source names so that they’d be searchable when the user is typing what source they want. Let me know if it would be better to use shorter names. I wish the description was searchable so the names could be simpler while still having the applicable source appear if someone types in e.g. “Email Purchase Order”

Props

Once the QB app is set up on Intuit Dashboard, the user receives a verifier token that they can paste into the source config to make sure incoming webhooks are actually from QuickBooks.

The user can configure which entities and operations they want to emit and which to ignore. I set it up so that if they leave these props empty, everything will be emitted. Otherwise it’s kind of a pain to switch between emitting just a few items to emitting everything on the long list of entities because you’d have to click each option individually to select or deselect.

celestebancos avatar Aug 09 '21 03:08 celestebancos

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

pipedream-docs-redirect-do-not-edit – ./docs

🔍 Inspect: https://vercel.com/pipedreamers/pipedream-docs-redirect-do-not-edit/6Fb3caQy4zzuJNGYAo1q3NUejPKK
✅ Preview: https://pipedream-docs-redirect-do-not-edit-git-for-db2ec4-pipedreamers.vercel.app

pipedream-docs – ./docs

🔍 Inspect: https://vercel.com/pipedreamers/pipedream-docs/7AsTJD2naxhNgMG5Y7uMzbMRnJ81
✅ Preview: https://pipedream-docs-git-fork-celestebancos-quickbooks-pipedreamers.vercel.app

vercel[bot] avatar Aug 09 '21 03:08 vercel[bot]

@celestebancos I just wanted to say thanks for submitting this. We're working through a few other PRs at the moment and will review this ASAP!

dylburger avatar Sep 01 '21 05:09 dylburger

@dylburger Thank you!

celestebancos avatar Sep 01 '21 13:09 celestebancos

@celestebancos we haven't forgotten about this, I should be able to review for you next week. In the meantime, if you haven't already, please merge in the latest master, rerun eslint, and fix any issues that it flags.

compwright avatar Sep 22 '21 19:09 compwright

@compwright Thank you for the update!

Along with fixing the new ESLint issues, I added a new action for downloading records (such as invoices and purchase orders) as PDFs.

celestebancos avatar Sep 26 '21 18:09 celestebancos

@js07 Thank you for the review! That's a bummer that the QB webhooks weren't working for you. It's so frustrating that Intuit makes it such a complicated process for developers to set up. I remember getting an email a little while back about a new (and even more complicated) approval process they want to put in place for apps, so maybe they've made some changes on their end that are interfering. I'll have to take a look and see if I find any answers.

In the meantime I've made the changes you suggested for the Download PDF action.

I have a QuickBooks source that uses polling instead of webhooks. If I have time in the next week or two, I'll see about polishing that up to submit in a new pull request.

I also have some Airtable and Zoho CRM/Docs actions in the works that I hope to contribute at some point :)

celestebancos avatar Nov 13 '21 23:11 celestebancos

I also have some Airtable and Zoho CRM/Docs actions in the works that I hope to contribute at some point :)

You are amazing and we appreciate all the contributions, Celeste!

dylburger avatar Nov 15 '21 04:11 dylburger

@js07 Thank you again for reviewing. I made a few changes in addition to the ones you suggested:

  • I added a bit of error handling to the Download PDF action to give the user a hint if they enter an invalid record ID and get a 400 response.
  • I completely removed the sendHttpResponse() method from common.js since I realized I only needed it for testing purposes.

celestebancos avatar Dec 12 '21 00:12 celestebancos

@js07 can you tell how much work is left in order to wrap this up?

dannyroosevelt avatar Mar 18 '22 20:03 dannyroosevelt

@js07 can you tell how much work is left in order to wrap this up?

Looks like there are just a few changes left.

js07 avatar Mar 18 '22 23:03 js07

I noticed that some apps like Slack and Zoom use an $.interface.apphook prop to create a single webhook for all users' sources, and Pipedream internally routes events to individual sources.

The current sources in this PR require users to manually create a new App in the Intuit Developer Dashboard for each new event source. Could an app hook be used instead to simplify creating QuickBooks webhook sources?

js07 avatar Mar 18 '22 23:03 js07

Hello @celestebancos @js07, since this PR has been hanging for quite a while, I suggest we move this back to TODO and have our component dev to take over in a new PR. What do you think?

vunguyenhung avatar Jul 29 '22 14:07 vunguyenhung

Hello @celestebancos @js07, since this PR has been hanging for quite a while, I suggest we move this back to TODO and have our component dev to take over in a new PR. What do you think?

@vunguyenhung Moving this back to TODO sounds good.

Supporting webhook sources for QuickBooks via a Pipedream app (https://github.com/PipedreamHQ/pipedream/pull/1564#issuecomment-1072885733) requires apphook (internal) changes, so we may want to create a separate issue for QuickBooks Webhook Sources and mark it as blocked.

js07 avatar Jul 29 '22 15:07 js07

Thank you so much for explaining @js07, I have moved this ticket back to TODO, and created a Github issue to track our internal changes here https://github.com/PipedreamHQ/pipedream/issues/3916

vunguyenhung avatar Aug 01 '22 15:08 vunguyenhung