Adding Metafields To Your Order

You can add Metafields to your order whether they are defined in Shopify, set up in Shopify without a definition, or EZ Importer can create the Metafield during import.  You can read more about Metafield definitions in Shopify's documentation.

Added Metafields That Have A Definition In Shopify

Once you have the Metafield defined, you can add it to your order by mapping the Metafield to a column in your file using the Metafield Configuration on your data mapping.  You must add the Metafield by its namespace and key set up in Shopify.

Below you can see how the customer.sales_rep Metafield is defined in our Shopify admin.

You'll know if your Metafield was successfully added to your order as Metafields defined in Shopify will be displayed on the Orders page in your Shopify admin.

Adding Metafields That DO NOT Have A Definition In Shopify

Not all Metafields will have a definition in your Shopify admin.  The Metafield may not even be set up in Shopify at all.  This is okay; EZ Importer can still add these Metafields to your order.  If you have a Metafield not defined or set up in Shopify, you must select the Metafield type when configuring your Metafields on your Data mapping.

If the Metafield is not already set up in Shopify, it will be added to the Metafield without a definition section in your Shopify admin.  If the Metafield is already set up, there is nothing else you need to do.  Below is how the Metafield will look in your Shopify admin.

Do note that if you add Metafields to your order and do not have a definition, they will not be displayed on the order.  You will have to click the Show All button on the Metafields section at the bottom of the order, which will bring you to another page that will list all Metafields associated with the order.

Importing Metafields And Errors

Once your mapping is configured, you're ready to import Metafields.  Below are a few things to watch out for when adding Metafields to your order:

  1. Adding Metafields with your orders means your imports may significantly slow down.  This is because we have to call Shopify for every Metafield you add to your order.  For large imports, this can have a significant impact on the import time.
  2. Because the Metafield has to be added after the order is created, the order will still be created if there are any errors when adding your Metafields.  The Metafields will not be added to the order.  You can review the Post Import log to see if your Metafields has been added to your order.

If there are errors adding Metafields to your Order, the Post Import Log will display a warning icon like the one below; when you click the Post Import log tab, you can review the specific error returned while trying to add your Metafield.

If your Metafields have successfully been added to your order, they will show up in the Post Import Log with a status of SUCCESS.  Be sure to run tests before adding Metafields with your imports to ensure they get added as you expect.


App: EZ Importer

Tags: metafields, advanced features