{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"🏷️ Metafields & Tags","description":"Build powerful membership and access control experiences for your Shopify store with our comprehensive REST APIs.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"️-metafields--tags","__idx":0},"children":["🏷️ Metafields & Tags"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"hero-section","style":{"margin":"24px 0"}},"children":[{"$$mdtype":"Tag","name":"h3","attributes":{"style":{"color":"white","marginBottom":"12px"}},"children":["Shopify Metafields & Tags Reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Appstle Memberships uses Shopify metafields and tags to store membership data, control access via customer tags, and enable storefront gating logic. This reference covers every metafield and tag — what it contains, when it's set, and how to use it in your integration."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-metafields-overview","__idx":1},"children":["📦 Metafields Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All metafields use the namespace ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]}," and are managed through the Shopify GraphQL Admin API (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MetafieldsSetMutation"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Metafields are set on three Shopify resource types:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Resource"},"children":["Resource"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Count"},"children":["Count"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Visibility"},"children":["Visibility"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6 keys"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public (readable by any app/theme)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership settings, selling plans, access rules, checkout validation, widget labels"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2 keys"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership contracts, trial/dunning state"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription context for each order"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Namespace visibility:"]}," All membership metafields use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," namespace (no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$app:"]}," prefix), which means they are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["readable by other apps, themes, and Liquid templates"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-shop-metafields","__idx":2},"children":["🏪 Shop Metafields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Shop metafields store the membership program configuration and are used by the storefront for access gating, checkout validation, and widget rendering."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["When updated:"]}," On every settings save in the Appstle admin. Updates are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["synchronous"]}," (immediate)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"core-settings","__idx":3},"children":["Core Settings"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--setting","__idx":4},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop-level membership settings snapshot for storefront access"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscribeItScriptUtils.updateShopMetafieldsForSettings()"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--all_selling_plans","__idx":5},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all_selling_plans"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All selling plans configured for this shop's membership program"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscribeItScriptUtils.updateShopMetafieldsForSettings()"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"id\": \"gid://shopify/SellingPlan/111\",\n    \"name\": \"Basic Monthly Membership\",\n    \"billingPolicy\": {\n      \"interval\": \"MONTH\",\n      \"intervalCount\": 1\n    },\n    \"customerTag\": \"basic-member\",\n    \"orderTag\": \"membership-order\"\n  },\n  {\n    \"id\": \"gid://shopify/SellingPlan/222\",\n    \"name\": \"Premium Annual Membership\",\n    \"billingPolicy\": {\n      \"interval\": \"YEAR\",\n      \"intervalCount\": 1\n    },\n    \"customerTag\": \"premium-member\",\n    \"orderTag\": \"premium-membership-order\"\n  }\n]\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"access-control","__idx":6},"children":["Access Control"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--rules_by_customer_tag","__idx":7},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rules_by_customer_tag"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rules keyed by customer tag — used for storefront gating logic (controlling which products, collections, or pages are accessible to which membership tiers)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscribeItScriptUtils.updateShopMetafieldsForSettings()"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"basic-member\": {\n    \"accessibleCollections\": [\"gid://shopify/Collection/111\"],\n    \"accessibleProducts\": [],\n    \"gatingType\": \"COLLECTION\"\n  },\n  \"premium-member\": {\n    \"accessibleCollections\": [\"gid://shopify/Collection/111\", \"gid://shopify/Collection/222\"],\n    \"accessibleProducts\": [\"gid://shopify/Product/333\"],\n    \"gatingType\": \"COLLECTION_AND_PRODUCT\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["How gating works:"]}," The storefront reads this metafield and the customer's tags to determine what content is visible. If a customer has the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premium-member"]}," tag, they see all products and collections mapped to that tag. Non-members or lower tiers see gated content as locked/hidden."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--checkout_validation","__idx":8},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout_validation"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Checkout validation configuration — enforces member-only product purchase rules at checkout"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscribeItScriptUtils.updateShopMetafieldsForSettings()"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"widget-labels","__idx":9},"children":["Widget Labels"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--widget_label","__idx":10},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["widget_label"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Storefront widget label translations (default locale)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LabelTranslationsServiceImpl.syncTranslationToShopify()"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--customer_portal_label","__idx":11},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer_portal_label"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer portal label translations (default locale)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LabelTranslationsServiceImpl.syncTranslationToShopify()"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Multi-language support:"]}," For non-default locales, labels are NOT stored as separate metafields. Instead, the app fetches the existing default-locale metafield ID and registers a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shopify Translation"]}," on it (using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TranslationsRegisterMutation"]},"). This leverages Shopify's built-in translation system."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-order-metafields","__idx":12},"children":["📦 Order Metafields"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--details","__idx":13},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Full membership contract context for this order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MiscellaneousResource.updateOrderMetafields()"]}," (membership) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractSubscriptionService.updateOrderMetafieldsFromQueue()"]}," (membership-async)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Updated when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order is created via membership (initial purchase or recurring billing)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update mechanism"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Queued via SQS (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["membership-update-order-metafields.fifo"]},"), processed asynchronously"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This metafield contains a complete snapshot of the membership context at the time the order was created:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"customer\": {\n    \"id\": \"gid://shopify/Customer/1234567890\",\n    \"name\": \"Jane Smith\",\n    \"email\": \"jane@example.com\"\n  },\n  \"subscriptionContract\": {\n    \"id\": \"gid://shopify/SubscriptionContract/9876543210\",\n    \"status\": \"ACTIVE\",\n    \"sellingPlanIds\": [\"gid://shopify/SellingPlan/111\"],\n    \"sellingPlanNames\": [\"Premium Monthly Membership\"],\n    \"variantIds\": [\"gid://shopify/ProductVariant/222\"],\n    \"variantNames\": [\"Premium Membership\"]\n  },\n  \"firstOrder\": {\n    \"id\": \"gid://shopify/Order/444\",\n    \"createdAt\": \"2025-01-15T10:30:00Z\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-customer-metafields","__idx":14},"children":["👤 Customer Metafields"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"membership-contracts","__idx":15},"children":["Membership Contracts"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--subscriptions","__idx":16},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptions"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All membership contracts for this customer with full details"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionContractDetailsServiceImpl.maybeUpdateCustomerMetaFields()"]}," (membership) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractSubscriptionService.maybeUpdateCustomerMetaFieldsFromQueue()"]}," (membership-async)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Updated when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any membership contract changes (created, updated, paused, cancelled, billing attempt)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update mechanism"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Queued via SQS (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["membership-update-customer-metafields.fifo"]},"), processed asynchronously"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"id\": \"gid://shopify/SubscriptionContract/9876543210\",\n    \"status\": \"ACTIVE\",\n    \"sellingPlanIds\": [\"gid://shopify/SellingPlan/111\"],\n    \"sellingPlanNames\": [\"Premium Monthly Membership\"],\n    \"variantIds\": [\"gid://shopify/ProductVariant/222\"],\n    \"variantNames\": [\"Premium Membership\"],\n    \"nextBillingDate\": \"2025-04-15T10:30:00Z\"\n  }\n]\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"trial--dunning-state","__idx":17},"children":["Trial & Dunning State"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_membership--setting-1","__idx":18},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer-level membership settings: tracks trial tags and dunning tags for this customer's active plans"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptions"]}," metafield (updated together)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Updated when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership state changes (trial start/end, billing failure/success)"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"trialTags\": \"basic-member,premium-member\",\n  \"dunningTags\": \"premium-member\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trialTags"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated list of plan customer tags where the customer is currently in a free trial period (no successful billing yet, within trial window)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dunningTags"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated list of plan customer tags where the customer has a recent failed billing attempt requiring retry"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," The same key ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}," is used for both Shop-level and Customer-level metafields, but they contain different data structures. The resource type (Shop vs Customer) distinguishes them."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"️-tags-overview","__idx":19},"children":["🏷️ Tags Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Appstle Memberships applies tags to both ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order"]}," resources. Customer tags are the primary mechanism for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["membership access control"]}," — they determine which content, products, and collections a member can access."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All tags are applied using the Shopify GraphQL Admin API (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagsAddMutation"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagsRemoveMutation"]},")."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-customer-tags","__idx":20},"children":["👤 Customer Tags"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"plan-based-customer-tags-primary-access-control","__idx":21},"children":["Plan-Based Customer Tags (Primary Access Control)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is the core tag mechanism for Appstle Memberships. Each selling plan (membership tier) has a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["merchant-configured ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}]}," that controls access."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Free-form string configured per plan (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["basic-member"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premium-member"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["vip-member"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Configuration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set per selling plan in the Appstle admin under each membership plan's settings"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionGroupPlan.customerTag"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"tag-lifecycle","__idx":22},"children":["Tag Lifecycle"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event"},"children":["Event"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tag Action"},"children":["Tag Action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership contract ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ACTIVE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["added"]}," to the customer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership contract ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["CANCELLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}," (immediately if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["immediateTagRemoveOnCancel=true"]},", otherwise at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nextBillingDate"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership contract ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PAUSED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}," (immediately if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["immediateTagRemoveOnPause=true"]},", otherwise at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nextBillingDate"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership contract in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DUNNING"]}," (failed payment)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership contract ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["RESUMED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["re-added"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"delayed-vs-immediate-tag-removal","__idx":23},"children":["Delayed vs Immediate Tag Removal"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Merchants can configure when tags are removed on cancellation or pause:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Setting"},"children":["Setting"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Behavior"},"children":["Behavior"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["immediateTagRemoveOnCancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", tag stays until ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nextBillingDate"]}," (member keeps access until their paid period ends). If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", tag is removed immediately."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["immediateTagRemoveOnPause"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same behavior for paused memberships."]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Best practice:"]}," Keep the defaults (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},") to ensure members retain access for the period they've already paid for. Only set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if your membership grants access to ongoing services (not prepaid periods)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"cross-membership-protection","__idx":24},"children":["Cross-Membership Protection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When removing a customer tag on cancel/pause, the app checks ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["all other active memberships"]}," for the same customer. If another active contract uses the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]},", the tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not removed"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Method:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getCustomerTagsForOtherActiveMembership()"]}," — ensures a customer who holds the same membership tag from two different contracts doesn't lose access when one is cancelled."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"example-scenario","__idx":25},"children":["Example Scenario"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A customer has two contracts:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Basic Monthly\" → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag: basic-member"]}," (ACTIVE)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Basic Annual\" → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag: basic-member"]}," (ACTIVE)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the customer cancels \"Basic Monthly\", the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["basic-member"]}," tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not removed"]}," because \"Basic Annual\" is still active."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"trial-state-tags","__idx":26},"children":["Trial-State Tags"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," as the plan — no separate trial tag"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Active during"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Free trial period (no successful billing yet, within ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["freeTrialCount"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["freeTrialInterval"]}," window)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["During a free trial:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["is applied"]}," (member gets access during trial)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The tag is tracked in the customer's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}," metafield under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trialTags"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When the trial ends (expires without payment), the tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Key point:"]}," Trial members get the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same tag"]}," as paying members. There is no separate \"trial\" tag — access is identical. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trialTags"]}," field in the customer metafield is for internal tracking only."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"dunning-state-tags","__idx":27},"children":["Dunning-State Tags"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," as the plan"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Active during"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Period when a billing attempt has failed and retries are pending"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a billing attempt fails:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," may be ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}," (member loses access during dunning)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The tag is tracked in the customer's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}," metafield under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dunningTags"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If payment succeeds on retry, the tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["re-added"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"plan-upgradedowngrade-tag-swap","__idx":28},"children":["Plan Upgrade/Downgrade Tag Swap"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a member changes plans (variant swap), tags are swapped in a single operation:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Step"},"children":["Step"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Action"},"children":["Action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Old plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["New plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["added"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If the upgrade requires payment and that payment fails, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["rollback"]},": new tag removed, old tag restored"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rollback method:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionBillingAttemptService.rollbackCustomerTags()"]}," (membership-async)"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-order-tags","__idx":29},"children":["📦 Order Tags"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"plan-based-order-tags","__idx":30},"children":["Plan-Based Order Tags"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Free-form string configured per plan"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Configuration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set per selling plan in the Appstle admin"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionGroupPlan.orderTag"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applied when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["On initial membership purchase and on each renewal billing (unless ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipRecurringOrderTag"]}," is enabled)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Removed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never (order tags are permanent)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"first-time-order-tag-liquid-template","__idx":31},"children":["First-Time Order Tag (Liquid Template)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Config field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ShopInfo.firstTimeOrderTag"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Liquid template string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applied when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial membership contract creation only (not on renewals)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Condition"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Only applied if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstTimeOrderTag"]}," is non-empty AND the event is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUBSCRIPTION_CONTRACT_CREATE"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Removed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recurring-order-tag-liquid-template","__idx":32},"children":["Recurring Order Tag (Liquid Template)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Config field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ShopInfo.recurringOrderTag"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Liquid template string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applied when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Each recurring billing attempt that creates an order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Removed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"liquid-template-variables-for-order-tags","__idx":33},"children":["Liquid Template Variables for Order Tags"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstTimeOrderTag"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recurringOrderTag"]}," support Liquid template syntax using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagModel"]},":"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{customer.id}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shopify customer GID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gid://shopify/Customer/1234567890"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{subscriptionContract.id}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription contract GID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gid://shopify/SubscriptionContract/9876"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{firstOrder.id}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First order GID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gid://shopify/Order/444"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{firstOrder.createdAt}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First order creation date (ISO 8601)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2025-01-15T10:30:00Z"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"example-liquid-templates","__idx":34},"children":["Example Liquid Templates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Static tag:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"membership_first_order\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dynamic tag with contract info:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"membership_{{subscriptionContract.id}}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["membership_gid://shopify/SubscriptionContract/9876"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"variant-swap-order-tags","__idx":35},"children":["Variant Swap Order Tags"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applied when"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A plan upgrade/downgrade (variant swap) is processed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tag value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["New plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderTag"]}," value"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VariantSwapPostProcessService"]}," (membership-async) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionContractDetailsServiceImpl"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-order-note-attributes","__idx":36},"children":["🔗 Order Note Attributes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transferOrderNoteAttributesToSubscription"]}," is enabled (default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"), the app transfers the original order's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customAttributes"]}," (note attributes) to each renewal order. These are not tags but Shopify's native key-value pairs on orders."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Setting"},"children":["Setting"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transferOrderNoteAttributesToSubscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transfer original order's custom attributes to renewal orders"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-summary-tables","__idx":37},"children":["📊 Summary Tables"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"all-metafields-at-a-glance","__idx":38},"children":["All Metafields at a Glance"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Resource"},"children":["Resource"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Namespace"},"children":["Namespace"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Key"},"children":["Key"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Visibility"},"children":["Visibility"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all_selling_plans"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rules_by_customer_tag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout_validation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["widget_label"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shop"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer_portal_label"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"all-tags-at-a-glance","__idx":39},"children":["All Tags at a Glance"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Resource"},"children":["Resource"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tag Source"},"children":["Tag Source"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When Applied"},"children":["When Applied"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When Removed"},"children":["When Removed"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Permanent?"},"children":["Permanent?"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionGroupPlan.customerTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contract ACTIVE or TRIAL"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contract CANCELLED, PAUSED, DUNNING, or EXPIRED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["(same tag on upgrade)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan upgrade"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plan downgrade rollback"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionGroupPlan.orderTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order created (first or renewal)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ShopInfo.firstTimeOrderTag"]}," (Liquid)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First order only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ShopInfo.recurringOrderTag"]}," (Liquid)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Each renewal"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["New plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Variant swap"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"graphql-mutations-used","__idx":40},"children":["GraphQL Mutations Used"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mutation"},"children":["Mutation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MetafieldsSetMutation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create or update metafields on any resource"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagsAddMutation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add tags to orders or customers"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagsRemoveMutation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Remove tags from customers"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TranslationsRegisterMutation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Register translations for label metafields"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-faq","__idx":41},"children":["❓ FAQ"]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Can I read membership metafields from my Liquid theme?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes. All membership metafields use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_membership"]}," namespace (no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$app:"]}," prefix), so they are accessible in Liquid templates via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{ shop.metafields.appstle_membership.setting }}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{ customer.metafields.appstle_membership.subscriptions }}"]},", etc."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["How does membership access gating work with tags?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each membership plan has a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premium-member"]},"). When a customer's contract is active, this tag is added to their Shopify customer profile. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rules_by_customer_tag"]}," shop metafield maps each tag to the collections/products that tag grants access to. Your theme reads these metafields and the customer's tags to show or hide gated content."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What happens when a member cancels mid-billing-cycle?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["immediateTagRemoveOnCancel=false"]},"), the customer keeps their membership tag until ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nextBillingDate"]},". This means they retain access for the period they've already paid for. Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["immediateTagRemoveOnCancel=true"]}," to remove access immediately on cancellation."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What if a customer has the same tag from two different memberships?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The app has cross-membership protection. When removing a tag due to cancellation/pause, it checks if any other active contract for this customer uses the same tag. If so, the tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not removed"]},". The customer retains access."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["How are customer metafields updated — in real-time or batched?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Customer metafield updates are queued via SQS (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["membership-update-customer-metafields.fifo"]},") and processed asynchronously by membership-async. Typical latency is a few seconds, but during high-traffic periods it may take longer."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Do trial members get the same tag as paying members?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes. During a free trial, the plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," is applied — there is no separate trial tag. Trial members get the same access as paying members. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trialTags"]}," field in the customer ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}," metafield tracks which tags are in trial for internal use only."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What happens during dunning (failed payment)?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a billing attempt fails, the plan's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerTag"]}," may be removed (member loses access). The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dunningTags"]}," field in the customer ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setting"]}," metafield tracks which tags are in dunning. If a retry succeeds, the tag is re-added and access is restored."]}]}]},"headings":[{"value":"🏷️ Metafields & Tags","id":"️-metafields--tags","depth":1},{"value":"📦 Metafields Overview","id":"-metafields-overview","depth":2},{"value":"🏪 Shop Metafields","id":"-shop-metafields","depth":2},{"value":"Core Settings","id":"core-settings","depth":3},{"value":"appstle_membership / setting","id":"appstle_membership--setting","depth":4},{"value":"appstle_membership / all_selling_plans","id":"appstle_membership--all_selling_plans","depth":4},{"value":"Access Control","id":"access-control","depth":3},{"value":"appstle_membership / rules_by_customer_tag","id":"appstle_membership--rules_by_customer_tag","depth":4},{"value":"appstle_membership / checkout_validation","id":"appstle_membership--checkout_validation","depth":4},{"value":"Widget Labels","id":"widget-labels","depth":3},{"value":"appstle_membership / widget_label","id":"appstle_membership--widget_label","depth":4},{"value":"appstle_membership / customer_portal_label","id":"appstle_membership--customer_portal_label","depth":4},{"value":"📦 Order Metafields","id":"-order-metafields","depth":2},{"value":"appstle_membership / details","id":"appstle_membership--details","depth":4},{"value":"👤 Customer Metafields","id":"-customer-metafields","depth":2},{"value":"Membership Contracts","id":"membership-contracts","depth":3},{"value":"appstle_membership / subscriptions","id":"appstle_membership--subscriptions","depth":4},{"value":"Trial & Dunning State","id":"trial--dunning-state","depth":3},{"value":"appstle_membership / setting","id":"appstle_membership--setting-1","depth":4},{"value":"🏷️ Tags Overview","id":"️-tags-overview","depth":2},{"value":"👤 Customer Tags","id":"-customer-tags","depth":2},{"value":"Plan-Based Customer Tags (Primary Access Control)","id":"plan-based-customer-tags-primary-access-control","depth":3},{"value":"Tag Lifecycle","id":"tag-lifecycle","depth":4},{"value":"Delayed vs Immediate Tag Removal","id":"delayed-vs-immediate-tag-removal","depth":4},{"value":"Cross-Membership Protection","id":"cross-membership-protection","depth":4},{"value":"Example Scenario","id":"example-scenario","depth":4},{"value":"Trial-State Tags","id":"trial-state-tags","depth":3},{"value":"Dunning-State Tags","id":"dunning-state-tags","depth":3},{"value":"Plan Upgrade/Downgrade Tag Swap","id":"plan-upgradedowngrade-tag-swap","depth":3},{"value":"📦 Order Tags","id":"-order-tags","depth":2},{"value":"Plan-Based Order Tags","id":"plan-based-order-tags","depth":3},{"value":"First-Time Order Tag (Liquid Template)","id":"first-time-order-tag-liquid-template","depth":3},{"value":"Recurring Order Tag (Liquid Template)","id":"recurring-order-tag-liquid-template","depth":3},{"value":"Liquid Template Variables for Order Tags","id":"liquid-template-variables-for-order-tags","depth":3},{"value":"Example Liquid Templates","id":"example-liquid-templates","depth":4},{"value":"Variant Swap Order Tags","id":"variant-swap-order-tags","depth":3},{"value":"🔗 Order Note Attributes","id":"-order-note-attributes","depth":2},{"value":"📊 Summary Tables","id":"-summary-tables","depth":2},{"value":"All Metafields at a Glance","id":"all-metafields-at-a-glance","depth":3},{"value":"All Tags at a Glance","id":"all-tags-at-a-glance","depth":3},{"value":"GraphQL Mutations Used","id":"graphql-mutations-used","depth":3},{"value":"❓ FAQ","id":"-faq","depth":2}],"frontmatter":{"seo":{"title":"🏷️ Metafields & Tags"}},"lastModified":"2026-03-22T06:20:47.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/metafields-and-tags","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}