I have a flow where other flows may add a customer tag to trigger other flows - kind of a workflow control method.
Flow 1 - when customer joins a segment, add customer tag “CalculateMemeberDiscount“
Flow 2 - when customer submits a form, add a customer tag “CalculateMemeberDiscount“
Flow 3 - when customer tag “CalculateMemeberDiscount“ is added, update customer metafields and remove customer tag “CalculateMemeberDiscount“
This is a simplified example, in reality the customer tag may be added in 4-5 different scenarios that should trigger Flow #3
This generally works fine, but in rare cases (4 customers out of 500,000) I can see that the tag is added (by flow 1, 2, etc.). However, I can see that Flow 3 has run, say 5 times, but none of the times due to “CalculateMembership“ being added.
So, I am thinking that either
Flow trigger for customer tag added doesn’t run if the tag has been added multiple times in a quick succession
Flow trigger for customer tag doesn’t always run?
What I can do is setup a segment to track these failed to process customers and then re-process them by removing the tag and adding it again - in which case it almost always seems to work. However, this flow should run almost without latency, so that’s not an ideal solution.
Are you considering using third-party apps as an alternative?
Currently, the Flow Companion app has triggers that track the addition and removal of tags on orders and products. The app stores the previous tag values in a separate metafield so that when an object changes, the app compares the previously saved value with the new one. This approach makes false trigger activations almost impossible (though there remains an extremely small chance if a GraphQL error occurs on Shopify’s side at the start of the workflow but the workflow would still start despite the error, and when the app retries, it could trigger once more). It’s also extremely unlikely for a trigger to run without the tag that actually being added, since the logic always compares the old tags value with the new one before activating the trigger.
We can add a similar tag-tracking mechanism for customers in Flow Companion.
I am not interested in another app at this point, since Shopify Flow supports the functionality. I’d rather Shopify Flow is fixed (if there is in fact an issue)
Hi, I confirmed with the event team that the “Customer tags added” webhook topic is debounced, so if there are rapid changes in them, it will not generate an event. This isn’t a bug by design.
This isn’t an edge case of Flow per se but of webhooks. Tags aren’t really designed to be stateful like you are using them here and most often when rapid changes happen (where a tag is added and removed quickly), people really just need to know where it ended up.
Ok fair. Do you think it would be a better solution to set a metafield on the customer and have segments filtering on those metafields and then have segment based triggers?
As far as I understand from @Evaldas_Raisutis ‘ original message, the customer’s final tag state should have included the CalculateMemeberDiscount tag. This tag was added in several other workflows and, apart from Flow 3, was never removed. @Evaldas_Raisutis mentioned that only Flow 3 removes it.
Flow 3 was supposed to remove the tag after updating the metafield, but the flow never executed because it never received a trigger indicating that CalculateMemeberDiscount tag had been added to the customer.
That looks like an inconsistent state: the customer has tag, but Flow 3 never became aware of it.
@paul_n, I believe your point was that Flow 3 can miss the tag added event if the tag is added and then quickly removed outside Flow 3. That’s a valid scenario, but, as I understand the situation, it doesn’t appear to be what happened here.
@Evaldas_Raisutis, in case you decide to give it a try, we’ve added new triggers to the Flow Companion app that allows tracking changes in customer tags. The tag change tracking is reliable because even if a webhook is missed by the app for any reason, the app scans all customers every 30 minutes who have been updated within the last 30 minutes to check for any missed changes.