How to create a flow for a product subscription contract that searches a product SKU #

Hi all

We are using Seal Subscriptions for our product subscriptions.

We are trying to write a flow that will search the subscription contract for the product SKU # (ie, SKU FG3610) and add a product SKU tag to the customer profile saying what they purchased as a subscription.

I’ve spoken to Seal Subscriptions and Shopify, and neither of them knows how to do this.

I am trying to create a flow that will:

  • Start when a subscription contract is created
  • Waits 5 minutes for the subscription contract to be fully created
  • Searches a Subscription Contract for a product SKU # (ie, SKU FG3610)
  • Adds a tag to the customer profile saying what SKU the subscription contract is for (ie, SKU FG3610)

I’ve found a subscription flow that adds customer tags for subscription interval such as “1 Month”.

What code do I need to add to this flow to be able to have it search for a SKU #?

I’m new to flow so any help would be greatly appreciated.

Thank you in advance.

Christian

1 Like

You may be better off just first trying to tag* orders what that sku in a separate flow.

Then try and use the originOrder property in the subscription-contract-created if available to get the contracts related order and check the tags.

  1. https://help.shopify.com/en/manual/shopify-flow/reference/triggers/subscription-contract-created
  2. https://help.shopify.com/en/manual/shopify-flow/reference/actions/log-output
  3. https://help.shopify.com/en/manual/shopify-flow/reference/actions/get-subscription-contract-data
  4. https://shopify.dev/docs/api/admin-graphql/2023-10/objects/SubscriptionContract#field-subscriptioncontract-originorder

*Or if custom attributes are read and not writes on this object set custom attributes on the order then read the attributes

https://shopify.dev/docs/api/admin-graphql/2023-10/objects/SubscriptionContract#field-subscriptioncontract-customattributes

1 Like

You should be able to simply query products on the SKU via graphql. Paul’s suggestion may be better though since he obviously has a ton of experience with flow.