Voiceflow PartnersVPVoiceflow Partners
Powered by
Tom  KuhlT
Voiceflow Partners•2y ago•
9 replies
Tom Kuhl

Iterating through multiple conditions and connecting to multiple blocks

As mentioned in an earlier post, I prompted GPT4 to build a date range selection function to return weather forecast data for upcoming trips to a destination.

It works by asking for an arrival data and departure date then assigns them a day number from the current date. For example:

Today is 05/21/2024 which is returned as Day0.

If a traveler gives a arrival date of 05/22/2024 and a departure date of 05/24/2024 the function returns the following:

Day0 = 0
Day1 = 1
Day2 = 1
Day3 = 1
Day4 = 0
Day5 = 0

etc…

With the function working, I setup conditions for all the days:

If Day0 is 1
If Day1 is 1
If Day2 is 1

etc… Go to a corresponding block.

My problem is that Voiceflow is not iterating through all the conditions. Voiceflow stops at the first condition that is equal to 1 and will not continue.

In the above example, Voiceflow sees Day1 = 1 and goes to a block for Day1 data then stops.

I need Voiceflow to iterate through every conditions and go to a separate block for each condition that is equal to one.

Using the above example again:

Voiceflow should see Day0 = 0 and go to the next condition.
Then see Day1 = 1 and go to a block for day one, and…
Then see Day2 = 1 and go to a block for day two, and…
Then see Day3 = 1 and go to a block for day three, and…
Then see Day4 = 0 and go to the next condition, and…
Then see Day5 = 0 and go to the next condition, and so on.

How do I iterate through multiple conditions in Voiceflow?
Voiceflow Partners banner
Voiceflow PartnersJoin
Exclusive community for Voiceflow Solutions Providers & Content Creators.
13,076Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
jacklyn

# Let your agents search the web 🔎 Hey everyone! We just released the web search tool for the agent step! Your agents can now automatically search the web for information, letting your agent supplement the LLM's knowledge and the data in its knowledge base with live, up-to-date information. Plus.... * You can restrict searches to specific domains, so your agent only searches sites that you own * This is a tool, so you remain in control of when the agent searches the web * Results are automatically summarized in a way that your agent can automatically understand Under the hood, we're using OpenAI's web search API. Give it a try, and let us know what you think! https://docs.voiceflow.com/changelog/native-web-search-tool

jacklyn · 4mo ago

jacklyn

jacklynbiggin's Thread

jacklyn · 4mo ago

hurt-tomato

connor_maclean's Thread

hurt-tomato · 4mo ago

Similar Threads

Iterating through multiple blocks - Part 2
Tom  KuhlTTom Kuhl / ❓┃ask-a-question
2y ago
Using conditions with multiple blocks
Tom  KuhlTTom Kuhl / ❓┃ask-a-question
2y ago
Triggering Multiple Exit Conditions
SaadatSSaadat / ❓┃ask-a-question
2mo ago
Answering multiple text blocks instead of just one
dual-salmonDdual-salmon / ❓┃ask-a-question
2y ago