{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"🏷️ Metafields & Tags","description":"Build powerful subscription experiences and automate workflows 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 Subscriptions uses Shopify metafields and tags to store subscription data, power storefront widgets, and enable automation workflows. 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_subscription"]}]}," 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 four 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":["15+ keys"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public (readable by any app/theme)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["App configuration, widget settings, selling plans, build-a-box data"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Selling Plan"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Individual selling plan metadata"]}]},{"$$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":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All subscription contracts for the customer"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Namespace visibility:"]}," All subscription metafields use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," 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 app's configuration and are used by the storefront widget, checkout extensions, and build-a-box features. They are written by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscribeItScriptUtils.updateShopMetafieldsForSettings()"]}," whenever a merchant saves settings."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["When updated:"]}," On every settings save in the Appstle admin, and on selling plan or bundle configuration changes. Updates are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["synchronous"]}," (immediate)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"core-configuration","__idx":3},"children":["Core Configuration"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--setting","__idx":4},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$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":["Core widget and app configuration — UI settings, asset paths, selling plans, labels, and validation rules"]}]},{"$$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":["Merchant saves settings in the Appstle admin"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"widgetEnabled\": true,\n  \"sellingPlans\": [...],\n  \"assetPaths\": {\n    \"js\": \"https://cdn.appstle.com/...\",\n    \"css\": \"https://cdn.appstle.com/...\"\n  },\n  \"labels\": {...},\n  \"validationRules\": {...}\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--labels","__idx":5},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["labels"]}]},{"$$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":["multi_line_text_field"]}]}]},{"$$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":["Localized UI labels and translations for the subscription widget"]}]},{"$$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":["Merchant saves label translations"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Also set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LabelTranslationsServiceImpl"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--shop_info","__idx":6},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shop_info"]}]},{"$$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 metadata including money format, feature flags, and API tokens"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"selling-plan-metafields","__idx":7},"children":["Selling Plan Metafields"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--selling_plans","__idx":8},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["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":["Free-product selling plans only"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Also set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionGroupServiceImpl"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--all_selling_plans","__idx":9},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$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 (including paid plans)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Also set by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionGroupServiceImpl"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," The key uses camelCase (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all_Selling_Plans"]},") — this is intentional and must not be changed."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checkout-validation","__idx":10},"children":["Checkout Validation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--checkout_validation","__idx":11},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$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 rules including duplicate subscription restrictions and per-customer limits"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"preventDuplicateSubscriptions\": true,\n  \"maxSubscriptionsPerCustomer\": 5,\n  \"rules\": [...]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"widget-templates","__idx":12},"children":["Widget Templates"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--widget_template_html","__idx":13},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["widget_template_html"]}]},{"$$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":["multi_line_text_field"]}]}]},{"$$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":["Custom widget template HTML (only set if merchant has configured a custom template)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--all_widget_template_html","__idx":14},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all_widget_template_html"]}]},{"$$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":["Map of all available widget templates"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"build-a-box-metafields","__idx":15},"children":["Build-a-Box Metafields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build-a-box bundles use multiple metafield keys for configuration, styling, and 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":"Key"},"children":["Key"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["bundle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bundle/build-a-box configuration"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_subscription_css"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build-a-box subscription CSS styles"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_customization_css"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build-a-box customization CSS"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_validation_info"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build-a-box validation rules"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_setting_info"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build-a-box settings"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_0"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_1"]},", ..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Individual build-a-box bundle details (one per enabled bundle, dynamically indexed)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total_bab"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Total count of enabled build-a-box bundles"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build-a-box metafields are set by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionBundlingServiceImpl.handleMetafieldInputBuildABoxInfo()"]},". The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_*"]}," keys are zero-indexed — if a merchant has 3 bundles, the keys will be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_0"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_1"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_2"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-selling-plan-metafields","__idx":16},"children":["📋 Selling Plan Metafields"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--selling_plan","__idx":17},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selling_plan"]}]},{"$$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":["Selling Plan"]}]},{"$$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":["Individual selling plan metadata (frequency, billing policy, discounts)"]}]},{"$$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":["SubscriptionGroupServiceImpl.createOrUpdateSellingPlans()"]}]}]},{"$$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":["Selling plan is created or modified"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"frequencyCount\": 1,\n  \"frequencyInterval\": \"MONTH\",\n  \"billingPolicy\": {\n    \"interval\": \"MONTH\",\n    \"intervalCount\": 1\n  },\n  \"discountType\": \"PERCENTAGE\",\n  \"discountValue\": 10.0\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-order-metafields","__idx":18},"children":["📦 Order Metafields"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--details","__idx":19},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$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 subscription 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":["AbstractSubscriptionService.updateOrderMetafields()"]}," (subscription-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 subscription (initial 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, processed asynchronously"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This metafield contains a complete snapshot of the subscription 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  },\n  \"subscriptionContract\": {\n    \"id\": \"gid://shopify/SubscriptionContract/9876543210\",\n    \"status\": \"ACTIVE\",\n    \"sellingPlanIds\": [\"gid://shopify/SellingPlan/111\"],\n    \"sellingPlanNames\": [\"Monthly Subscription - 10% off\"],\n    \"variantIds\": [\"gid://shopify/ProductVariant/222\"],\n    \"variantNames\": [\"Default Title\"],\n    \"currentCycle\": 3,\n    \"groupPlanNames\": [\"Subscribe & Save\"],\n    \"cancellationReason\": null\n  },\n  \"lineItems\": [\n    {\n      \"variantId\": \"gid://shopify/ProductVariant/222\",\n      \"title\": \"Premium Coffee Beans\",\n      \"productId\": \"gid://shopify/Product/333\",\n      \"sellingPlanId\": \"gid://shopify/SellingPlan/111\",\n      \"sellingPlanName\": \"Monthly Subscription - 10% off\",\n      \"sku\": \"COFFEE-PREMIUM-1KG\"\n    }\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":20},"children":["👤 Customer Metafields"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"appstle_subscription--subscriptions","__idx":21},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," / ",{"$$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 subscription 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":["AbstractSubscriptionService.setCustomerMetaFields()"]}," (subscription-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 subscription 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":["subscription-update-customer-metafields.fifo"]},"), processed asynchronously by subscription-async"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"id\": \"gid://shopify/SubscriptionContract/9876543210\",\n    \"status\": \"ACTIVE\",\n    \"sellingPlanNames\": [\"Monthly Subscription - 10% off\"],\n    \"nextBillingDate\": \"2025-04-15T10:30:00Z\",\n    \"lineItems\": [\n      {\n        \"title\": \"Premium Coffee Beans\",\n        \"variantId\": \"gid://shopify/ProductVariant/222\",\n        \"sku\": \"COFFEE-PREMIUM-1KG\"\n      }\n    ]\n  }\n]\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Important:"]}," Customer metafield updates are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["asynchronous"]},". The main app queues the update via SQS, and subscription-async processes it. There may be a delay of a few seconds between a contract change and the metafield reflecting that change."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"️-tags-overview","__idx":22},"children":["🏷️ Tags Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Appstle Subscriptions applies tags to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Orders"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customers"]},". All tags are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["merchant-configurable"]}," through the Appstle admin under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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":"-order-tags","__idx":23},"children":["📦 Order Tags"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Order tags are static strings (no Liquid template support) that identify whether an order is the initial subscription order or a recurring billing order."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"first-time-order-tag","__idx":24},"children":["First-Time Order 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":["Config field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstTimeOrderTag"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_first_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":["Initial subscription order is created"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applied by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionCreateService"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractSubscriptionService.updateShopifyOrderDetails()"]}," (subscription-async)"]}]},{"$$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":"recurring-order-tag","__idx":25},"children":["Recurring Order 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":["Config field"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recurringOrderTag"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_recurring_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":["Each subsequent billing attempt creates an order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applied by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionBillingAttemptService"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractSubscriptionService.updateShopifyOrderDetails()"]}," (subscription-async)"]}]},{"$$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":"configuring-order-tags","__idx":26},"children":["Configuring Order Tags"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Appstle Admin"]}," → ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Find the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order Tags"]}," section"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your desired tag values (or keep the defaults)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save settings"]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Backfill endpoint:"]}," If you need to apply tags to orders that were created before tags were configured, use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MiscellaneousResource.applyMissedOrderTags()"]}," API endpoint to backfill missed tags."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-customer-tags","__idx":27},"children":["👤 Customer Tags"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Customer tags are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["dynamic"]}," — they change as subscription status changes. They support ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Liquid template syntax"]}," with access to subscription data variables, enabling highly customized tags."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tag-lifecycle--mutual-exclusivity","__idx":28},"children":["Tag Lifecycle & Mutual Exclusivity"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Customer tags follow a strict ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["priority hierarchy"]}," — only one status tag is active at a time:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"ACTIVE > PAUSED > INACTIVE\n"},"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":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Condition"},"children":["Condition"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Config Field"},"children":["Config Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default 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":["Active"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer has 1+ ACTIVE subscription contracts"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerActiveSubscriptionTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_active_customer"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Paused"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer has PAUSED contracts but no active ones"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerPausedSubscriptionTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_paused_customer"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Inactive"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer has no active or paused contracts (all cancelled)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerInActiveSubscriptionTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_inactive_customer"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["When status changes:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The previous status tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["removed"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagsRemoveMutation"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The new status tag is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["added"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TagsAddMutation"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The applied tag is tracked in the database (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionContractDetails.customerTag"]}," column)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"when-customer-tags-are-applied","__idx":29},"children":["When Customer Tags Are Applied"]},{"$$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":"Action"},"children":["Action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription contract created"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Active tag applied"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription paused"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Active tag removed → Paused tag applied (if no other active contracts)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription resumed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Paused tag removed → Active tag applied"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription cancelled"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tag recalculated based on remaining contracts"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Billing attempt succeeds/fails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tag recalculated"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription event processed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tag recalculated"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Processing locations:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["subscription app:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubscriptionContractDetailsServiceImpl.updateCustomerTags()"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["subscription-async:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractSubscriptionService.updateCustomerTags()"]}," — triggered from contract creation, status changes, and subscription events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Deferred updates:"]}," Via AWS Step Functions state machine for batched/delayed processing"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"liquid-template-variables","__idx":30},"children":["Liquid Template Variables"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Customer tags support ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Liquid template syntax"]},", allowing you to create dynamic, data-driven tags. Wrap variables in double curly braces: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{variable}}"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"available-variables","__idx":31},"children":["Available Variables"]},{"$$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 Value"},"children":["Example Value"]}]}]},{"$$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":["{{contract.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":["{{contract.sellingPlanIds}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated selling plan IDs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gid://shopify/SellingPlan/111"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{contract.sellingPlanNames}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated selling plan names"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Monthly Subscription - 10% off"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{contract.variantIds}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated variant IDs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gid://shopify/ProductVariant/222"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{contract.variantNames}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated variant names"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Default Title"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{contract.currentCycle}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current billing cycle number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{contract.cancellationReason}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancellation reason (if cancelled)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Too expensive"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{order.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":["{{order.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":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Line item variables"]}," (available within the contract context):"]},{"$$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":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sellingPlanId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Selling plan ID for this line item"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["variantId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Variant ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["variantTitle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Variant title"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["title"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Product title"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["productId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Product ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sku"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SKU"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sellingPlanName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Selling plan name"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"example-liquid-templates","__idx":32},"children":["Example Liquid Templates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Static tag (default behavior):"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"appstle_subscription_active_customer\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dynamic tag with selling plan name:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"active_subscriber_{{contract.sellingPlanNames}}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["active_subscriber_Monthly Subscription - 10% off"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dynamic tag with cycle count:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"subscriber_cycle_{{contract.currentCycle}}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriber_cycle_3"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dynamic tag with product SKU:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"subscribed_to_{{contract.variantNames}}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscribed_to_Default Title"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuring-customer-tags","__idx":33},"children":["Configuring Customer Tags"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Appstle Admin"]}," → ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Find the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer Tags"]}," section"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your desired tag templates for each status (Active, Paused, Inactive)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use Liquid variables for dynamic tags, or plain text for static tags"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save settings"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-subscription-contract-custom-attributes","__idx":34},"children":["🔗 Subscription Contract Custom Attributes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to metafields and tags, Appstle supports Shopify's native ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customAttributes"]}," on subscription contracts. These are key-value pairs that can be transferred from the original order."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"transfer-settings","__idx":35},"children":["Transfer Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These settings control whether data from the original order is copied to the subscription contract:"]},{"$$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":["transferOrderNotesToSubscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transfer order notes (text memo) to the subscription contract"]}]},{"$$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 order note attributes (key-value pairs) to the subscription contract"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transferOrderLineItemAttributesToSubscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transfer line item attributes to the subscription contract"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure these in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Appstle Admin"]}," → ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-summary-tables","__idx":36},"children":["📊 Summary Tables"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"all-metafields-at-a-glance","__idx":37},"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_subscription"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["widget_template_html"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["multi_line_text_field"]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all_widget_template_html"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bundle"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["labels"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["multi_line_text_field"]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["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_subscription"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_subscription_css"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_customization_css"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shop_info"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_validation_info"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_setting_info"]}]},{"$$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_subscription"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bab_info_[0-N]"]}]},{"$$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_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total_bab"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Selling Plan"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["selling_plan"]}]},{"$$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_subscription"]}]},{"$$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":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}]},{"$$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":"Heading","attributes":{"level":3,"id":"all-tags-at-a-glance","__idx":38},"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"},"children":["Tag"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Liquid Support"},"children":["Liquid Support"]},{"$$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":["Order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First-time order tag"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_first_order"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$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":["Recurring order tag"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_recurring_order"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Active subscription tag"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_active_customer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No (swapped on status change)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Paused subscription tag"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_paused_customer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No (swapped on status change)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Inactive subscription tag"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription_inactive_customer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No (swapped on status change)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"graphql-mutations-used","__idx":39},"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":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"-faq","__idx":40},"children":["❓ FAQ"]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Can I read subscription metafields from my Liquid theme?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes. All subscription metafields use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appstle_subscription"]}," 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_subscription.setting }}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{ customer.metafields.appstle_subscription.subscriptions }}"]},", etc."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["How quickly are customer metafields updated after a contract change?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Customer metafield updates are queued via SQS (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription-update-customer-metafields.fifo"]},") and processed asynchronously. 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":["Can I use the same tag template for Active and Paused?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Technically yes, but this defeats the purpose of mutual exclusivity. The system removes one and adds the other — if they're identical, the tag will be briefly removed and re-added, which could cause issues with automations that react to tag changes."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What happens to customer tags when a customer has multiple subscriptions?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tags follow a priority hierarchy: Active > Paused > Inactive. If a customer has both active and paused subscriptions, the active tag takes precedence. The inactive tag is only applied when ALL contracts are cancelled."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Can I backfill order tags for existing orders?"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes. Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["applyMissedOrderTags"]}," API endpoint to backfill tags on orders that were created before your tag configuration was set up."]}]}]},"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 Configuration","id":"core-configuration","depth":3},{"value":"appstle_subscription / setting","id":"appstle_subscription--setting","depth":4},{"value":"appstle_subscription / labels","id":"appstle_subscription--labels","depth":4},{"value":"appstle_subscription / shop_info","id":"appstle_subscription--shop_info","depth":4},{"value":"Selling Plan Metafields","id":"selling-plan-metafields","depth":3},{"value":"appstle_subscription / selling_plans","id":"appstle_subscription--selling_plans","depth":4},{"value":"appstle_subscription / all_Selling_Plans","id":"appstle_subscription--all_selling_plans","depth":4},{"value":"Checkout Validation","id":"checkout-validation","depth":3},{"value":"appstle_subscription / checkout_validation","id":"appstle_subscription--checkout_validation","depth":4},{"value":"Widget Templates","id":"widget-templates","depth":3},{"value":"appstle_subscription / widget_template_html","id":"appstle_subscription--widget_template_html","depth":4},{"value":"appstle_subscription / all_widget_template_html","id":"appstle_subscription--all_widget_template_html","depth":4},{"value":"Build-a-Box Metafields","id":"build-a-box-metafields","depth":3},{"value":"📋 Selling Plan Metafields","id":"-selling-plan-metafields","depth":2},{"value":"appstle_subscription / selling_plan","id":"appstle_subscription--selling_plan","depth":4},{"value":"📦 Order Metafields","id":"-order-metafields","depth":2},{"value":"appstle_subscription / details","id":"appstle_subscription--details","depth":4},{"value":"👤 Customer Metafields","id":"-customer-metafields","depth":2},{"value":"appstle_subscription / subscriptions","id":"appstle_subscription--subscriptions","depth":4},{"value":"🏷️ Tags Overview","id":"️-tags-overview","depth":2},{"value":"📦 Order Tags","id":"-order-tags","depth":2},{"value":"First-Time Order Tag","id":"first-time-order-tag","depth":3},{"value":"Recurring Order Tag","id":"recurring-order-tag","depth":3},{"value":"Configuring Order Tags","id":"configuring-order-tags","depth":3},{"value":"👤 Customer Tags","id":"-customer-tags","depth":2},{"value":"Tag Lifecycle & Mutual Exclusivity","id":"tag-lifecycle--mutual-exclusivity","depth":3},{"value":"When Customer Tags Are Applied","id":"when-customer-tags-are-applied","depth":3},{"value":"Liquid Template Variables","id":"liquid-template-variables","depth":3},{"value":"Available Variables","id":"available-variables","depth":4},{"value":"Example Liquid Templates","id":"example-liquid-templates","depth":4},{"value":"Configuring Customer Tags","id":"configuring-customer-tags","depth":3},{"value":"🔗 Subscription Contract Custom Attributes","id":"-subscription-contract-custom-attributes","depth":2},{"value":"Transfer Settings","id":"transfer-settings","depth":3},{"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}