Day and time selection buttons
The day_choices and time_choices steps return a ready-to-use choice_buttons array for dynamic message buttons. The step finds options; the message displays them, and your flow decides what happens after a click.
Connect the blocks
| Source | Save to | Use in |
|---|---|---|
day_choices.choice_buttons |
run.yclients_day_buttons |
The dynamic button source for the day selection message. |
| Clicked day button | run.yclients_day_choice |
Read its value.date for time_choices.date. |
time_choices.choice_buttons |
run.yclients_time_buttons |
The dynamic button source for the time selection message. |
| Clicked time button | run.yclients_time_choice |
Read its value.datetime for appointment creation. |
Each search's next_cursor |
Separate day or time variable | The next call's cursor input for that same search. |
Enable saving the clicked button to a variable in the message. Use the dynamic-button selection outcome for the main continuation. The customer sees the label while the flow reads exact values from value.
First page and continuation
Initialize day and time cursors to empty strings before the first search. For nearby days, an empty date_from starts from today in the branch timezone. Save the returned date_from for subsequent pages.
page_size allows 1–10 options per page. Defaults are 5 days or 6 times. The day search range, range_days, is 1–31 days, defaulting to 14.
Save next_cursor after searching. For more results, call the same step with that value in cursor and the same parameters. A “More” button, a text command, or any other flow branch can trigger this. The step does not wait for or handle clicks itself.
has_more indicates another page. To avoid offering an empty continuation, use it to choose a message with or without a “More” button. A static button does not hide automatically. Continuing past the final option does not return the first page.
Do not combine cursor with a nonzero offset. Use choice_buttons for new flows: buttons remains available for the older format with an embedded continuation button.
A new day or a manually entered date
Clear both cursors when changing the service, staff member, or search range. Clear the time cursor when selecting a different day. Otherwise, the old cursor will not match the new search.
You can add your own “Another date” button and ask for a date as text. Choice steps accept YYYY-MM-DD, DD.MM.YYYY, DD.MM, and the Russian words «сегодня», «завтра», «послезавтра» (today, tomorrow, the day after tomorrow). A DD.MM date already past this year resolves to next year. Impossible or explicitly past dates lead to invalid_date.
Before creating the appointment
Selecting a day and time is not consent to book. Show a summary, collect the name and phone number, and request separate confirmation before create_booking_v2.
Disable repeated clicks on a message's buttons so an old choice cannot start another path. Route returns and “More” actions through bounded loops. If no days are found, offer another range or staff member; if no times are found, offer another day.