Metafields Manager Documentation

Introduction

Ever wonder how to add a few slides to your homepage? Or how to add a video to your product or a detailed information about the author of your blog post? Well look no further. All of those things and much more can be accomplished using the Metafields Manager app!

This app was built so that you can unlock the full potential of the Shopify's built in metafields feature. As you may know, Metafields are essentially extra data that can be added to most shopify objects (products, articles, blogs, etc...). Metafields can only be a string or an integer and can only be updated, created, and removed through the Shopify API. For more information about metafields, see the official documentation here.

This app gives you much more control and an easy to use interface for managing your metafields. By getting a little creative and using special inputs (like a WYSWYG text editor and a file uploader) you can extend metafields to include HTML, Images, Lists, and more. In essense, you get a light weight Content Management System (CMS) that you can customize. This has the dual benefits of simplifying your store and keeping all of your data in one place. Metafields Manager also allows you to export/import your metafield configuration so that you can move your metafield data to a different store or keep a copy so you have a copy of all your extra metadata safe and sound.

But it gets even better! A major feature of this app is the ability to create Custom Objects. A Custom object is a group of metafields that can be associated with one or more shopify objects (see more about custom object here). This way you can create a single object, like an author for a blog post, and apply it to hundreds of articles. If the author's biography changes, no problem, just make the change once and it updates all of the articles that reference it.

To get the ball rolling, we suggest you watch our quick tutorial on how to add videos and extra blocks of HTML to your products.

Metafield Configuration

Setting up your metafield configuration will set up the keys and types of additional metadata that show up in the dashboard for the corresponding shopify objects.

Once you've set up your metafield configuration. Click Save and you're ready to move on to Adding the metadata to the shopify objects themselves.

Note: If you want to create a link to a custom object you need to create the object first and then paste in the id of the custom object you want to link.

Custom Objects

Custom objects allow you to group together certain metafield and associate them to one or more shopify objects. The clearest way to explain them is with an example:

Imagine you want to have a blog on your store with many different contributing authors. Each author needs to have a short biography, a name, and an image. One author may write several different articles.

This is a perfect scenario for a custom object! All you need to do is create an author object that has the following fields and types:

Once you've created the Object Configuration you need to create a few instances of the "author" object. Click Create Objects → fill out the form for the object → Click Save.

Once you've created the object you can associate it to one or more articles: Click Add Metadata → Find the article → Link it to the correct "author" object by pasting the object's id into the custom object field.

As you can see from this example you now have an easy way to maintain several authors and assocate them to different articles. You also have the added benefit of all your data being stored in the same place so you don't have to use AJAX or set up a different server just to host your extra data.

Custom Objects Configuration

As mentioned in the previous example, you can configure a custom object to take whatever shape you need. Depending on your goal you can create a special custom object that will handle it!

The benefit of custom objects is that you can associate one object with many different shopify objects. When you update the object- all the shopify objects that are associated with that custom object will get updated as well!

Import Export

Clicking export will allow you to export all of your metafield data and metafield configurations into a new store. You simply press export and you will recieve a json file containing everything you need to recreate your settings on a new shopify store.

Once you have generated a valid export file, you can easliy import it by clicking on import and uploading the export.json file that was emailed to you from the export step.

Data Hosting

By default your additional files and images are stored using the Shopify CDN. This is done by creating an additional theme and storing the files as assets under that theme. If ever you would like to download all of the files that you have added through Metafields Manager you can do so by downloading the theme labeled Metafields-Manager-Asset-Theme. If you are using this option to host data do not delete this theme. Doing so will put your assets at risk and cause an error when uploading further assets.

If you would prefer to use Amazon S3 to host your files, you can do so by editing your app settings and entering in the authentication information. Once you have done so, all of your data will be saved to Amazon S3 at the bucket of your choosing.

API

Metafields Manager offers a secure and flexibile API for updating metafields via ajax request from approved domains. In order to use the API, you must first enable it from the settings page in the admin dashboard. Once it has been enabled you need to add a comma seperated list of approved domains. These domains are the only domains which will be able to utilize the api. They should take the format of www.domain.com or subdomain.domain.com. Most websites will have multiple domains. For instance, you will likely have:

storename.myshopify.com,www.storename.com,storename.com
by the time your site goes into production.

You will also need to whitelist individual metafields if you would like the ability to modify them via the API. This is in order to protect you from any malicious behavior. You can enable individual metafields for API use by clicking on Edit your Metafield Configuration then clicking on the Configure button for the respective metafield and checking the box under API Settings.

API Examples:


Additional Questions

If you're still confused or you have a question about something i didn't cover in this document. Please feel free to reach out to us and we will do everthing in our power to get your question resolved so you can meet your business goals.

Also- if you have any features that you think are missing we would love to build them in for you- just reach out and let us know!

Thanks for your support,
The Metafields Manager Team