fmEcommerce Link (WooCommerce Edition) Frequently Asked Questions

What versions of FileMaker Pro/Pro Advanced does fmEcommerce Link (WooCommerce Edition) require?

fmEcommerce Link (WooCommerce Edition) currently works with FileMaker Pro/Pro Advanced v12, v13, v14, v15, v16 and v17. We continue to develop fmEcommerce Link (WooCommerce Edition) and will ensure it works with future releases of FileMaker Pro.

What version of WooCommerce and WordPress is required?

fmEcommerce Link (WooCommerce Edition) works with WooCommerce v3.0 or later and requires your WooCommerce site to be using HTTPS (i.e. you will need to have an SSL certificate installed for your WooCommerce website).

It does not work with earlier versions of WooCommerce (e.g. v2.6 or earlier) or WooCommerce sites using HTTP.

WordPress 4.4 or later is required, along with Pretty permalinks in Settings > Permalinks so that the custom endpoints are supported. Default permalinks will not work.

What is the difference between v1 and v2 of the WooCommerce REST API?

WooCommerce 3.0 introduced a new version of the REST API – v2 – whilst also maintaining support for v1 of the REST API (v1 is now deprecated). The WooCommerce v2 REST API includes the following changes:

  • Support for meta data on most endpoints (custom fields)
  • New variations endpoint for creating and updating variations
  • Shipping zones endpoints
  • Payment and shipping methods endpoints

WooCommerce v2.6 only supports the v1 REST API. The API documentation for each API can be found here:

Can I use fmEcommerce Link (WooCommerce Edition) with FileMaker Server scripts/Perform Script on Server?

Yes you are able to use FileMaker Server scheduled scripts or Perform Script on Server to interact with your WooCommerce online store. You would simply need to create “server compatible” script steps using the examples in the fmEcommerce Link (WooCommerce Edition) file.

Is FileMaker Pro Advanced required?

FileMaker Pro Advanced is only required to copy/paste the Custom Functions that fmEcommerce Link (WooCommerce Edition) file uses when you are integrating this into your own FileMaker solution file. Otherwise you can use both FileMaker Pro and Pro Advanced when using the fmEcommerce Link (WooCommerce Edition) functionality.

Does fmEcommerce Link (WooCommerce Edition) use a plug-in?

Version 1.5 of fmEcommerce Link (WooCommerce Edition) runs natively under FileMaker Pro/FileMaker Go v16 or later and does not require a plug-in. If you are using FileMaker Pro v15 or earlier a plug-in is required as FileMaker Pro v15 and earlier do not have the required functions to integrate with the WooCommerce API.

Is FileMaker Go supported?

Version 1.5 of fmEcommerce Link (WooCommerce Edition) runs natively under FileMaker Go v16 or later as it does not require a plug-in.

Earlier versions of FileMaker Go do not have the required functions to integrate with the WooCommerce API, so a FileMaker plug-in is currently required. This means that you cannot natively use FileMaker Go to communicate with the WooCommerce API as FileMaker plug-ins aren’t supported under FileMaker Go, however there is a solution. If the fmEcommerce Link file (or your FileMaker database that you integrate it with) is hosted by FileMaker Server you can use the server side features of FileMaker Server to communicate with the WooCommerce API (server side scheduled scripts or Perform Script on Server) as FileMaker Server can use plugins.

What’s the best way to integrate this into my existing FileMaker solution?

How you go about integrating the functionality from the fmEcommerce Link (WooCommerce Edition) file is entirely up to you – as the file is completely unlocked you get to go behind the scenes to learn how to handle the authentication, uploading, downloading etc and then recreate that in your existing FileMaker solution. Based on feedback from customers there have been three main ways they have approached the integration:

Linking – this involves using the fmEcommerce Link file as a ‘interface’ or front-end file to your existing FileMaker file. This is a relatively quick way to get up and running – you relink the table occurrences to reference the matching tables in your existing FileMaker file and then update the layouts and add any new fields (such as the ‘WooCommerce ID’ fields and the POST data calculation fields). You also need to update any field references in scripts and create any new value lists.

Use the fmEcommerce Link file as a Controller File – this involves downloading data to the fmEcommerce Link file from WooCommerce (e.g. new Orders each day) and then pushing that data from the fmEcommerce Link file to your existing FileMaker file. This is also a relatively quick way to get up and running – you simply write some additional scripts in the fmEcommerce Link file to push to push Customers, Orders, Order Items etc across to your file. To prevent duplicate Customers from being created you would create a ‘WooCommerce Customer ID’ field to store the WooCommerce Customer ID value in your FileMaker solution, otherwise everything else happens in the fmEcommerce Link file. You could then do an download once a day of all Orders received in WooCommerce and push them to your primary FileMaker solution.

