Changes to the Shopify Product APIs

Earlier this month Shopify announced that the 2024-04 stable API release includes the new GraphQL product APIs that can support up to 2,000 variants per product. Previously the number of variants and options were fixed at 100 and 3. Our fmEcommerce Link (Shopify Edition) solution has only ever used the REST product APIs (not the GraphQL APIs) and only supports custom apps, so it would appear that these changes would have no impact on the fmEcommerce Link solution.

However Shopify announced at the same time that they are also deprecating the REST product APIs. This means that the REST product APIs are in maintenance mode; all new features and support will be built only for the new GraphQL product APIs. Everything will continue to work as it currently does and nothing will break, but developers should expect that the GraphQL API will be the only supported API over the long term.

This means that we will need to update the fmEcommerce Link solution to switch from using the current REST product APIs to the GraphQL product APIs. Over the next few months we will explore the changes required to switch from the REST product APIs to the GraphQL product APIs. We’re hoping the impact will be minimal and a case of simply updating the FileMaker scripts that make API requests related to products and variants.

We will be updating the fmEcommerce Link (Shopify Edition) v2 solution with these changes, so any customer that has purchased fmEcommerce Link (Shopify Edition) v2 and has a current maintenance plan will automatically receive access to the updated version. All fmEcommerce Link (Shopify Edition) customers receive 12 months of free updates – you can purchase an additional 12 months of updates from our online store if you original 12 months of updates has expired and you have not purchased another year of maintenance updates. If you’re not sure when access to free updates expires please get in touch and we will confirm your expiry date.

As the current REST product APIs are still supported by Shopify everything will continue to work as it currently does and there is no urgent need to update to the GraphQL API in the short term.

You can get more information about migrating to the new product model on the Shopify website here.

Fulfillment Orders and Fulfillments Changes in Shopify

With the release of the API version 2022-07 Shopify announced that anyone using their REST Admin API to fulfill orders using the Order and Fulfillment API endpoints would no longer be supported – this is now considered a legacy workflow. From API version 2023-04 all apps should be using the FulfillmentOrder object to manage fulfillments.

We’ve released a free updated to v2 of fmEcommerce Link (Shopify Edition) – v2.1.5 – which now supports the FulfillmentOrder API allowing you to download Fulfillment Orders for a Shopify order and create a Fulfillment for one or more Fulfillment Orders and upload this to Shopify.

Our support site has all the details for working with the Fulfillment Orders API. Existing fmEcommerce Link (Shopify Edition) v2 customers can download this free update from the link on your original order email (contact us if you need the link to be reset etc). The full list of changes in this version can be found here.

If you would like to see additional functionality using the new Fulfillment Shopify APIs please get in touch and let us know the details of what other features you need.

Custom apps now replace Shopify Private apps

In January 2022 Shopify announced that Private apps were now deprecated and that going forward you will now need to use Custom apps and authenticate with access tokens instead of using the API Key/Password and basic HTTP authentication that Private apps use. Existing Private apps can still be used and modified so if you have an existing Private app you do not need to take any action at this stage.

From February 2022 you can no longer add a new Private app to your Shopify store so you will need to create a Custom app instead and use the Access Token for authenticating with the Shopify Admin API.

We have updated v2 of fmEcommerce Link (Shopify Edition) to now work with Custom apps only going forward – given Private apps have been deprecated by Shopify and can no longer be added to a Shopify store it made sense to focus solely on working with Custom apps. It only takes a few minutes to create and install a new Custom app on your Shopify store and generate the Admin API access token. Version 2.1 of fmEcommerce Link (Shopify Edition) now works with Custom apps and access tokens and is a free update to all v2 customers.

If you have an existing integration or customised version of fmEcommerce Link (Shopify Edition) that you would rather update to support Custom apps and access tokens it is fairly straightforward to make the necessary changes. We’ve documented the process on our support site for both v1 and v2:

We’ve focussed on having to make the minimal amount of changes in these guides so you can make the switch from a Private app to Custom app as quickly as possible. In our updates to v2.1 we have taken the time to update the file and removed/renamed any fields etc that were used by Private apps, so the changes in our v2.1 file will look a bit different to the v2 update guide.

