Hello!
I’m trying to implement a Cart Validation function to only allow customers that have overlapping tags with the products in their cart to check out.
My primary issue is setting up the function input metafield. The metafield won’t be updated by the user as the tags are programmatically set by my embedded app (which using an embedded app is supported according to the docs), so I don’t need the admin extension.
I cannot figure out how to update the metafield with the string array of tags. My thought was to use metafieldsSet, but I don’t have a clue what the “ownerId” is. I also looked into the code of the admin extension, but there’s no actual graphql operation that I can see that I could just port over to update the metafield data.
Any help would be greatly appreciated!