Skip to main content
All CollectionsTools
Creating and Maintaining Workflows
Creating and Maintaining Workflows

How to create and manage workflows

Ashley Kim avatar
Written by Ashley Kim
Updated over 4 months ago

Welcome to Workflows! Workflows is a tool that is designed to automate subscription changes. It is triggered by orders created in Shopify, looks at the order criteria, and once met, makes the changes that you have set up. Once you create a workflow, you can set it and forget it. Maintaining a workflow simply requires making sure the information in workflows are up-to-date, e.g. product and variant IDs are up-to-date.

Below, we will go through how to create a workflow, including how to create them around common use-cases, and manage them.

Getting Started

  1. Before you get started, it is important to have answers to the following:

  • What are the order conditions that are required to qualify for the action?

    • Remember: workflows are triggered only by orders.

      • For example, the order condition would be that it's a checkout order with a trial kit.

  • What needs to happen to the subscription?

    • For example, swapping the trial kit for the standard kit.

2. It will also help to have handy the Variant IDs of the product/product variants that are affected. How can I find a Variant ID?

3. Once you have everything, find Tools in the left-hand navigation menu, and open the dropdown. Click into Workflows, and click "Add New Workflow."

Setting Up the Trigger

1. Select your trigger

Select either A subscription order is created, or A checkout order is created. Click Next to set up the Conditions.

What is the difference between the two trigger types?

  • Selecting A subscription order is created means the workflow will be triggered by a recurring subscription order being created in Shopify.

  • Selecting A checkout order is created means the workflow will be triggered by a checkout subscription order being created in Shopify. This is also known as the first order in a subscription.

Currently in Beta: Selecting "An order is updated" means the workflow will be triggered by an order update. For example, the workflow will trigger if a line is added via post-checkout upsells, or an order is canceled.

Interested in trying this feature? Reach out to your Customer Service representative to get started today!

2. Stop all following workflows if this workflow executes at least one action

Selecting this checkbox means if one action from this workflow makes changes to a subscription, no other workflows will act on that subscription, even if it meets the conditions you’ve set.

  • Use-case: If subscriptions are meant to cycle through products based on month/season, you likely do not want the product swap happening more than once at a given time. Selecting the checkbox will ensure that once the first product swap executes, no other actions from that workflow or other workflows take places.

Identifying the Trigger Conditions

Once you've set up your trigger, you need to set up the Conditions around the trigger. The trigger itself only looks for the order type—checkout or recurring. The conditions look further at the order’s contents.

1. Select what the order contains at the product, variant, or subscription contract level.

  • If identifying conditions at the subscription contract level, you'll be able to select a Discount Code, or Churn Risk Status to segment out impacted subscriptions.

    • Discount Code: The created workflow will only trigger based on contracts that contain that specific Shopify Discount Code.

    • Churn Risk Status: The created workflow will only trigger based on if the subscription is deemed to be within the category you select at the time the trigger action is triggered. For instance, if you select At Risk, only subscriptions deemed "At Risk" will have the workflow applied at that time.

How is a subscription deemed "At Risk"?

We have created a machine learning model that takes data points from your customers and determines if they are likely to churn or are seemingly pleased with their subscription.