Version 2.1 now supports Custom apps only – you can also download this and copy/paste the updated script steps across if that will be easier for you. Existing customers can download this version from the link on your original order email (contact us if you need the link to be reset etc).

We have a short video on the fmEcommerce Link Videos page showing how to create a Custom app on the Shopify website.

You can get more information on Custom apps and authenticating with access tokens here:

fmEcommerce Link (Shopify Edition) Now Supports Creating Webhook Subscriptions

fmEcommerce Link (Shopify Edition), our FileMaker solution for integrating with the Shopify platform, has been updated to support creating webhook subscriptions using the Shopify Webhooks API. You can now use the fmEcommerce Link to:

  • create a new Webhook Subscription
  • update an existing Webhook Subscription (e.g. to change the URL address for the webhook)
  • delete an existing Webhook Subscription
  • download a list of all Webhook Subscriptions

The main advantage of using fmEcommerce Link to create new webhook subscriptions concerns the warning email notifications sent by Shopify when you webhook has continually failed to respond successfully. These notification emails are only sent when the webhook is created via the Shopify API and not when manually setup in the Shopify Admin screen.

Our support site has all the details for creating webhook subscriptions using the fmEcommerce Link (Shopify Edition) solution.

Shopify API Versioning and Deprecated API Calls

If you’re starting to see notifications from Shopify in your Shopify Admin site or via email that look like the following:

this is Shopify alerting you to some upcoming breaking changes in the supported version of the Shopify API. We’ve recently updated fmEcommerce Link (Shopify Edition) to include support for calling their new Deprecated API calls endpoint to quickly find out the details of which deprecated API calls your private app is making. See our support article for full details.

fmEcommerce Link (Shopify Edition) Webhooks and the FileMaker Data API

We’ve been progressively updating the Webhooks for our integration solutions to support the new FileMaker Data API and the latest to be updated is fmEcommerce Link (Shopify Edition).

The FileMaker Server Data API will replace the current XML and PHP APIs over time so we’re excited to include support for the Data API. Supporting the Data API also means you can now use Webhooks when your file is hosted by FileMaker Cloud for AWS, as well as FileMaker Server v17 or later. We’ve been testing these Data API Webhooks for the past few months with a FileMaker Cloud for AWS hosted solution and the PHP files running on Amazon Lightsail successfully.

The Data API is language agnostic – you can use whichever programming language you prefer here. We’ve gone with PHP for our examples as that is what we know best. Remember when working with the Data API you will need to enable the fmrest extended privilege for the Webhooks Privilege Set:

You’ll now find 2 folders in the Webhooks folder containing the php files for both the Data API Webhooks and the PHP API Webhooks:

Both folders contain the same 3 files:

  • webhookUpdateOrder.php
  • webhookOrderCancellation.php
  • webhookNewOrder.php

You’ll need to upload these to your chosen Web Server and then enter the URL for each Webhook that you plan to use in your Shopify settings – see our Webhooks page for further details on setting these up.

If you are just looking to use the Data API PHP files make sure you also update the Process Webhooks Order script and the Update Current Order from Shopify script as these have been updated to work with the Data API version of the Webhooks which work slightly differently to the existing PHP API ones.

We also include a few other updates with this release, including:

  • Product Variants: added example to download Product Variants
  • Products: added new fields to upload the SEO Title and SEO Description

Once again this is a free update to all existing customers (simply download using the same link that was on your original order email or if you created an account at the time of ordering you can login to our site and download it from your order history page). If you’re having any issues with downloading the new version please contact us if you need the link to be reset etc.

fmEcommerce Link (Shopify Edition) Update November 2019

We’ve just released another free update to fmEcommerce Link (Shopify Edition), our FileMaker solution for integrating your FileMaker solution with the Shopify platform. This update is mainly concerned with changes that Shopify have made to their API that require integrators to make some small changes to their API requests.

UPDATED 21 March 2020: Shopify have announced that due to the current COVID-19 situation and impact on businesses they have decided to postpone the April 1 version removal to July 1, 2020.

API Versioning: earlier this year Shopify announced that they were introducing API Versioning which allows them to introduce new versions of the API without breaking previous versions of the API. Versions will be released on a quarterly cycle, on the first of January, April, July, and October and are named after calendar dates, such as 2019-04 for the April 2019 release.

