Flow Automation: Triggering Workflows When a Subscription Plan Is Created
You can use the New selling plan trigger in Flow Automation to automatically start a workflow whenever a new subscription plan is created. A subscription plan is a purchase option you configure for subscription products in the Subscription app. It includes the plan name, eligible products, delivery frequency (such as once a month), and subscription discount (such as 20% off). With this trigger, you can automatically notify your operations team to review the settings as soon as a new plan is created, helping prevent incorrect delivery frequencies or discounts from affecting customers' subscriptions.
This guide explains the actions supported by this trigger, how to test the workflow, and a practical example of how to use it.
|
Notes:
|
Supported Actions
The following actions are commonly used in workflows initiated by the New selling plan trigger:
- [General] Send email
- [General] Update counter
- [General] For each loop (iterate)
Testing the Workflow
To test whether the workflow is triggered when a subscription plan is created, follow these steps:
- In Flow Automation, create a workflow using the New selling plan trigger and the Send email action, then click Publish.
-
Open the Subscription app, go to Selling plans, and click Create new.
-
Enter a plan name, add a test product under Applies to, set the delivery frequency and subscription discount, then click Create.
Note: For detailed instructions on setting up a subscription plan, refer to "Subscriptions: Setting Up Recurring Purchases." -
After creating the subscription plan, return to Flow Automation to check the workflow's execution results.
Note: For more information on monitoring workflow execution, refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide. - Confirm that the workflow was triggered and the Send email action was completed successfully.
Example Use Case
The following example shows how to use the New selling plan trigger to automatically notify your operations team when a new subscription plan is created, so they can review its settings before customers subscribe.
Scenario: Whenever a new subscription plan is created, the workflow automatically updates a counter to track the total number of plans created and sends an email to your operations team, reminding them to review the delivery frequency and discount settings before customers subscribe.
Configure the workflow as follows:
- Trigger: New selling plan
-
Action: Update counter
- Counter name: Subscription Plan Count
- Counter value: Add 1
-
Action: Send email
- Subject: New Subscription Plan Created: [Subscription plan name]
- Content: The subscription plan "[Subscription plan name]" has been created, with the following delivery options: [Subscription plan options]. Please review the delivery frequency and discount settings before customers subscribe.
- Recipient: Your operations team's email address
Outcome: Your operations team receives an email notification whenever a new subscription plan is created, allowing them to review the settings before customers subscribe. Meanwhile, the counter tracks the total number of subscription plans created, making it easier to monitor new plan creation.
| Note: To insert the information shown in square brackets, such as [Subscription plan name] (${trigger.name}) and [Subscription plan options] (${trigger.options}), click + Add variable and select the corresponding parameters. |