Our machine learning model takes actions like the following to determine which segment your consumers belong to:

  • How many days has it been since the customer's first order?

  • What is the discount percentage on the customer's order?

  • How many orders has the customer made?

  • What is the price of the subscription order?

  • How many times has the customer skipped an order?

  • Do they continue to push out their next order?

  • If identifying conditions at the product or variant level, click the magnifying glass icon to search for the product or variant by the product title. Select the product/variant. You should then see your selection materialize the product or variant ID in a JSON format (e.g. gid://Shopify/Product/PRODUCT_ID or gid://Shopify/ProductVariant/VARIANT_ID - You can also manually enter values in this format).

(Beta) Stay also offers the ability to create a condition based on the Shopify tag. Select Tag as your condition, and then type in the exact Shopify order tag, following lettercase. This will look to orders only specifically tagged with your input to apply the workflow.

Interested in this feature? Reach out to your Customer Service representative to get started today!

2. Select your comparison type—Price, Quantity, Cycle Number, Line item property.

  • Price - Price of the line item

  • Quantity - Quantity of the line item

  • Cycle Number - Cycle number of the order you are using as a trigger for the action (e.g. Cycle Number 3 = Update will be made to the 4th Order)

  • Line item property - A specific property/attribute of the line item in the order

    • This would need to be set up by your dev team to include custom properties on the line items in the orders.

  • For "Order Contains Subscription Contract", the Comparison Type will be either Discount Code or Churn Risk Status:

    • Discount Code: The Shopify Discount Code that is currently active on a subscription contract.

    • Churn Risk Status: Whether the subscription is or is not at risk of churning

3. Once you've set up your first condition, you have the option to add another as an "AND" condition or as an "OR" condition.

Setting the Actions

Once you've successfully set up the trigger and conditions, you're ready to set up the workflow action. Please note that all line-item/product-related actions will require the variant ID.

1. Select your action type from the dropdown list. Below is a breakdown of the action definitions, call-outs, and use-cases.

  • Swap Item - This action swaps one line item in the subscription to another. Both the 'old' line item and the 'new' line item must be identified by their variant ID. It is recommended that you use the magnifying glass to search for and select the correct product variants.

    • Use-cases: Swap the trial kit to the full-sized product, or swap the starter kit/jar variant to the refill variant.

  • Price Change - This action changes the price of the targeted product variant. The line item that you want to change the price for also needs to be identified by its variant ID.

    • Use-case: Price increase on the third order, after super deep discounts on the first two orders.

  • Change Billing Interval - This action changes the billing interval (aka frequency) of the subscription.

    • Use-case: Subscription starts on a free 14-day trial product and thus, the subscription is created on a 14-day frequency. After the first renewal order, the subscription's frequency/billing interval needs to change to 30 days.

  • Change quantity - This action changes the quantity of the targeted product variant.

  • Remove item - This action removes the targeted product variant from the subscription.

  • Add item - This action adds the targeted product variant from the subscription.

  • Set Shipping Price - This action sets/changes the shipping price on the subscription. Note: The shipping preservation flag must be enabled on your store to use this action. Please reach out to your CSM, if you're not sure or do not have it enabled.

    • Use-case: The free trial checkout order charged the customer for shipping, so a shipping cost is now on the subscription. However, all full-sized subscription orders receive free shipping, so you need to set the shipping price to free.

  • Update Subscription Status - This action changes the status of the subscription to active or canceled.

    • Use-case: Influencer subscriptions need to be canceled after five subscription orders.

  • Apply Discount Code - This action will add the applicable Shopify Discount Code to any subscription contracts applicable to the workflow conditions. Note: The discount will look to the logic set within Shopify to determine if the discount is recurring, one time, etc.

  • Remove Discount Code - This action will remove the applicable Shopify Discount Code from any subscription contracts applicable to the workflow conditions.

2. Once you set up your first action, you have the option to add additional actions as "AND" actions to the first one.

What happens when you click the "Set a limit to how many contract lines will be affected by this action" checkbox?

Selecting the checkbox will ask you to set the limit for how many line items in the subscription should be affected by the workflow action.

In the example below, the limit has been set so that the swap action only executes on one line item of the subscription. If the subscription has a quantity greater than one of a single product, the swap action will only execute on one quantity of that product in the subscription.

Maintaining Workflows

Most workflows are meant for you to set it and forget it. However, life happens and unforeseen circumstances may impact the products and variants you have targeted in your workflows. Below, we discuss the various use-cases in which you will need to maintain your workflow to keep it functional.

1. A product or variant you have subscriptions swapping to is out-of-stock

If a product or variant that you have targeted in your workflow for a product swap action is out-of-stock, you will need to edit your workflow to replace the out-of-stock item with a replacement you'd like subscriptions swapping to instead.

If you'd like to stop the swap altogether, simply pause your workflow in the Edit mode of the workflow.

2. The product and/or variant IDs have changed

It should be very rare that product and variant IDs change in your Shopify store, as that means the original product/variant has been deleted. In any case, make sure the IDs in the workflows are updated to the new values in Shopify.

Note: If the product or variant ID of any subscription product has been deleted or changed, please reach out to us via chat or email so they can help you update existing subscriptions that are now on a non-existent variant ID.

3. The Shopify Discount Code is no longer active

In this case, it is best to de-activate the workflow to avoid any downstream issues.

If any logic in Shopify is updated for the discount, it will automatically be consumed for any subscriptions where the discount is applied.

Did this answer your question?