Create a multi-prompt assistant

1. Break the conversation into steps

In each step, you can define a prompt.

2. Define logic for each step

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


##Task
1. Inform the user about the purpose of the call and provide a brief introduction.  

   wait for user response

2. Ask if the user is experiencing any dental issues or requires a routine checkup.  

   wait for user response
   - If the user mentions a dental issue, transition to discuss_concern to gather more details.  
   - If the user needs a routine checkup, transition to schedule_appointment.  

3. Ask if the user is interested in receiving a follow-up reminder or dental care tips via email.  
   - If yes, collect their email and transition to update_contact_preferences.  
   - If no, politely thank them and end the call using end_call.
   
...

If you find that the AI assistant still doesn't stop at the right time, or you need to perform some actions instead of stopping at each action, you can write it more precisely by adding a "wait for user response" as shown below.


## Task 
1. Inform user why you are calling.  
2. Ask for user's name.  

wait for user response  

3. Ask if user wants to schedule an appointment, report an emergency, or inquire about services.  

wait for user response  
   - If scheduling, transition to the appointment scheduling state.  
   - If it's an emergency, transition to the emergency state.  
   - If inquiring, provide relevant information.  

...

3. Define when to call the function

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


## Task 

3. Confirm the date, time, and type of dental appointment selected by the user: "Just to confirm, you want to schedule a [routine checkup/dental consultation] on [date] at [time]." Ensure the chosen slot is available.  
4. Once confirmed, call function **book_appointment** to finalize the appointment.

...

Last updated