How can I get the id of customers in run code

How can I get the id of customers in run code

AH63935
Shopify Partner
35 1 27

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?

AH63935_0-1730143027949.png

 



AH63935_1-1730142910629.png

 

 

Replies 4 (4)

yodankful
Shopify Partner
18 0 11

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

 

CleanShot 2024-10-28 at 12.25.20@2x.pngCleanShot 2024-10-28 at 12.26.29@2x.png

AH63935
Shopify Partner
35 1 27

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.

AH63935
Shopify Partner
35 1 27

Never mind I have solved the problem. Thanks!

PaulNewton
Shopify Partner
7450 657 1562

For others could you share how you solved the problem.

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

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org