How to implement an intermediate step before the AI Agent handoff

Sometimes, you may want the AI Agent to gather more information before handing off a conversation. This helps prevent unnecessary handoffs and ensures that staff members have all the relevant information.

If someone requests to speak with a staff member, you might not want the AI Agent to immediately transfer the conversation. Instead, the AI Agent can first check if it can answer the question, ask a follow-up question, or request more details before the conversation is handed off to a human staff member. This approach allows the AI Agent to attempt resolving the query itself, avoiding unnecessary handoffs and ensuring agents receive complete information before handling incoming conversations.

This can be achieved by adding an instruction (in Instructions or Domain Knowledge) that guides the AI Agent on how to respond when someone wants to speak to a staff member. You can also include a specific codesentence that the end user must use to confirm they want the conversation to be handed off.

Setting up the intermediate step

Follow these steps to set up this intermediate step in your AI Agent.

Step 1: Identify handoff scenarios

Identify scenarios where handoff may be necessary. A common scenario is when a customer explicitly requests to speak to a staff member.

Step 2: Write the instructions

Decide what you want your AI Agent to ask or say before the handoff takes place. Configure the AI Agent with instructions on how to handle such requests. For example:


Step 3: Create the codesentence

Choose a unique codesentence or phrase that customers can use to trigger the handoff. This word should be uncommon in regular conversations to prevent accidental handoffs. Examples of codesentences could be "Please transfer me now" or "Holy melony." Include this codesentence in the instruction you wrote in Step 2.

Step 4: Configure the handoff

Set up the handoff as described in this article.

Use the codesentence(s) you included in the instructions as the trigger(s).


Step 5: Test and refine

Use the interactive tester to simulate conversations and ensure the AI Agent responds correctly in handoff scenarios. Adjust the instructions and triggers as needed based on the test results.

 

Examples

These examples provide clear guidelines on how the AI Agent can communicate with users in different contexts. The AI Agent first attempts to address the user's needs before facilitating a smooth handoff to human agents. Each scenario includes specific instructions and a unique codesentence to activate the handoff to a human agent.

Example 1: Technical Support Request

Scenario: A user needs technical support, which may require detailed troubleshooting.

Instruction (in Instructions): If someone requests technical support, first ask if they have already tried restarting their device. Regardless of their answer, then ask if they would like to proceed with detailed troubleshooting with one of our experts. If they agree, ask them to send the words “I would like detailed troubleshooting with one of the experts.”

Instruction (in Handoff)If someone wants detailed troubleshooting with one of the experts, indicate that you will forward the conversation to one of your colleagues.

Trigger: I would like detailed troubleshooting with one of the experts

Example 2: Product Return Inquiry

Scenario: A customer wants to return a product and needs information about the return policy.

Instruction (in Instructions)If a customer asks about returning a product, give a brief explanation of the return policy. Then ask if they need help from a customer service representative to process the return. If so, instruct them to send the words “I want return support.”

Instruction (in Handoff)If someone indicates they want return support, let them know you will forward the conversation to one of your colleagues.

Trigger: I want return support

Example 3: Booking an Appointment

Scenario: A customer wants to book an appointment, which requires checking availability and personal preferences.

Instruction (in Instructions)If a customer wants to book an appointment, first ask which service they are interested in and their preferred dates. After receiving this information, offer to connect them with a booking specialist for personalized service. If they want to proceed, ask them to send the words “Help with booking planning.”

Instruction (in Handoff)If someone wants help with booking planning, let them know you will forward the conversation to one of your colleagues.

Trigger: Help with booking planning