Flow Automation: Triggering Workflows When a Subscription Contract Is Updated
You can use the Updated subscription trigger in Flow Automation app to start a workflow whenever a subscription contract changes. After a subscription contract is created through the Subscriptions app, customers or merchants can modify it. For example, they can pause, resume, or cancel the subscription, change the products or quantities, or switch the delivery method. The most common use of the Updated subscription trigger is alerting your team the moment a customer cancels, so they can follow up and try to keep the customer.
This guide explains the subscription contract statuses, the supported actions, how to test the workflow, and how to win back customers who cancel.
| Note:This trigger applies only to stores that have installed the Subscriptions app and set up subscription products. |
Subscription Contract Statuses
When you set up a condition in Flow Automation, you may need to use the subscription contract’s status, each status appears as the following values:
- ACTIVE: The subscription is running normally, and the customer is charged automatically each billing cycle.
- PAUSED: The subscription is on hold. The customer isn’t charged while it’s paused.
- EXPIRED: The subscription has reached its maximum number of billing cycles and has ended.
- CANCELLED: The customer or the merchant canceled the subscription.
- FAILED: The subscription can’t continue because of an issue such as a failed payment.
Supported Actions
The following actions are commonly used in workflows started by the Updated subscription trigger:
- [General] Send email
- [General] Update counter
- [General] Delay
- [General] For each loop
Testing the Workflow
To test whether the workflow is triggered when a subscription contract is updated, follow these steps:
- In Flow Automation, set up a workflow using the Updated subscription trigger, then click Publish to enable it.
- From your SHOPLINE Admin, go to Apps > Subscription app > Subscriptions and open a test subscription contract. If you don’t have one yet, use a test customer account to buy a subscription product first.
-
Make a change to the contract, such as pausing the subscription or changing a product quantity, and save it.
- After saving the changes, go to Flow Automation to check the execution results.
| Note: For more information on how to monitor the execution of your workflows, please refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide. |
Example Use Case
Here is a practical example of using the Updated subscription trigger to win back customers who cancel their subscriptions.
Scenario: When a customer cancels a subscription, notify customer service right away so they can contact the customer, find out why they canceled, and try to keep them.
| Note: In Flow Automation, a canceled contract first appears as PAUSED and changes to CANCELLED after a while. Because of this, a single cancellation triggers the workflow twice (once at PAUSED and once at CANCELLED), so your team will receive two emails. When you receive an email, use the subscription contract ID in it to check in the Subscriptions app whether the contract was canceled or paused before you follow up. |
- Trigger: Updated subscription
-
Condition 1: Status is at least one of CANCELLED, PAUSED
Note: When a customer cancels a subscription, the Subscriptions app shows it as canceled right away. In Flow Automation, however, the contract first appears as PAUSED and changes to CANCELLED after a while. To catch cancellations promptly, select both CANCELLED and PAUSED in your condition. -
Action: Send email
- Subject: Subscription canceled or paused: [Subscription contract ID]
- Content: Subscription contract [Subscription contract ID] (Product: [Product title]) has been canceled or paused. Please contact the customer within 24 hours to find out why, and offer a discount to keep them if appropriate.
- Recipient: Manually enter your customer service team’s email address manually.
-
Action: Send email
-
Condition 2: Status equals to CANCELLED
-
Action: Update counter
- Counter name: [Subscription plan name] - Canceled subscriptions this month
- Add: 1
-
Action: Update counter
- Outcome: Customer service can follow up as soon as a customer cancels, which improves the chance of keeping them. Your operations team can also use the counter to track monthly cancellations.
|
Notes:
|