Heya jucio,
Could you be more precise as to what you meant by "I wanted to be able to use wait which is not possible because it would be all in a single block"?
What does adding a Wait block have to do with everything to be in a single block?
Also, it could be interesting to ask yourself how you would do it in PHP logic wise, since you'd know how to do it in that language. Then you'll be able to transpose it to Typebot once the logic is there.
So if I reframe your concern, you are asking the user if they have a specific disease, one after the other, with "Yes" or "No" buttons, and you'd like to return a conditional diagnosis based on the combination of diseases they claimed to suffer from.
That's a very interesting problem, I'll need to think a little more about it to provide the most optimal solution.
Out of the box, I'd say what would be best is to create a Google Sheets file with the rows to be each final diagnosis name, and each column to be a disease.
The value of each cell would be a checked (true) or unchecked (false) checkbox, effectively specifying each diagnosis' disease.
You'd then use that in your Typebot, where your user's responses would fill an array of boolean values ([true, false, false, true...]
), which you'd check if any of the diagnosis in your Google Sheets matches those criteria, and return the diagnosis name (row) matching them.
Would that sound about close to what you want to achieve?
Also, instead of asking for each of the 10 symptoms (disease?) with a "Yes" or "No" question, why not have multiple-choice (optionally searchable) buttons, so that the user can immediately select all symptoms they have, which would populate a list with them as a variable?
That seems like a better user experience for you and for them.
Woah, I think I got the exact thing you wanted and needed. Let me show you
I created a Google Sheet (3rd screenshot above), containing the name of each disease the bot can diagnose, along with their respective symptoms, possible treatments and its description. (Note that this is sample data)
I made it so that the bot asks the user about their symptoms, which they can bulk select at once and even search for the available ones.
It then looks up the Google Sheets file, store each columns cells' values in their respective variable.
Then I returned the row data that matches the symptoms list and display it back to the user.
And I just added a condition so that it returns a different message stating it didn't find a disease that has the selected symptoms. Which simply checks if disease
is empty.
Hey my dear, thank you for your time. In the case of the flow, it's like this. I already have the API in PHP that counts how many yeses each disease block had. For example, if in the insomnia block there were 2 or more yeses, the API sends me a variable that would make the disease warning block appear, and another block followed by a wait (Typebot block) should appear, and then the recommendation block. I have the API. What's missing would be to make this run in Type, because if the person marked yes in all or no in all, okay? I do that in the set condition block. Now, for example> the person had disease 1,3,5,7, diseases 1,2,4,6,8,9,10 should not appear. Another problem would be if the person only has disease 10, only that should appear, followed by its text: 1) disease text + wait + recommendation. The difficult part is this... people answer yes with yes or no buttons. Could Type help me with this?
Hey jucio,
I'd be curious to see screenshots of your flow and of the bot in action to better visualize your current issue and help you
Also, since you already have the API, it means that the structure that the yes/no's data has to follow needs to be specific