We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Metafield on Customer updated as trigger for Shopify flow

Metafield on Customer updated as trigger for Shopify flow

ml44
New Member
11 0 0

Hi there, 

 

I would like to create a flow when a metafield on customer is added or updated. I looked for the trigger but I couldn't find "customer updated", only saw "customer created", "customer deleted", etc. Am I looking for the right trigger for that purpose? Or do I need to create a trigger for this purpose? Any suggestions on how to handle this? Thank you 🙏

Replies 5 (5)

ml44
New Member
11 0 0

I think I found the answer from this post below, but does anyone have better suggestions? Also, if I need to use webhook, what type of event I need to listen to? I don't see anything listed about metafield for customer in this list, https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-customers/update.  Dose it consider customer/update? Will appreciate any help. 

 

https://community.shopify.com/c/webhooks-and-events/metafield-updates-triggering-webhook-messages/td...

DaveMcV
Shopify Staff
104 31 31

Hi @ml44,

 

Flow doesn't have a customer updated trigger available yet because the event that is provided doesn't provide context on what actually changed. So in that case, there would not be a native way to distinguish a metafield change event from other customer updates.

 

These sort of events are on the team's radar but I don't have anything I can share about that yet.

 

In the interim, it could be worth understanding what action would set or update the metafield value. Maybe there is a different event which could still work for your purpose (ie when order created, if the lifetime value is greater than some number, set a metafield)

 

Hope that helps.

DaveMcV | Flow Development Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
ml44
New Member
11 0 0

Hi DaveMcV,

 

Thank you for your reply. What we try to do is that when a shopify customer takes some actions on our shop, we want to add a metafield to their customer account. we would like to keep track of that metafield's change. I know we could have listen to those actions that taken by the customer, but we just try to do that from 1 place, instead of multiple sources. 

ml44
New Member
11 0 0

Hi @DaveMcV 

 

Do you know what kind of actions taken in the Shopify site will trigger customers/update event? So far I saw when an order is placed, that event is triggered. Do you know why? Thank you in advance. 

 

DaveMcV
Shopify Staff
104 31 31

I believe it will include any edit you make on the Customer page in the Admin, as well as some actions like adding address, etc. 

DaveMcV | Flow Development Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.