Selling plan group workflow: Trigger when a group is created, updated or deleted
A selling plan group is a set of purchase options attached to products, such as "Subscribe & save" or "Pre-order". Subscription and pre-order apps, such as Shopify Subscriptions or Recharge, create these groups. Arigato has three triggers for running a workflow when a group changes.
What is available
| Trigger | When it runs |
|---|---|
| When a selling plan group is created | A new group is added to the store |
| When a selling plan group is updated | A group is changed, including when products are added to or removed from it |
| When a selling plan group is deleted | A group is removed. Only the group's ID is available, because the group no longer exists in Shopify. |
Where to find it: Create Workflow, then Event, then Other Shopify Objects, then Selling Plan Group.
These triggers are only for Event workflows. Selling plan groups are not available in scheduled, bulk operation or on-demand workflows.
The updated trigger shows the group as it is now. It does not show what changed.

Tokens
When the workflow runs on a created or updated group, Arigato loads the newest version of the group from Shopify. Use these values in conditions and actions, or find them in the token picker. See Using Tokens for how to insert them.
{{ selling_plan_group.name }}: the name customers see, for example "Subscribe & save".{{ selling_plan_group.merchantCode }}: the internal code the app or merchant gave the group.{{ selling_plan_group.description }}and{{ selling_plan_group.summary }}: the description and Shopify's short summary, for example "1 delivery frequency, discount".{{ selling_plan_group.options }}: the option names, for example "Deliver every".{{ selling_plan_group.productsCount.count }}and{{ selling_plan_group.productVariantsCount.count }}: the number of products and variants in the group.{{ selling_plan_group.sellingPlans }}: the plans in the group. Each plan has aname,category(for exampleSUBSCRIPTIONorPRE_ORDER),description,optionsandinventoryPolicy.reserve.{{ selling_plan_group.appId }}: the app that owns the group.{{ selling_plan_group.id }}and{{ selling_plan_group.createdAt }}: the group's ID and the date it was created.
For example, this lists every plan in the group:
{% for plan in selling_plan_group.sellingPlans %}
- {{ plan.name }} ({{ plan.category }})
{% endfor %}
To see everything a group contains, use {{ selling_plan_group | debug }}. See The debug Twig Filter.

The workflow does not include the products in the group, only how many there are. A group can hold any number of products, and a workflow cannot send more than 250 items to a loop. See Limits of Subworkflows & Loops.
Conditions
A store can have groups from more than one app. Add a condition so that the workflow runs only on the groups you want.
Where to find it: Selling Plan Group, then Merchant Code. For example, Merchant Code equals monthly-box stops the workflow for every other group.

Testing
When you click Select a Test Item, the list shows groups from every app on the store, newest change first. Search by the group's name. See Testing Canvas Workflows.
Examples
- Send your team an email or Slack message when a subscription offer is created, changed or deleted.
- Alert your team when a group no longer has any products, with a condition on the product count in an updated workflow.
- Send a group's details to a CRM or a spreadsheet with an HTTP request when it changes.