Skip to main content
Solved

Is there a way to loop a flow in Klaviyo using code?

  • December 16, 2024
  • 7 replies
  • 114 views

talhahussain
Expert Problem Solver I
Forum|alt.badge.img+9

I’m working on customizing flows in Klaviyo and was wondering if it’s possible to programmatically loop a flow. For example, after reaching the end of a flow, triggering it to start again automatically via code or API. Is there any supported method, workaround, or best practice for achieving this within the Klaviyo platform? Any guidance or insights would be greatly appreciated.

Best answer by saulblum

If you’re using a date property-triggered flow, you could also use the Create or Update Client Profile call to update the date profile property the flow’s triggered on to a date in the future, so the flow will again trigger for the profile.

7 replies

KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • December 16, 2024

Hi ​@talhahussain,

Check out Klaviyo’s Webhook capabilities! You can use a Webhook to make an API call and this can achieve your purpose.

In the simplest form, imagine a flow like this…

  • Triggered via an event (Metric Flow)
  • At the end, there’s a webhook that calls Klaviyo and triggers the same event again

Hope that helps.

 

Best,

Kevin.


talhahussain
Expert Problem Solver I
Forum|alt.badge.img+9
  • Author
  • Expert Problem Solver I
  • December 16, 2024

Thanks for Helping 


talhahussain
Expert Problem Solver I
Forum|alt.badge.img+9
  • Author
  • Expert Problem Solver I
  • December 16, 2024

Would you allow me to share an idea on how to approach that?


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • December 16, 2024

Sure! What’re you thinking?


talhahussain
Expert Problem Solver I
Forum|alt.badge.img+9
  • Author
  • Expert Problem Solver I
  • December 17, 2024

How to at the end, there’s a webhook that calls Klaviyo and triggers the same event again??


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • December 17, 2024

Yes, does that make sense? You can read more about webhooks here: https://help.klaviyo.com/hc/en-us/articles/4534329515931.

 


Forum|alt.badge.img+7
  • Klaviyo Employee
  • Answer
  • December 18, 2024

If you’re using a date property-triggered flow, you could also use the Create or Update Client Profile call to update the date profile property the flow’s triggered on to a date in the future, so the flow will again trigger for the profile.