Whatsapp Flows - CheckBox Use Case
1

I am trying to configure the my flows json to be such that, If there is a checkbox with multiple options, let's say A, B, C and D

Now the user can select any of these and go to the next screen (let's call it 'Final').

If the user selects A, I want the user to go to screen Q_A before going to Final If the user selects B, I want the user to go to screen Q_B before going to Final and if the user happens to select both of them, then both of these screens should be visited before going to Final.

I have been trying to use CheckBoxes with Switch but that isn't working out too great for me. Any idea how I can pull this off?

Sarthak
Pregunta realizada hace aproximadamente un mes
Respuesta seleccionada
1

There is unfortunately not easy way to do this without adding an endpoint to your Flow. You can learn more on how to do that here, and an end-to-end example here.

Alternatively, you can potentially change your Flow design, and instead of navigating to multiple screen, try fitting everything on one screen. This way, you can use the "If" and/or "Switch" components to dynamically show/hide other components on the same screen based on the CheckBox selections.

23 de septiembre a las 8:57 a. m.
Bar
Sarthak

Okay thanks, do you know how I can do this based on the checkbox selections though? like let's say-

I have 2 checkboxes A and B, and in the case A is selected, text "A is selected" should get displayed below that.

I know how to do this for radiobuttons but haven't been able to find the doc for checkboxes.

23 de septiembre a las 12:11 p. m.
Tamer
{
                                "type": "CheckboxGroup",
                                "label": "LABEL",                              
                                "name": "options",
                                "data-source": {.....},                              
                                "on-select-action": {"name":"data_exchange", "payload": {"data1":"${form. options}"}
                            }

Then when you call your endpoint return the data for your text

26 de septiembre a las 10:00 p. m.