Metaobject Reference

Full reference for the metaobjects defined and created by Submarine, for access in Liquid templates and the Shopify Storefront API, to support advanced subscription, presale and crowdfunding capabilities.

Overview

As described in the front end integration overview, Submarine augments products and variants with metadata that allow front-end developers to display information to customers and drive behaviour via Liquid or the Storefront API.
Metaobjects provide a convenient way to make structured data about Submarine’s subscription plans and presale / crowdfunding campaigns accessible to front end developers and integrators. When installed and configured, Submarine will automatically create a metaobject definition for the object types relevant to Submarine and start populating the appropriate metaobjects.

πŸ’‘
Be sure to read the Note on Submarine metadata approaches to understand why there is a substantial difference between metadata approaches between presales and crowdfunding and subscriptions.

Subscription metaobjects

Subscription plans

Details about a subscription plan that may be available on one or more variants in the store. Variants that are currently linked to this subscription plan will reference it in their variant.metafields.submarine.subscription_plans metafield value.
Field
Type
Example
Notes
gid
Single line text
gid://submarine/SubscriptionPlan/d449f3a7-4655-4d59-824c-cf454548e291
The globally unique ID of this Submarine subscription plan.
subscription_plan_group_gid
Single line text
23333825427
The Submarine group selling plan GID linked to this subscription plan.
selling_plan_id
Single line text
84357825427
The Shopify selling plan ID linked to this subscription plan.
selling_plan_gid
Single line text
gid://shopify/SellingPlan/84357825427
The Shopify selling plan GID linked to this subscription plan.
subscription_plan_name
Single line text
Deliver every week
The name of the Submarine Subscription plan created in the Subscription Group.
frequency
JSON
{ "interval_count": 2, "interval": "week", "min_cycles": null, "max_cycles": null }
Details of the frequency of this subscription plan.
frequency_human
Single line text
2 weeks
Details of the frequency of this subscription plan in a human readable format.
delivery_behaviour
JSON
{ "delivery_type": "fixed", "interval": "monthly", "day": 15, "anchor_behaviour": "ASAP" }
Details of the delivery behaviour of this subscription plan.
billing_behaviour
JSON
{ "billing_offset_interval": "business hours", "billing_offset_interval_count": 12, "processing_offset_interval": "calendar days", "processing_offset_interval_count": 2 }
Details of the billing behaviours, cut off and processing times for this subscription plan.
pricing_behaviour
JSON
{ "base_pricing_type": "at_time_of_placement", "discount_type": "trailing percentage", "discount_percentage": "50,30,10,10,0", "discount_fixed": "" }
Details of the pricing behaviour of this subscription plan.