Subscription contract updated
The Subscription contract updated trigger starts a workflow when a user in your organization or a third-party app updates a subscription contract.
The Subscription contract updated trigger contains the following fields, which can be used in conditions and actions, and to get data in the workflow:
|Subscription Contract||The subscription contract that was updated.|
|Customer||The customer who the updated subscription contract belongs to.|
|Shop||The shop where the contract was updated.|
Because the trigger returns the Subscription Contract, Customer, and Shop fields, actions that require those fields can be used with the trigger, such as:
- Add customer tags
- Create redirect URL
- Delete redirect URLs
- Remove customer metafield
- Remove customer tags
- Remove shop metafield
- Send fulfillment request
- Send HTTP request
- Send internal email
- Update customer metafield
- Update customer note
- Update shop metafield
In this example workflow, a tag is added to a customer when a subscription contract is updated.
Testing the Subscription contract updated trigger
To test a workflow that starts with this trigger, create a subscription through the storefront then edit the resulting subscription contract via the subscription app you have installed. If you're using a third-party subscription app, then refer to the app's documentation for editing a contract. If you're using the first-party Shopify Subscriptions app, then refer to its documentation for editing a contract.
The Subscription contract updated trigger allows actions to be taken with the SubscriptionContract Graphql API object.