What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to update Company metafield value?

Solved

How to update Company metafield value?

mwood11
Shopify Partner
3 0 0

I am needing to update the metafield values on my Company objects within my shopify app. Is there a way to do this using the GraphQL Admin API similar to updating the metafields on a Customer? Thanks

Accepted Solution (1)

Liam
Community Manager
3108 344 895

This is an accepted solution.

Hi Mwood11,

 

You should be able to use the metafieldsSet mutation to update the value of any metafield whether it's associated with a product or in your case a company. Try this out and let us know if you're encountering issues. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

Liam
Community Manager
3108 344 895

This is an accepted solution.

Hi Mwood11,

 

You should be able to use the metafieldsSet mutation to update the value of any metafield whether it's associated with a product or in your case a company. Try this out and let us know if you're encountering issues. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

mwood11
Shopify Partner
3 0 0

Thanks Liam!

Would metafieldSet also work to add metaobject entries to a Metaobject (List) metafield using the metaobject entry ids?