Skip to main content

Documentation Index

Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Appstle Subscriptions integrates natively with Shopify Flow, Shopify’s built-in automation platform. You can build powerful subscription automation — pausing after failed payments, applying loyalty discounts, swapping seasonal products — without managing API keys or writing backend code. Flow runs within Shopify’s authenticated context, so no credentials are required.
Shopify Flow is available on Shopify Basic plan and above. The Appstle Flow integration must be enabled in your Appstle admin before creating workflows.

Getting started

1

Enable the integration

In the Appstle admin, go to Settings → Integrations → Shopify Flow and enable the integration.
2

Open the Flow editor

Navigate to the Shopify Flow editor in your Shopify admin.
3

Create a workflow

Click Create workflow, choose an Appstle trigger, add conditions if needed, and attach Appstle actions.

Triggers

Triggers fire automatically when subscription events occur. All triggers include the full subscription and customer property sets described below.

Subscription lifecycle

TriggerDescription
Subscription CreatedFires when a new subscription contract is created
Subscription ActivatedFires when a subscription is activated from paused or cancelled status
Subscription CancelledFires when a subscription is cancelled
Subscription PausedFires when a subscription is paused
Subscription UpdatedFires when subscription details change (products, quantity, address, etc.)

Billing events

TriggerDescription
Subscription Billing SuccessFires when a billing attempt succeeds
Subscription Billing FailureFires when a billing attempt fails
Upcoming Order NotificationFires when an upcoming order notification is sent based on configured buffer days

Schedule changes

TriggerDescription
Subscription Billing Interval ChangedFires when the billing frequency is changed
Subscription Next Order Date ChangedFires when the next billing/order date is modified

Trigger properties

Subscription properties

Included with every trigger:
PropertyTypeDescription
Subscription IDNumberInternal subscription contract ID
GraphQL Subscription IDStringGraphQL ID of the subscription contract
StatusStringACTIVE, PAUSED, CANCELLED, EXPIRED, or FAILED
Next Billing DateStringNext billing date in UTC ISO 8601. Empty string if not ACTIVE.
Billing IntervalStringBilling frequency unit: DAY, WEEK, MONTH, YEAR
Billing Interval CountNumberNumber of intervals between billings (e.g. 2 + MONTH = every 2 months)
Delivery IntervalStringDelivery frequency unit: DAY, WEEK, MONTH, YEAR
Delivery Interval CountNumberNumber of intervals between deliveries
Original Order IDNumberID of the first order. 0 for imported contracts.
Original Order NameStringName of the first order. Empty string for imported contracts.
Cancel ReasonStringReason for cancellation (empty string if not cancelled)
Pause ReasonStringReason for pause (empty string if not paused)
Total Successful OrdersNumberTotal successfully completed orders for this contract
Line ItemsArrayArray of line items (see schema below)
Order Note AttributesArrayArray of key-value note attributes

Customer properties

Included with every trigger:
PropertyTypeDescription
customer_referenceReferenceShopify customer reference
Customer EmailEmailCustomer’s email address
Customer PhoneStringCustomer’s phone number (empty string if not available)
Customer Display NameStringCustomer’s display name
Customer First NameStringCustomer’s first name
Customer Last NameStringCustomer’s last name

Billing event properties

For Subscription Billing Success, Subscription Billing Failure, and Upcoming Order Notification only:
PropertyTypeDescription
Billing Attempt IDNumberID of the billing attempt
Billing Attempt StatusStringSUCCESS, FAILURE, PENDING, or SCHEDULED
Billing Attempt CountNumberNumber of billing attempts
Billing DateStringScheduled billing date (UTC ISO 8601)
Billing Attempt TimeStringActual attempt timestamp (UTC ISO 8601)
For Subscription Billing Success only:
PropertyTypeDescription
Recurring Order IDNumberOrder ID from successful renewal
Recurring Order NameStringOrder name from successful renewal
order_referenceReferenceShopify order reference

Subscription Updated properties

For the Subscription Updated trigger only:
PropertyTypeDescription
Contract AmountNumberTotal line item amount in contract currency
Contract Amount USDNumberTotal line item amount converted to USD

Line items schema

Each object in the Line Items array contains:
FieldTypeDescription
lineItemIdStringID of the line item
variantIdFloatShopify variant ID
graphqlVariantIdStringGraphQL variant ID
productIdIDShopify product ID (GraphQL format)
quantityIntQuantity
graphqlSellingPlanIdStringSelling plan ID for this line
sellingPlanNameStringSelling plan name
customAttributesArrayKey-value custom attributes on the line item

Actions

All actions return at minimum a success_message output field. Every action is logged in the subscription activity log with source SHOPIFY_FLOW.

Line item management

