Shopify Webhooks using OttoFMS

OttoFMS from Proof+Geist can be used to receive webhooks from Shopify and have new Shopify Orders pushed automatically to your fmEcommerce Link (Shopify Edition) file. You will need to make a few small modifications to your copy of fmEcommerce Link (Shopify Edition) - we've added support for OttoFMS webhooks in v2.1.8 of fmEcommerce Link (Shopify 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.1.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 Shopify (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 (Shopify 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 (Shopify Edition).fmp12/shopify?apiKey=dk_4BsGFPq6lxcVRBA4boQAocnaK7G4t7ys

You now need to test the webhook trigger by creating a Shopify webhook on your Shopify store for a new order. fmEcommerce Link (Shopify Edition) supports creating webhooks from within the fmEcommerce Link file as well as those created on the Shopify website. We recommend creating the webhook on the Shopify website as you can send a test notification without having to enter a new test order. You can find instructions for creating a webhook on the Shopify admin page for your store here. Make sure you select the appropriate option for the Event (e.g. for the New Order webhook select Order creation) and enter the OttoFMS 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 scroll to the right and click the Send test notification button to send a sample webhook to your OttoFMS webhook URL:

Shopify will send a sample request to the Otto webhook URL to confirm that it is responding correctly. You should see the new order created and the data for the order populated into the appropriate fields - the the OttoReceiver layout should look like this for the newly created record:

You can also test this is working successfully by entering a test order on your Shopify store and confirming that the order record was created and the data for the order populated into the appropriate fields.

Still need help? Contact Us Contact Us