Skip to main content
Solved

"Since Starting This Flow" filter not accessible via API


tsalamazing
Problem Solver I
Forum|alt.badge.img+2

Hello, everyone!

I'm using Klaviyo's API to create a flow and I can't find a way to use the "since starting this flow” filter.

I think it's not accessbile through the api? At least that's what chatty (chatgpt) tells me lol.

Have you tried something like this? And if so, did you find a workaround? I'm thinking of using an "in the next X [time]” filter as an alternative.

So, if someone entered a welcome sequence that lasts 2 days and I wanted to stop it if they bought, I could probably add a filter of "placed order 0 times in the next 2 days”

Haven't thought much about the edge cases yet though

Best answer by Byrne C

Hey again ​@tsalamazing 

Using “last X days/hours” won’t throw people out of the flow based on something they did before entering the flow, as long as that filter is at a point in the flow where a person has been in the flow longer than the amount of time you chose for that filter.

For example, if you have an email that sends 1 day after somebody enters the flow, you can have an additional filter on that email that says “person has placed order zero times in the last 1 days.” Since that email exists 1 day into the flow, there wouldn’t be a risk of the filter excluding people who placed an order before entering the flow.

This won’t work for flow filters that you add to the trigger, but it’s useful for additional filters on messages, or splits that exist inside the flow, that occur a certain amount of time after the person has already entered the flow.

Let me know if this makes sense.

View original
Did this topic or the replies in the thread help you find an answer to your question?

8 replies

Christiannoerbjerg
Expert Problem Solver II
Forum|alt.badge.img+12

Hi ​@tsalamazing 

Thank you for posting in the Community!

You're correct that the "since starting this flow" filter isn't accessible via Klaviyo's API as of now. This is a feature that's specifically built into the Klaviyo flow builder UI, and unfortunately, the API doesn't expose such advanced flow-specific filters. However, your proposed workaround using relative time-based filters is valid and can be effective when implemented carefully. Here's how you can approach it:

Workaround: Using relative time-based filters:

To mimic the "since starting this flow" filter, you can leverage a relative time filter, such as "in the next X days," to achieve similar behavior. Here's how you could set it up:

  1. Set the Timeframe for Your Alternative Filter:

    • For a 2-day welcome flow, you can use:
      • Condition: "Placed Order 0 times in the next 2 days."
    • This ensures that if someone places an order within the timeframe of the flow, they will be excluded from receiving further emails in the sequence.
  2. Add this filter, when creating flow triggers via API:

    • Include a filter in the event data that checks for purchase activity using the placed_order event.
    • Example condition: trigger.data.["placed_order"] == 0.
  3. Edge case considerations: While this approach works well, it has a few potential limitations:

    • Timezone variance: Ensure your flow timing aligns with the time zone of your customers.
    • Concurrent triggers: If the customer enters another flow or sequence during the timeframe, conflicts may arise.
    • Purchases after the time window: If the customer places an order just outside the "next 2 days" window, the flow won't stop.

You can try the above. I hope that helps! :-) 

Christian Nørbjerg Enger
Partner & CPO
Web: Segmento.dk
LinkedIn: @christianfromsegmento
Voldbjergvej 22b, 8240 Risskov


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • January 7, 2025

Hello ​@tsalamazing 

You're right, Klaviyo's API doesn't have a "since starting this flow" filter. Your workaround idea using the "in the next X time" filter (e.g., "placed order 0 times in the next 2 days") should work.

 

Just be cautious about edge cases like users buying just before or during the flow, which could cause timing issues. You might want to track when they enter the flow and use that timestamp for better accuracy.

 


Amos Peace
Problem Solver III
Forum|alt.badge.img+5
  • Problem Solver III
  • 47 replies
  • January 7, 2025

Hi ​@tsalamazing 

You're right that the "since starting this flow" filter is not directly accessible through the Klaviyo API. Currently, Klaviyo doesn’t provide a built-in way to pull this specific data via the API. However, your workaround of using an "in the next X [time]" filter is a good approach for scenarios like the welcome sequence you mentioned.

For your example, setting a condition like "placed order 0 times in the next 2 days" could help achieve a similar result. Just be aware of edge cases, like users who might make purchases on the 2nd day and still remain in the flow or scenarios where the timing could be misaligned due to varying time zones.

Another option could be using custom event triggers or properties to track flow progression and prevent unwanted actions, although this may require additional setup.

Hope this helps and gives you a good starting point.


tsalamazing
Problem Solver I
Forum|alt.badge.img+2
  • Author
  • Problem Solver I
  • 9 replies
  • January 7, 2025

So, this forum only has ChatGPT answers, then?


DavidV
Partner - Platinum
Forum|alt.badge.img+30
  • 2025 Champion
  • 207 replies
  • January 7, 2025

Hi ​@tsalamazing,

Welcome to the Klaviyo community. I can confirm I’m made of flesh and blood here haha.

I was thinking of another option that could potentially be used here which would be the webhook functionality inside of a flow. 

This would allow your own system to pick this up, and return a new event into the Klaviyo account to trigger a follow up flow. Something like this:

 

Klaviyo has a solid piece of documentation called Understanding Webhooks in flow.

Hope that’s helpful!

Thanks
David


Byrne C
Community Manager
Forum|alt.badge.img+10
  • Community Manager
  • 72 replies
  • January 8, 2025

Hi ​@tsalamazing!

Thanks for the question. I assume your goal is to have people who made a purchase leave the flow, correct? In that case, you can use the workaround of having additional filters on each email/SMS in the flow that check if a profile has placed an order in the last X days/hours (where X is the amount of time since the flow began). I get that this is a little bit more manual, but the result would be that these actions are skipped for any profile who has placed an order, essentially achieving the same result.

DavidV’s solution is also a great option.

Let me know if this helps, or if I can explain a bit more.

Have a great week.

-Byrne


tsalamazing
Problem Solver I
Forum|alt.badge.img+2
  • Author
  • Problem Solver I
  • 9 replies
  • January 8, 2025

Thank you for your answers!

 

While the webhook is the cleanest solution, it does not fit my use-case unfortunately, since I need it to be self-managing, without hitting any other endpoints to stop flow.

 

As for the filter, using "last” days instead of "next” days makes it so that you might get thrown out of the flow because you did something before entering the flow, no? 


Byrne C
Community Manager
Forum|alt.badge.img+10
  • Community Manager
  • 72 replies
  • Answer
  • January 10, 2025

Hey again ​@tsalamazing 

Using “last X days/hours” won’t throw people out of the flow based on something they did before entering the flow, as long as that filter is at a point in the flow where a person has been in the flow longer than the amount of time you chose for that filter.

For example, if you have an email that sends 1 day after somebody enters the flow, you can have an additional filter on that email that says “person has placed order zero times in the last 1 days.” Since that email exists 1 day into the flow, there wouldn’t be a risk of the filter excluding people who placed an order before entering the flow.

This won’t work for flow filters that you add to the trigger, but it’s useful for additional filters on messages, or splits that exist inside the flow, that occur a certain amount of time after the person has already entered the flow.

Let me know if this makes sense.