As a result of this change they require you to include the API Version in your HTTP request URLs. For example a request to the Orders Admin API endpoint currently looks like this:

/admin/orders.json

With API Versioning include it will look like this:

/admin/api/2019-10/orders.json

To support API Versioning we’ve added a new custom function – ShopifyAPIVersion – to store the API Version number which can be easily updated over time. We’ve also updated all the URLs that are generated to include this, for example:

$$fmShopifyWebsite  &  "/admin/api/" & ShopifyAPIVersion & "/customers/count.json"

Shopify do allow you to continue to call the Admin API with no version, and they will return with the oldest supported version. However, they strongly recommend that you start including version numbers in order to make your application version-aware and anchor your code to a specific set of features that are guaranteed to behave in the same way for the next 12 months.

If you want to read more about API Versioning we recommend the following Shopify pages:

Deprecation of Page-Based Pagination: as part of the changes to API Versioning Shopify are deprecating page-based pagination and changing to what they call cursor-based pagination. Some customers have already started receiving notification emails from Shopify about these changes warning them to update by April 1, 2020 to avoid breaking changes.

The 2019-07 and 2019-10 Release of the API include these changes and no longer support page-based pagination, and as the API version 2019-04 will be removed on April 1, 2020 you will need to update your requests to support cursor-based pagination before then. We’ve done all the hard work for you so you can copy and paste the changes across to your existing integration or simply download the latest version of the fmEcommerce Link (Shopify Edition) solution if you are using the fmEcommerce Link file without modifications.

A typical page-based pagination request looks like this:

$$fmShopifyWebsite  &  "/admin/customers.json?limit=" & $limit & "&page=" & $page

You can see the “page” parameter is specified here – support for this is being removed. Instead you will make an initial request specifying the “limit” as you currently do, and if there are additional pages of results Shopify will let you know by including a response header that looks like this:

Link: <https://acmecorp.myshopify.com/admin/api/2019-10/customers.json?limit=5&page_info=eyJsYXN0X2lkIjoyODYzOTIxMjM0MTIsImxhc3RfdmFsdWUiOjODAwMDAsImRpcmVjdGlvbiI6Im5leHQifQ>; rel="next"

If there is another page of results to request you can check for a “rel=”next” value and grab the associated URL to use as the URL for the next request. When there is no rel=”next” Link returned in the response headers you no longer need to make any further requests.

We’ve updated all the scripts that request multiple records from Shopify (Get All Customers, Get All Products etc) that were using page-based pagination to the new cursor-based pagination method. We’ve added a new custom function for the native branch (getNextLink) to capture the “next” URL, and for the plug-in branch we’re using the BE_HTTP_ResponseHeaders plug-in function to do this. We’ve updated these scripts to reference the “next” URL as follows:

and have added an additional variable to store the “next” URL after each request if it exists:

Finally we’ve changed the exit condition for the loop from referencing the page number to the existence of a “next” URL:

If you want to read more about cursor-based pagination we recommend the following Shopify pages:

If you don’t update to the new cursor-based pagination format and make a request to a version of the API that doesn’t support page-based pagination you will get an error like this:

User Customisable Maximum Results Setting: we’ve also added a new field in the Interface table (RecordsLimit) to allow you to specify the maximum number of results to return when downloading multiple records from Shopify. Previously we were hardcoding the $limit variable to 50 which is the Shopify default if no value is specified. They do allow a maximum of 250 which could prove more efficient when downloading large numbers of Orders, Products etc from Shopify:

The full list of changes are listed in the version history here. Existing customers can download this version from the link on your original order email (contact us if you need the link to be reset etc). As with previous updates if you are using one of the Database Design Report analysis tools like BaseElements or FMPerception you can use these to run a comparison report between your current version/integration and the new v1.5 release to identify the changes.

Create Order Fulfillments in Shopify with fmEcommerce Link (Shopify Edition)

We’re pleased to announce that you can now create Order Fulfillments in Shopify in the latest release of fmEcommerce Link (Shopify Edition). We’ve added the ability to create a Fulfillment record in fmEcommerce Link for one or more Order Items in v1.4 which was released today:

