WooCommerce Webhooks using OttoFMS

OttoFMS from Proof+Geist can be used to receive webhooks from WooCommerce and have new WooCommerce Orders pushed automatically to your fmEcommerce Link (WooCommerce Edition) file. You will need to make a few small modifications to your copy of fmEcommerce Link (WooCommerce Edition) - we've added support for OttoFMS webhooks in v2.0.8 of fmEcommerce Link (WooCommerce Edition). 

If you're using an earlier version of fmEcommerce Link the required changes are outlined on the OttoFMS website here and include creating a new layout, 2 new fields and 1 new script. You can copy/paste the OttoReceiver script from the v2.0.8 file to your file. Your new OttoReceiver layout (based on the Orders table) should look like this:

In the following example we will show you how to create an OttoFMS webhook to receive new order notifications from WooCommerce (similar to the webhookNewOrder.php file). You can also adapt this for other supported webhooks such as order updates and new customer/customer updates.

Once you've made the necessary changes you need to register a new webhook in the OttoFMS web console - follow the instructions here to register a new webhook.

When registering the new webhook for the fmEcommerce Link (WooCommerce Edition) file you can use the same FileMaker account that the webhookNewOrder.php file uses here as it has the required access privileges for receiving incoming webhooks via the Data API.

When registering a new webhook you'll first be prompted to select your FileMaker file and enter the FileMaker Username and Password to use:

The webhook you create should look like the following screenshot:

Once you've registered the new webhook the OttoFMS Webhook Registry should look like this:

Once you've registered the webhook click the three dots icon to the right of the webhook entry and select View/Test to view the webhook, then click the copy button to copy the Webhook URL. The Webhook URL should look something like this:

https://otto-server-url/otto/receiver/fmEcommerce Link (WooCommerce Edition).fmp12/woocommerce?apiKey=dk_5N66CXH2mb9cHfwrsAp5ZEM8y0njnJRF

You now need to test the webhook trigger by creating a webhook on the WooCommerce site for a new order. You can follow the WooCommerce instructions on how to setup Webhooks – make sure you select the appropriate option for the Topic (e.g. for the New Order webhook select Order Created for the Topic) and enter the Otto Webhook URL in the Delivery URL field. Once you have created and saved the Webhook it should look something like this:

After you have saved your webhook you will need to enter a new test order on your WooCommerce store to trigger the webhook. N.B. in our experience it can sometimes take a few minutes for WooCommerce to send the webhook request to Otto so please make sure you wait a few minutes. You should see the new order created and the data for the order populated into the appropriate fields - the OttoReceiver layout should look like this for the newly created record:

Still need help? Contact Us Contact Us