Adding Data to SHOPIFY SUBSCRIPTION CONTRACT

Adding Data to SHOPIFY SUBSCRIPTION CONTRACT

SayMoo
Shopify Partner
2 0 1

Hi, we have a particular Shopify setup where product data is added by Custom Attributes, this is fine on standard orders but with Subscription Contracts the Custom Attibute data is not displayed, either in the admin or customer account. The subscriptions are hosted by Shopify and not themed.

 

I thought maybe when a subscription is added, doing a flow that added a dummy variant.

I have being able to trigger this on normal orders but not subscriptions.

 

Using SEND ADMIN API, I have attempted to create a draft subscription to add the Variants to, but I get the attached error. I don't seem to be able to get the right code for line and variant ID. Has any used this flow to amend a subscription?

kind regards

 

Replies 2 (2)

tabitha_pro
New Member
7 0 2

It sounds like you're dealing with a complex issue involving Shopify's Subscription Contracts and custom attributes. Here's a breakdown of the problem and potential solutions: 

Custom Attributes Not Displaying Custom attributes added to products are not visible in the admin or customer account for subscription orders

  1. Subscription Contracts: Subscriptions are hosted by Shopify, and the data flow differs from standard orders.

  2. API Limitations: You're encountering errors when trying to modify subscriptions via the Admin API, specifically with  line and varient Let me know if you need further clarification or help! MAIL : tabithamarketer304@gmail.com

Promer
Shopify Partner
114 5 49

Hi @SayMoo 

 

You're on the right track trying to modify Shopify Subscription Contracts via the Admin API, but Shopify has strict limitations on altering subscription line items once they're created. Here are some possible solutions:

  1. Check the Shopify subscription API – Ensure you're using the right API endpoint, as subscription orders behave differently from standard orders. The subscriptionContractUpdate mutation may help.
  2. Use metafields for custom attributes – Instead of modifying the subscription contract directly, store your custom attribute data as metafields on the product or customer, then retrieve it when needed.
  3. Automate with Shopify flow + webhooks – You can trigger Shopify Flow to capture the product attributes before the subscription order is placed and store them externally.