Flow Automation: Triggering Workflows When a Selling Plan Is Deleted
You can use the Deleted selling plan trigger in Flow Automation to automatically start a workflow when a selling plan is deleted in the Subscription app.
A selling plan is a purchase option configured for subscription products that defines eligible products, delivery frequencies, and subscription discounts. Once a selling plan is deleted, customers can no longer select it when purchasing products. With this trigger, you can automatically notify relevant team members and track the number of selling plan deletions, helping you promptly identify accidental or unauthorized deletions.
This guide explains the actions supported by this trigger and how to test the workflow. It also provides a practical workflow example.
Notes:
|
Supported Actions
The following actions are primarily used in workflows initiated by the Deleted selling plan trigger:
- [General] Send email
- [Subscription] Find subscription plans
- [General] Update counter
- [General] For each loop (iterate)
Testing the Workflow
To verify that the workflow is successfully triggered when a selling plan is deleted, follow these steps:
- In Flow Automation, set up a workflow using the Deleted selling plan trigger and the Send email action. Set Recipient to your own email address, insert the selling plan ID variable in Content, then click Publish.
From your SHOPLINE Admin, open the Subscription app, go to Selling plans, and click Create new to create a selling plan for testing.
Locate the test plan in the selling plan list and delete it.
Important: Use a selling plan created specifically for testing. Do not delete an active selling plan, as this may disrupt your subscription sales. After deleting the test plan, return to Flow Automation to check the workflow execution results. Confirm that the notification email you received contains the deleted selling plan's ID.
Note: For more information on how to monitor the execution of your workflows, refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide.
Example Use Case
The following example demonstrates how to use the Deleted selling plan trigger to automatically track selling plan deletions and notify relevant team members to review each deletion.
Scenario: Several team members manage selling plans in your store. To minimize the impact of accidental deletions, you want the workflow to notify your operations lead and increment a counter each time a selling plan is deleted. This allows your operations lead to promptly verify each deletion and regularly monitor deletion activity.
Configure the workflow as follows:
- Trigger: Deleted selling plan
- Action: Update counter
- Counter name: Deleted selling plans
- Counter value: Add 1
- Action: Send email
- Subject: Selling Plan Deleted: [Selling plan ID]
- Content: The selling plan with ID [Selling plan ID] has been deleted. Customers can no longer select this plan when purchasing products. If the deletion was unintended, please investigate promptly and recreate the selling plan as needed.
- Recipient: Your operations lead's email address.
Result: Each time a selling plan is deleted, the workflow automatically increments the counter by one and sends a notification email to your operations lead. If a selling plan was deleted by mistake, your operations lead can take timely action to minimize the impact on subscription sales. The counter also maintains a running total of selling plan deletions, helping you monitor deletion activity over time.
Notes:
|