There are a few ways to build an availability filter. This guide shows one approach, and your theme developer can adapt it to suit your store.
Create the Available metafield
1
Open unstructured metafields
On Metafields and metaobjects, select Variants, then View unstructured metafields.
2
Add the definition
Find
supercycle.future_availability_inventory and select Add definition.3
Name the metafield
Enter
Available in Name and set Type to True or false. Select Save, then Save definition.4
Ask support to refresh your products
Once the definition is saved, contact support from the app and ask us to refresh your Supercycle products. Until we do, the filter doesn’t match them.
Add the filter in Search & Discovery
The filter runs on Shopify’s free Search & Discovery app.1
Open Filters
In the Search & Discovery app, go to Filters and select Add filter.
2
Set the source
Select Select source, then Available, the one listed as a variant metafield.
3
Label the filter
Enter
Availability in Filter label and select Save.4
Remove Shopify's Availability filter
If your filters include Shopify’s own Availability filter, open it and select Remove. It only reads Shopify stock, so it doesn’t know which Supercycle sizes are available.
Set the filter on other products with Shopify Flow
Products you sell without Supercycle need the same metafield, set from their Shopify stock. Create two workflows in Flow. The first updates a product whenever its stock changes.1
Add the trigger
Select Create workflow, then Select a trigger, and select Product variant inventory quantity changed.
2
Skip Supercycle products
Add a Condition. Select Add a variable, then product, then tags. Change At least one of product / tags to None of product / tags and enter
Supercycle product as the value.3
Set the metafield
On the True branch, add the Update product variant metafield action and select Available as the metafield. Under Value, select Add variable, then productVariant, then availableForSale. The value reads:
4
Turn it on
Select Turn on workflow, then Turn on.
1
Add the trigger
Create a workflow with the Product created trigger.
2
Skip Supercycle products
Add a Condition. Select Add a variable, then product, then tags. Change At least one of product / tags to None of product / tags and enter
Supercycle product as the value.3
Loop over the variants
On the True branch, add the For each loop (iterate) action. Select Add a variable, then product, then variants.
4
Set the metafield
On the Repeat for each item branch, add the Update product variant metafield action and select Available as the metafield. Under Value, select Add variable, then variantsForeachitem, then availableForSale. The value reads:
5
Turn it on
Select Turn on workflow, then Turn on.
6
Run it on your existing products
On Products, select the products you sell without Supercycle, up to 50 at a time. Select the … button, then Run Flow automation, select the workflow, and select Run workflow.