I am working on app which implement shopify functions. I create products discount function and all is working fine for me. Now, i try to use variables in input.graphql. I want to offer products discount only to customers with selected tags. Only way i know to do it, is hard coded customers tags in input.graphql (i am sending print screen in attachement). Is there some way i can use dynamic variable with customers tags in input.graphql? For example, can i use customers tags variable from metafield there somehow? If yes, can you plase write me example how to use it in input.graphql and main.rs?
Thank you so much.
Hi @Adam_Čvikota! We don't support this yet, but it's in the roadmap for the near future. We intend to have a mechanism for you to define variable values for the input query.
Variables are now supported in input queries, details are here:
I am having the same problem.
I found this:
Where it returns a simple boolean if one of the list of tags is in the customer tags. Whereas the other returns an object with boolean and the tag's themselves.