Embedding – this is the most complex and time consuming type of integration as it involves recreating the required functionality from the fmEcommerce Link file in your existing FileMaker solution. Our integration guide covers the high level steps that you need to take and the order in which to complete them. Most of the code can be copied and pasted, however you will need to manually create some relationships, table occurrences and valuelists. You can typically be up and running with authentication and downloading a Customer/Order in around 4 – 8 hours depending on the complexity of your existing FileMaker solution.

If you do decide to use the fmEcommerce Link file you will have to create and manage any required FileMaker Accounts and Privilege Sets.

Is there any documentation to help us get started with using the fmEcommerce Link (WooCommerce Edition) file?

Yes – we have a dedicated Getting Started page. We also have a Videos page which illustrate particular aspects of the using fmEcommerce Link (WooCommerce Edition).

Can I upload Product Images using fmEcommerce Link (WooCommerce Edition)?

WooCommerce supports two ways of uploading Product Images:

  1. you can enter the URL for an Image and WooCommerce will download that Image when uploading a Product. That URL must be publicly accessible and point to a valid image file (e.g. .jpg, .png etc)
  2. if you have already uploaded an Image to your WordPress site you can simply reference the WordPress ID for a Product Image and WooCommerce will link to that existing Image when uploading a Product

We have a video demonstrating Product Image uploads on our Videos page. N.B. the WooCommerce API does not currently support directly uploading videos stored in a FileMaker container field.

After uploading some Product Images I now have duplicate images in my WordPress Media Library. Do you know what is causing this?

When you first upload a Product Image by entering the URL to that image WooCommerce will download that image into the WordPress Media Library and store this alongside all you other WordPress media files. To prevent duplicate copies of Product Images from being uploaded make sure you do either of the following:

  • after uploading a Product Image enter the WordPress ID for that image into the ID field on the Product Images tab (see our video on upload Product Images for further details)
  • after uploading a Product Image click the Update Product from WooCommerce button which will delete all Product data and download the latest version from WooCommerce, including the Product images and their WordPress IDs.

Does fmEcommerce Link (WooCommerce Edition) support WooCommerce Webhooks?

We currently have support for the Order Created Webhook – this automatically creates a new Order in the fmEcommerce Link file whenever a new Order is created in WooCommerce. You can get further details and instructions on setting this up here.

I’m getting this error when attempting to download from WooCommerce: “Sorry, you cannot list resources” ?

If you are getting an error like this when attempting to download from WooCommerce:

{
“code”: “woocommerce_rest_cannot_view”,
“data”: {
“status”: 401
},
“message”: “Sorry, you cannot list resources.”
}

and you have entered the correct HTTPS URL, Consumer Key and Consumer Secret you can try disabling the option to use HTTP Basic Auth in the Setup screen:

Occasionally some servers may not parse the Authorization header correctly so try disabling this option and trying again – this switches to providing the consumer key/secret as query string parameters instead.

If you’re still having problems making requests to the WooCommerce API this article has some good suggestions for resolving common WooCommerce REST API issues. For some customers we have had to specify the UserAgent as part of each request to work around issues with some WordPress security plugins.

