1

Break down the conversation into steps

In each step, you can define a prompt.

2

Define state transition logic

Just like in the “Lead qualification” template, you can have this prompt to define when to transition to the next step like if users say “yes” to the question, transition to your_next_state state.

7. Ask if user is interested in an in person tour.
 - if yes, transition to schedule_tour.
 - if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
3

Define when to call the function

Just like in the “Lead qualification” template, you can have this prompt to define when to call the function like call the your_function_name function to book the appointment.

3. Confirm the date, time, and timezone selected by user: "Just to confirm, you want to book the appointment at ...". Make sure this is a time from the available slots.
4. Once confirmed, call function book_appointment to book the appointment.

Video tutorial: