QuickBooks Online Webhooks using Claris Connect App

You can use Claris Connect to create a flow to handle incoming webhooks from QuickBooks Online and receive notifications about certain events. This is a much simpler process than using the supplied PHP file for the FileMaker Data API as you don't need to worry about hosting the files and dealing with web servers and PHP configuration changes etc. You can setup a new Claris Connect Flow in a few minutes which can receive incoming webhooks from QuickBooks Online: for example when a Payment, Invoice or Customer has been created/updated in QuickBooks Online.

For information on the supported versions of FileMaker Server/FileMaker Cloud and other minimum requirements please see our Claris Connect Webhooks FAQ article.

We have added some new scripts to fmAccounting Link (QuickBooks Online Edition) v1.15 which is required by the Claris Connect flow. We've included scripts to work with the following QuickBooks Online event triggers:

  • Customers: create and update
  • Invoices: create and update
  • Payments: create and update

You can easily add support for additional event triggers by following the pattern we have used in our FileMaker scripts.

To add support for Webhooks to an earlier version of fmAccounting Link you can copy/paste the following scripts into your older fmAccounting Link file:

processQuickBooksOnlineWebHookClarisConnect

Webhooks - Update Current Customer from QuickBooks

Webhooks - Update Current Invoice from QuickBooks

Webhooks - Update Current Payment from QuickBooks

You'll also need to add the following layouts that are referenced by these scripts:

Webhooks

WebhooksCustomers

WebhooksInvoices

WebhooksPayments

In the following example we will show you how to create a Claris Connect flow to receive notifications from QuickBooks Online for one of the supported event triggers such as a change to a Customer, Invoice or Payment (similar to the fmAccountingLinkWebhook.php file). You can also adapt this for other supported event triggers.

To setup a new Claris Connect Flow to receive incoming webhooks from QuickBooks Online in the Production environment:

  1. login to Claris Connect and create a new Project and give the Project a Name (e.g. QuickBooks Online Webhooks)
  2. click the Create New Flow button
  3. search for QuickBooks in the list of triggers and click on the QuickBooks app:

Do NOT select the QuickBooks (deprecated) app as that only supports the Production environment. The newer QuickBooks app supports both the Production and the Sandbox environment.

4. select the required QuickBooks trigger action - e.g. Payment created - and click Continue:

5. you will be prompted to sign into your QuickBooks account and approve access to your selected QuickBooks Company and choose whether to connect to the Sandbox or the live Production environment:

You should be prompted to approve the connection between Claris Connect and your QuickBooks Online Company:

6. after successfully signing in click Continue:

You will then be prompted to test the selected Trigger in QuickBooks so a notification will be sent from QuickBooks. Login to QuickBooks in another browser window and perform the requested action (e.g. creating a new Payment in the following screenshot for the Payment created trigger):

After the action has been performed in QuickBooks and sent to Claris Connect it should show the Success message: 

Click Save Trigger once this has been successfully tested.

7. you now need to add another action to the Claris Connect Flow which will create a new record in the Webhooks table in the fmAccounting Link (QuickBooks Edition) file and populate the relevant fields with data from the incoming webhook. Click the + button and select Action to add a new Action:

In the list of apps search for 'FileMaker' and select the appropriate option for where your copy of fmAccounting Link (QuickBooks Edition) is hosted:

You will then be prompted to authenticate with your Claris FileMaker server (the process is slightly different for each option):


You can use the same FileMaker account that the fmAccountingLinkWebhook.php file uses here as it has the required access privileges for receiving incoming updates via the Data API. After you have successfully authenticated click the Continue button:


After selecting the appropriate Claris FileMaker option click Continue choose the Create record option and click Continue:

8. you then need to choose the FileMaker layout to use - select the Webhooks layout which is the same layout the PHP file uses and has the necessary fields:

To map the QuickBooks Webhook data to the matching FileMaker field click the blue icon to the right of the following fields and select the option from the list (you should see the data from your QuickBooks webhook notification):

We are replicating the same behaviour as the fmAccountingLinkWebhook.php file - a new record is created in the Webhooks table and the Payload field is populated with the complete body of the webhook JSON data.

Click the Save button - your Flow should now show the following 2 actions:

9. We now need to add another Action to retrieve the newly created Webhook record to get the value of the _kp_WebhookID field in the Webhooks table which we will be using as a script parameter in a subsequent step. Click the + button to the right of the Create record action and select Action. We are going to select the same FileMaker app that we used for the previous action. Select your FileMaker Server that was previously created which should appear under Your Apps and click Continue. Select the Get record by ID option and click Continue:

Then click the Continue button at the next screen. Select the Webhooks layout again and for the Record ID click the blue icon to the right of the field and select recordid option from the list. It should look like the following screenshot:

Click Save to return to the flow summary. You should now have the following steps:

10. We now need to add another Action to perform a FileMaker script after the new Webhook record has been created by the webhook and the Get record by ID action has been performed.. Click the + button to the right of the Get record by ID action and select Action:

We are going to select the same FileMaker app that we used for the previous action. Select your FileMaker Server that was previously created which should appear under Your Apps and click Continue. Select the Execute script option and click Continue:

Then click the Continue button at the next screen. Select the Webhooks layout again and the processQuickBooksOnlineWebHookClarisConnect script. For the Script parameter we are going to pass in the value from the _kp_WebhookID for the newly created record in the Webhooks table which you can select from the QuickBooks payload as you previously did by clicking the blue icon to the right of the Script parameter field and clicking on Step 3 Get record by ID to locate the _kp_WebhookID field:

It should look like the following screenshot once you have made your selections:

Click the Save button - your Flow should now show the following 4 steps:

You can now toggle the Disabled option to Enabled - you will receive the following prompt:

Click Save to make your Flow active. You can now test this is working successfully by performing the same action in QuickBooks that you completed at Step 6 above and you should see the new Webhook record created and the data for the webhooks populated into the appropriate fields and the matching record either update or created.

You can replicate this Claris Connect flow for the other support triggers as required (Customer created/updated, Invoice created/ updated and Payment created/ updated).

Still need help? Contact Us Contact Us