Sales by fabric in Sidekick: fill the metafield first
On 17 November Shopify's changelog announced that Sidekick can analyze your metafields and metaobjects. The example in the announcement is a question most clothing stores have wanted to ask for years: "Show me total sales by fabric for last quarter."
Try it on a real store and the answer is often one large bar with no label and three small ones. Sidekick did its part. The trouble is that the Fabric metafield was added in spring, filled in for the new collection, and left empty on the 400 products that were already in the catalog. A report grouped by a field can only group the products that have a value in it.
This post covers the two things that have to be true before the question gives a useful answer: the metafield has to be switched on for Analytics, and it has to be filled. The second one is where Shopify Admin Power-Up helps, because the values usually sit in a spreadsheet already and the extension pastes them into Shopify's bulk editor.
What the announcement says, and what it leaves to you
The changelog entry is short. Sidekick can use metafields and metaobjects to answer analytics questions about details you track beyond Shopify's standard fields, "like fabric, supplier, or the designer linked to a product", and returns a breakdown next to your sales metrics. Two sentences at the end carry the conditions: Sidekick can use metafields that have Filter or group data in Analytics turned on, and some metafield types and reports are not supported yet.
Nothing in it says that empty values are filled in for you. They are not. Sidekick reads what the product record holds.
Condition one: the Analytics option
The option lives on the metafield definition. Go to Settings, then Custom data, pick Products or Variants, open the definition and look in its options for Filter or group data in Analytics. With the extension, Ctrl+Shift+K and typing custom data gets you to that settings page without the sidebar.
Shopify's page on options for custom data lists which metafields can have it. It is offered on product, variant, customer and order metafields of these types:
| Group | Types that can be used in Analytics |
|---|---|
| Text | Single line text, multi-line text, and lists of either |
| Number | Integer, decimal (and lists of either), ID, rating |
| Date | Date, date and time |
| Other | True or false, color, URL, product reference |
Rich text, JSON, files and most reference types are not on that list. Metaobjects have the same option of their own, and the help page says their fields work as dimensions when a metafield on a product, variant, customer or order points at the metaobject. That is the "designer linked to a product" case from the announcement.
If your Fabric metafield has no definition at all, because a theme or an import wrote it years ago, give it one first. Without a definition there is no option to tick and, as the next section shows, no column in the bulk editor either.
Condition two: how many products are blank?
Before filling anything, find out how bad it is. The fastest count is in the bulk editor itself:
- Open Products. Set rows per page to 250 in the extension's popup so one page holds a real share of the catalog.
- Tick the box in the header to select the page, then click Bulk edit.
- Click Columns and tick Fabric (and Supplier, or whatever else you plan to ask about) in the Metafields section. Shopify's help page on editing metafields in bulk describes this picker.
- Scroll. Empty cells are easy to see in a column that should be full.
A column that is two thirds white explains the unlabeled bar in Sidekick's chart better than any setting does.
Fill the column from the spreadsheet you already have
Somebody typed the fabric of every product once. It is in the supplier's line sheet, in the tech pack, or in the buying spreadsheet next to the cost. The work is getting that column into Shopify without opening 400 product pages.
- Put the sheet in the same order as the bulk editor. The grid shows products in the order of the list you selected them from. Sort the product list by title, sort the sheet by title, and check the first and last rows match. If the sheet has rows you do not sell, or is missing some you do, the XLOOKUP post shows how to build a column in your order from a list in theirs.
- Copy the cells. One column for one metafield, or several columns side by side if the bulk editor shows the same metafields in the same order.
- Click the first Fabric cell in the bulk editor and press Ctrl+V. The extension splits the clipboard on tabs and line breaks and types each value into the cell below the last, scrolling rows into view as it goes.
- Read the notice. It reports how many cells were pasted, how many were skipped and how many clipboard rows had no row to land in. Then press Save.
The post on pasting metafields goes through each metafield type and how its cell behaves. The short version for this job: text and number metafields paste, a single choice dropdown pastes when the text matches an option, and checkboxes are skipped.
One spelling per value, or the chart splits
A report groups by exact value. "Cotton", "cotton", "100% Cotton" and "Cotton " with a space at the end are four fabrics as far as a breakdown is concerned, and each gets its own thin bar. Tidy the column in the spreadsheet before it goes anywhere near Shopify:
- List the distinct values. In Excel or Google Sheets,
=UNIQUE(B2:B500)in an empty column shows every spelling in use. Twelve fabrics should give twelve rows, not thirty. - Remove stray spaces with
=TRIM(B2)and paste the result back as values. - Decide what a blend is called. "Cotton/Elastane" for everything, or the full percentages for everything. Half and half gives you a chart nobody can read.
- Do not paste blanks over good values. An empty cell in the sheet is pasted as empty text and clears what the product had. If some rows have no value yet, fill them or leave those products out of the selection.
For a field with a short fixed vocabulary, there is a stronger fix: give the single line text definition a list of preset choices. The bulk editor then shows a dropdown, the paste only fills a cell when the text matches one of the choices, and anything misspelled is counted as skipped instead of saved. The skip count becomes your spelling check.
Vendor is not the same as supplier
The announcement mentions supplier, and many stores will ask why they need a metafield when products already have a Vendor. If the vendor field holds the company you buy from, you do not: sales by vendor has been in Shopify's reports for a long time, and the extension's Vendor chip filters the product list by it. Stores that sell their own brand tend to put the brand in Vendor, which leaves the factory or wholesaler with nowhere to go. A Supplier metafield with the Analytics option on gives it a place, and fills the same way as Fabric. The post on vendor and product type columns covers the built-in fields.
After the paste
Open Sidekick and ask the question again. Two expectations to set with whoever asked for the chart:
- Products without a value still exist. If you filled 380 of 400, the other 20 have no fabric to be grouped under. Scroll the bulk editor column to find them.
- Not every report takes metafields. Shopify's wording is that some metafield types and reports are not supported yet. If Sidekick declines, the help page on filtering and editing reports explains the manual route: metafields with the option on appear under Custom metafields in a report's Dimensions and Filters menus.
What the extension does and does not do here
- It pastes into cells you could type in. Text boxes, number boxes, text areas and dropdowns. Pickers, checkboxes and rich text editors are skipped and counted.
- It does not talk to Sidekick or change any report. Sidekick reads the saved product data, the same as if you had typed every value by hand.
- It does not turn on the Analytics option. That is one click per definition, in Settings.
- It does not save for you. Shopify validates each value against the metafield type when you press Save, and tells you which cells it refuses.
- Nothing leaves your browser. The clipboard text goes into the page you are looking at and nowhere else. The permissions post has the details.
The new Sidekick feature is a good reason to finish a job most catalogs left half done. An afternoon with a spreadsheet and the bulk editor, and "sales by fabric" stops being a question for the person who remembers what everything is made of.