Sales Channel Metafields

ashleyvdp
Tourist
7 0 1

I need to require some additional info for a product to be published to my sales channel.  

 

I'm trying to add a new metafield via the API to a product, but it's returning an error message saying I need to populate the value...but I don't know the value, I need the merchant to fill that in...Not sure how to handle this?

 

Thanks!

0 Likes
srdjan
Shopify Staff
Shopify Staff
7 1 2

Hello,

 

How would the merchant fill in the value? Is that something that is happening through the UI of your sales channel?

0 Likes
ashleyvdp
Tourist
7 0 1

I was following this documentation - see step 2 under product publishing.  https://shopify.dev/tutorials/build-a-sales-channel-onboarding-and-account-connection-flow#product-p...

 

My understanding was that if I added a metafield, they would be able to set that metafield in their admin > products section.

0 Likes
srdjan
Shopify Staff
Shopify Staff
7 1 2

So, that tutorial isn't very clear. The UI for editing the metafield value is provided by the sales channel app through the use of Admin Link app extension. The tutorial for doing that is here. So, your sales channel app needs to create the UI that allows a merchant to fill in the value, and only then can you save the metafield through the API.

0 Likes