How can I get the id of customers in run code

So I currently have a flow that is triggered when a tag is added to the customer and a condition that checks if the tag is pending approval. If it is, I want it to run code to check if the current date - customer’s created at date is greater than a certain period of time (let’s pretend its a month for now). However the run code graphql Query needs a customer id to query the created at date. How can I get that for each customer and apply that in the flow?

you should be able to just include the liquid variable {{ customer.id }} since its already given to you based on the trigger you selected

I don’t want to check for a certain customer/customer id, but I want to check if each of the current_time - customers created at time for each customer when customer tag is added is greater than a month in run code. Then if it is, delete the customer.

Never mind I have solved the problem. Thanks!

1 Like

For others could you share how you solved the problem.

You can reply to your own post and mark it as a solution