You can enter the Tracking Company (select from a list of known Tracking Companies), Tracking Number and optional Tracking URL and select the Location that the Fulfillment will ship from. Clicking the Upload to Shopify button on this window will create a new Fulfillment in Shopify or update an existing one if you’re making a change to a previously uploaded Fulfillment.

The Fulfillment will be created in Shopify and save you from having to update Orders in both Shopify and FileMaker when it comes to managing Order Fulfillments:

Once again this is a this free update to all our existing customers who can download this version from the link on your original order email (contact us if you need the link to be reset etc). Here’s a video that demonstrates uploading an Order Fulfillment from fmEcommerce Link (Shopify Edition) – you can also watch it on YouTube here:

fmEcommerce Link (Shopify Edition) Now Runs Natively on FileMaker 16/17 Platform and supports Order Creation Webhooks

 

We’re pleased to announce that v1.3 of fmEcommerce Link (Shopify Edition) is now available and includes a number of new features, including native support for FileMaker Pro v16 and later. This is a free update to all existing customers (simply download using the same link that was on your original order email).

With the release of the FileMaker 16 platform we got a number of new functions and script steps, including support for working with JSON data and being able to specify supported cURL options with the Insert From URL script step. These new features meant that we were no longer dependent on plug-in functions and we could replace these with native FileMaker features.

We’ve updated all the requests for downloading and uploading to the Shopify API to use native FileMaker functions and script steps so you no longer need to use a FileMaker plug-in if you’re using FileMaker Pro v16 or higher. This means you can also use fmEcommerce Link on FileMaker Go natively (requires FileMaker Go 16 or higher).

Like our previous updates for native FileMaker functionality for our other products we’ve simply updated the scripts to check which version of FileMaker Pro, FileMaker Go or FileMaker Server is being used and if you’re using v15 or earlier we simply use the previous plug-in functionality, and if you’re using v16 or later we now use native functionality. Everything works exactly the same regardless of which version of FileMaker Pro you’re using, but we can now include support for FileMaker Go as well as having one less dependency to worry about.

This release also includes support for Shopify Webhooks – see our earlier post for a short video demonstrating how the Order Creation Webhook works. Instructions for setting up the Order Creation Webhook can be found here.

You can get all the details on our version history page – we’re continuing to work on adding native FileMaker 16 support to our other products, as well as some further updates to fmEcommerce Link (Shopify Edition) including support for processing Fulfilments in FileMaker and uploading to Shopify.

fmEcommerce Link (Shopify Edition) and Webhooks

We will be releasing a new version of fmEcommerce Link (Shopify Edition) in the next few days – this is our long awaited update that includes native functionality for the FileMaker v16 platform and later so you don’t need to use a plug-in anymore. This means you can use the fmEcommerce Link solution on any FileMaker client application: FileMaker Go, FileMaker Pro/Pro Advanced, FileMaker Server and FileMaker WebDirect.

As part of this update we’re also including a number of features that have been requested by our users, including support for Shopify Webhooks. Webhooks allow you to trigger an action when a specified event happens on your Shopify store. Our first webhook will be an ‘Order Creation’ webhook which will send the Order details automatically to your fmEcommerce Link file and create the Order automatically without you having to manually download the Order.

You could setup a FileMaker Server schedule that ran every x minutes that checked for new orders since a specified timestamp, but it’s much more efficient to leverage Webhooks if they are available and receive notifications when new orders are created on your store.

We’ll be releasing a free update to fmEcommerce Link (Shopify Edition) later this week which will include support for Webhooks when a new Order is created. You will need to setup a Webhook and install the supplied PHP file on your FileMaker Server (you will need to enable Custom Web Publishing/PHP in your FileMaker Server Admin Console), and once this in place anytime a new Order is received in Shopify it will automatically be pushed to the fmEcommerce Link file, typically within a few seconds. N.B. your webhook address must use HTTPS – HTTP addresses are not supported by Shopify.

You can get more information about Shopify Webhooks at the following links:

https://help.shopify.com/en/api/getting-started/webhooks

https://help.shopify.com/en/api/getting-started/webhooks#through-store-admin

Here’s a short video demonstrating this in action (you can also watch this on YouTube here). If you have any other Webhooks you would like us to support please let us know.