I’m getting this error when attempting to upload a new Product to WooCommerce: “Invalid parameter(s): backorders”,”data”:{“status”:400,”params”:{“backorders”:”backorders is not one of no, notify, yes.”}”

There are a number of mandatory fields that are required when creating a new Product and uploading it to WooCommerce. There is no official list on the WooCommerce website that we have found but from our testing the following fields are required for creating new Products:

  • type
  • status
  • catalog_visibility
  • tax_status
  • backorders

Some of these fields require specific values as well, so make sure you select from the menus to ensure you are uploading a valid value.

Does fmEcommerce Link (WooCommerce Edition) support Product Variations?

Yes – you can download, update and upload Product Variations. In the fmEcommerce Link (WooCommerce Edition) REST API v1.fmp12 file each Product Variation is another record in the Products table linked to the parent/master Product record. You can set the same attributes that you can via WooCommerce:

In the fmEcommerce Link (WooCommerce Edition) REST API v2.fmp12 file variations are stored in their own table and can be uploaded/download separately to their parent Product record:

Can I filter the GET Orders request by additional parameters ?

Yes – most of the WooCommerce REST API endpoints accept additional parameters to filter the returned set of Orders. We have an example of this in the fmEcommerce Link file when filtering the Orders between 2 dates. The request $url for this looks like this:

https://www.acme.com/wp-json/wc/v1/orders?after=2017-02-01T00:00:00Z&before=2017-02-28T23:59:59Z&page=1

If you would like to filter by date modified your request would look like this:

https://www.acme.com/wc-api/v1/orders?filter[updated_at_min]=2017-02-22&filter[updated_at_max]=2017-03-25

To filter Orders by Status your request should look like this:

https://www.acme.com/wp-json/wc/v1/orders?status=processing

This website has some further examples and tips on using parameters and filtering WooCommerce Orders using the REST API.

Can I upload an update to a Tax Class or download an updated Tax Class?

No – Tax Classes in WooCommerce don’t have an ID that uniquely identifies them, so it’s not possibly to push updates to a Tax Class or identify a unique Tax Class to download. You can only download all Tax Classes or upload a new Tax Class.

I’ve added additional Custom Fields to my WooCommerce pages – will these be included when downloading an Order via the REST API?

Custom fields are not automatically included in the v1 REST API output. POST meta (custom fields) need to be added to the REST API output before they would display within that as they are not automatically passed to the API. If you are a WordPress developer or have access to one WooCommerce have recommended this website as a starting point (the WooCommerce REST API uses the WordPress Core Software REST API so changes need to be made to WordPress to enable this functionality).

The v2 REST API now returns additional Meta Data for most API endpoints including Customers, Orders, and Products. In our testing custom fields that were added to WooCommerce pages are included in the Meta Data for that endpoint (e.g. Orders). This screenshot shows the Meta Data for an Order which includes the shipping phone number field which was added as a custom field to the checkout page:

I’m having trouble deleting Meta Data when uploading to WooCommerce?

If you have Meta Data associated with a WooCommerce record, such as a Customer, Product or Order and you wish to delete this from WooCommerce you must clear out the values for the Meta Data and upload that to WooCommerce and pass a null value. You cannot delete the Meta Data records in fmEcommerce Link and upload that to WooCommerce as it will not delete the Meta Data that exists; furthermore you cannot delete all existing Meta Data by simply uploading an empty array like this:

"meta_data" : [],

Just make sure you delete the Key and Value field values in FileMaker – make sure you leave the WooCommerce Meta Data ID – and it will clear these from WooCommerce on your next upload.

Does fmEcommerce Link (WooCommerce Edition) support Custom Product Attributes?

To streamline data entry when entering Product Attributes we use FileMaker Pop-up menus to allow you to select from the list of Attributes for your store and then the list of related Options for the selected Attribute. Using Pop-up menus ensures that only valid Attributes and Options are selected during data entry, but doesn’t allow for the entry of Custom Product Attributes.

It’s easy to modify the ProductAttributeOptions Popup layout to allow for entry of Custom Product Attributes as follows:

  1. make the Name field at the top of the layout accessible in Browse mode using the Inspector
  2. select the Option field on the ProductAttributeOptions portal and tick the “Allow entry of other values” box in the Inspector

This screenshot shows what the popup window might look like with these change in place when entering a Custom Product Attribute:

N.B. the Attribute Name field doesn’t appear on the ProductAttributes portal on the Products Form layout, so you won’t see the Attribute Name for Custom Product Attributes by default. You can add this field to the portal if required.

Can I access my Store via the API whilst updates are being installed ?

Whenever you update plugins or WordPress itself your website is taken offline temporarily – visitors to the site will see the standard message that the site is “Briefly unavailable for scheduled maintenance. Check back in a minute”.

API requests to the site will also fail with an HTTP response code of 503 (Service Unavailable). Once the updates are finished installing you will be able to make API requests again successfully.

I’m not familiar with the technique that you’re using to create records when downloading data from WooCommerce – can you explain how this works?

When downloading data from WooCommerce if we need to create records in another table (e.g. Customers, Orders etc) rather than constantly changing layouts to create new records in the correct table we’re using a technique that allows you to create related records via a relationship that has the “Allow creation of records in this table via this relationship” enabled for the relationship.

This technique is also known as the “Magic Key” technique and is also used when implementing support for database transactions in FileMaker. You can read more about this technique at these websites:

Is there a list of changes in each version of fmEcommerce Link (WooCommerce Edition)?

Yes – to see what’s new with each update check out the fmEcommerce Link (WooCommerce Edition) version history log

If you have any questions about fmEcommerce Link (WooCommerce Edition) please contact us and we’ll get back to shortly.