Add a product variant to an existing subscription.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
product_variant_idStringYesShopify product variant ID to add
quantityStringYesQuantity to add
is_one_time_productString"true" to add as a non-recurring line item. Default: "false"
Output fields: contract_id, product_variant_id, quantity, is_one_time_product, success_message
Remove a product from a subscription.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
line_idStringYesLine item ID to remove
remove_discountStringWhether to also remove the associated discount
Output fields: contract_id, line_id, remove_discount, success_message
Change the quantity of a product in a subscription.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
line_idStringYesLine item ID
quantityStringYesNew quantity
Output fields: contract_id, line_id, quantity, success_message
Change the price of a product in a subscription.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
line_idStringYesLine item ID
base_priceStringYesNew base price
remove_pricing_policyBooleanRemove the existing pricing policy. Default: false
Output fields: contract_id, line_id, base_price, remove_pricing_policy, success_message
Update custom attributes on a line item.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
line_idStringYesLine item ID
attributesStringYesJSON array of key-value pairs
Output fields: contract_id, line_id, success_message
Swap a product variant for another in a subscription.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
old_variant_idStringYesComma-separated variant IDs to replace
new_variant_idStringYesComma-separated variant IDs with optional quantities (e.g. 11111:2,22222:1)
old_line_idStringSpecific line ID when multiple lines share the same variant
carry_forward_discountStringWhether to carry the existing discount to the new variant
Output fields: contract_id, old_variant_id, new_variant_id, success_message

Subscription management

Set a subscription’s status to Active, Paused, or Cancelled.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
statusStringYesACTIVE, PAUSED, or CANCELLED
Output fields: contract_id, status, success_message
Hide a subscription from the customer portal.Input fields: contract_id (required)Output fields: contract_id, success_message
Combine two subscriptions into one.Input fields:
FieldTypeRequiredDescription
source_contract_idStringYesContract ID to merge from
destination_contract_idStringYesContract ID to merge into
Output fields: source_contract_id, destination_contract_id, success_message
Split specific line items out into a new subscription contract.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
line_idsStringYesComma-separated line item IDs to move
attempt_billingStringWhether to immediately bill the new contract after splitting
Output fields: original_contract_id, new_contract_id, line_ids_moved, success_message
Update Order Note — sets the order note text on a subscription. Required: contract_id, order_note.Update Note Attributes — sets custom key-value note attributes. Required: contract_id, note_attributes (JSON array). Optional: overwrite_existing (boolean, default false). Output includes attributes_count.

Billing & schedule

Change the billing frequency.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
billing_interval_countStringYesNumber of intervals between billings
billing_intervalStringYesDAY, WEEK, MONTH, or YEAR
Output fields: contract_id, billing_interval_count, billing_interval, success_message
Change billing and delivery frequency using an existing selling plan.Input fields: contract_id (required), selling_plan_id (required)Output fields: contract_id, selling_plan_id, selling_plan_name, billing_interval_count, billing_interval, delivery_interval_count, delivery_interval, success_message
Reschedule the next billing date. Dates must use ISO 8601 format: 2026-03-15T10:00:00Z.Input fields: contract_id (required), next_billing_date (required)Output fields: contract_id, next_billing_date, success_message
Skip (or unskip) the next scheduled order.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
line_idStringYesLine item ID
is_skipBooleantrue to skip, false to unskip. Default: true
Output fields: contract_id, line_id, is_skip, success_message
Trigger immediate billing. Requires either contract_id or billing_attempt_id.
The Attempt Billing action requires additional permission. Contact support@appstle.com to enable it for your store.
Output fields: contract_id, success_message
Update Max Cycles — set the maximum billing cycles before auto-cancellation. Required: contract_id, max_cycles.Update Min Cycles — set the minimum billing cycles before the customer can cancel. Required: contract_id, min_cycles.

Discounts & pricing

Apply a discount code to a subscription.Input fields: contract_id (required), discount_code (required)Output fields: contract_id, discount_code, success_message
Remove a discount. Provide either discount_id or discount_code.Input fields: contract_id (required), discount_id or discount_code (one required)Output fields: contract_id, discount_id, success_message
Update pricing policy with cycle-based discounts.Input fields:
FieldTypeRequiredDescription
contract_idStringYesSubscription contract ID
base_priceStringYesBase price for the line item
line_idStringSpecific line item ID — if omitted, applies to all lines
cyclesStringJSON defining cycle-based pricing adjustments
overwrite_existingBooleanReplace existing pricing policy. Default: false
Output fields: contract_id, line_id, base_price, success_message

Delivery & shipping

Change the delivery frequency.Input fields: contract_id (required), delivery_interval_count (required), delivery_interval (required — DAY, WEEK, MONTH, or YEAR)
Change the shipping method on a subscription.Input fields: contract_id (required), delivery_method_title (required). Optional: delivery_method_code, delivery_method_presentment_title, delivery_method_id.
Change the shipping price. Required: contract_id, delivery_price.
Update the delivery address.Required fields: contract_id, address1, city, country_codeOptional fields: address2, province, province_code, zip, country, first_name, last_name, phone, company
Send a payment method update request to the customer. Required: contract_id.

Example workflows

Trigger: Subscription Billing FailureCondition: Billing Attempt Count ≥ 3Action: Update Subscription Status → PAUSED
Trigger: Subscription Billing SuccessCondition: Total Successful Orders ≥ 6Action: Apply Discount Code → LOYAL10
Trigger: Subscription CancelledCondition: Contract Amount > 100Action: Send Slack notification (via Shopify Flow’s Slack connector)
Trigger: Scheduled (monthly, via Shopify Flow’s scheduler)Action: Replace Variant → swap old variant ID for new variant ID

Field reference

Attributes JSON format — for attributes and note_attributes fields:
[
  {"key": "gift_message", "value": "Happy Birthday!"},
  {"key": "delivery_instructions", "value": "Leave at door"}
]
Replace Variant format:
  • old_variant_id: comma-separated IDs to replace — 12345,67890
  • new_variant_id: comma-separated IDs with optional quantities — 11111:2,22222:1