Is there a way for the agent to distinguish inboun...
# support
s
I am trying to get the agent to respond the way someone would for outbound calls (conversational/sales) and respond the way someone would for inbound calls (conversational/supportive/customer service). Example: agent calls me then responds like I called it.
v
@Steward C Absolutely, I can help with that. When making outbound calls, the agent should initiate the conversation with a friendly and professional greeting, explain the purpose of the call, and then engage in a dialogue tailored to the call's objectives, which could be sales, information gathering, or customer outreach. Conversely, for inbound calls, the agent should greet the caller warmly, thank them for calling, and promptly ask how they can assist. The focus should be on listening, understanding the caller's needs or issues, and providing solutions or support in a helpful and empathetic manner. Would you like to go through a specific scenario for either an outbound or inbound call to see how the agent would handle it?
You can continue this conversation by mentioning me in the message.
s
yes, agent calls me then asks me how it can help me today vs pitching services.
v
@Steward C Certainly! If an agent is making an outbound call but wants to take a more consultative approach rather than directly pitching services, the conversation might go something like this: Agent: "Hello [Your Name], this is [Agent's Name] from [Company]. I hope you're having a great day! I'm reaching out to see if there's anything we can assist you with or improve in your experience with our services. How can I help you today?" This approach is less about making a sale and more about building a relationship and understanding the customer's needs, which can lead to opportunities for providing value and potentially discussing services that could be beneficial to them. Would you like to role-play this scenario further or discuss different strategies for outbound calls?
s
how does it know if its calling vs when it is receiving a call?
v
@Steward C The system differentiates between inbound and outbound calls based on the call initiation process. For outbound calls, the system actively dials a number and waits for the person to pick up. In contrast, inbound calls are received when a person dials into the system, and the system answers the call. In practice, the system would have different triggers or event listeners for inbound and outbound calls. For outbound calls, the system would execute a script designed to initiate contact and potentially offer services or support. For inbound calls, the system would recognize an incoming call event and switch to a customer service mode, ready to assist the caller with their inquiry or problem. The context in which the system operates would typically be pre-programmed, so it knows its role (making a call or receiving a call) based on the workflow that's been initiated. Would you like more technical details on how this is implemented, or is there another aspect of the call process you're interested in?
s
so how should an agents prompt be setup to help the agent speak to each scenario. An outbound call that is just reaching out vs an inbound call looking to help the caller or direct him/her to appropriate person.
v
@Steward C To ensure the agent handles each scenario appropriately, you would set up distinct prompts for outbound and inbound calls. Here's how you might structure them: Outbound Call Prompt (Reaching Out): "Hello, this is [Agent's Name] from [Company]. I'm calling to check in with you and see how everything is going with [product/service they use]. Is there anything you need assistance with or any feedback you'd like to share to help us serve you better?" Inbound Call Prompt (Supportive/Customer Service): "Thank you for calling [Company], this is [Agent's Name] speaking. How may I assist you today? Are you looking for support with any of our products/services, or is there someone specific you would like to speak to?" For the outbound call, the prompt is designed to be open-ended and conversational, encouraging the customer to share their thoughts and needs. For the inbound call, the prompt is welcoming and immediately offers assistance, signaling readiness to address the caller's needs or to direct them to the right person or department. These prompts can be further customized based on the context of the call, the nature of the business, and the information available about the customer. Would you like to explore more variations or implement these prompts into your system?
s
how should the first message be setup?
v
@Steward C For an effective first message in both outbound and inbound call scenarios, the message should be clear, concise, and tailored to the call's purpose. Here's how you might set up the first message for each scenario: Outbound Call First Message: "Hi, this is [Agent's Name] from [Company], giving you a call to touch base and see how you're doing with our [product/service]. We value your feedback and are here to help with any questions or concerns you might have. How has your experience been so far?" Inbound Call First Message: "Thank you for calling [Company], this is [Agent's Name]. I'm here to help you with whatever you need today. Can you tell me a bit more about what you're calling about so I can assist you better?" These messages are designed to initiate a positive interaction, whether reaching out to the customer or responding to their call. They set the tone for a helpful and customer-focused conversation. If you have a specific context or company details, I can further tailor these messages to fit your needs. Would you like to proceed with that?
s
I mean the space before the system prompt
v
@Steward C I apologize for any confusion. If you're referring to the initial setup before the system prompt is delivered, it's important to ensure that the agent's environment is prepared to handle both outbound and inbound calls effectively. This setup involves configuring the system to recognize whether a call is inbound or outbound and then delivering the appropriate prompt based on that context. For an outbound call, the system would be set to initiate the call and, upon connection, deliver the prompt designed for proactive outreach. For an inbound call, the system would detect an incoming call, answer it, and then provide the prompt designed for customer service. The space before the system prompt is essentially the preparation phase where the system determines the call type and selects the correct script or prompt to use. This is typically handled by the call routing and management system, which might include: - Caller ID recognition - Call direction flags (inbound or outbound) - Pre-call information (customer history, previous interactions) - Call scripts tailored to the call type Once the system identifies the call type, it will proceed with the corresponding prompt to engage the caller appropriately. Would you like to know more about the technical setup or how to implement these features in a voice API system?
s
I'm talking about the box that says first message: The first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
v
@Steward C Ah, I understand now. The "first message" setting in the context you're referring to is used to configure the initial greeting or statement that the voice assistant will say or play when the call is connected. This message can be tailored for both outbound and inbound calls. For outbound calls, you might set the "first message" to a friendly greeting that also identifies the caller and the purpose of the call. For example: Outbound Call First Message: "Hello, this is [Agent's Name] from [Company]. We're reaching out to our valued customers today to ensure you're satisfied with our services and to offer any assistance you might need. How can I help you today?" For inbound calls, the "first message" should be welcoming and prompt the caller to start the conversation. For example: Inbound Call First Message: "Thank you for calling [Company], where your satisfaction is our priority. This is [Agent's Name], how may I assist you today?" If you prefer to use a pre-recorded audio file for the first message, you would record these messages, save them as audio files (mp3, wav, etc.), and then provide the URL to the file in the "first message" box. When the call connects, the system will play the audio file corresponding to the call type (inbound or outbound). Would you like to proceed with setting up these messages or need assistance with creating the audio files?
s
since the agent is making and receiving calls what would be a good setup for that?
any ideas?
v
@Steward C Certainly! For an agent that both makes and receives calls, you would want a setup that can dynamically determine the call direction and play the appropriate first message. Here's a suggestion for a versatile setup: Dynamic First Message Setup: 1. Pre-Call Configuration: - Implement logic in the system to detect whether the call is inbound or outbound. - Prepare two separate audio files or text scripts: one for inbound calls and one for outbound calls. 2. Outbound Call Configuration: - First Message: "Hello, this is [Agent's Name] from [Company]. We're reaching out to connect with you and see how you're doing. Is this a good time to talk?" 3. Inbound Call Configuration: - First Message: "Thank you for calling [Company], this is [Agent's Name]. How can I assist you today?" 4. System Execution: - When a call is initiated or received, the system checks the call direction. - Based on the direction, the system selects the corresponding first message. - The system then plays the selected audio file or delivers the text script using text-to-speech technology. 5. Fallback Option: - If the system cannot determine the call direction for any reason, have a generic message that works for both scenarios. - Generic Message: "Hello, you've reached [Company], this is [Agent's Name]. How may I help you today?" By setting up your system with these configurations, the agent will be prepared to handle both making and receiving calls with a suitable first message for each scenario. This ensures a smooth start to the conversation, tailored to the context of the call. Would you like to implement this setup or explore additional configurations?
s
give me an example of what it would look like with the 3 propmpts in the First Message section
v
@Steward C Certainly! If you're configuring a system that needs to handle both outbound and inbound calls, you would set up the "First Message" section with three prompts: one for outbound calls, one for inbound calls, and a generic fallback. Here's an example of what that might look like: First Message Section Configuration: 1. Outbound Call Prompt: - "Hello, this is [Agent's Name] from [Company]. We're just checking in with you to ensure you're happy with our services and to see if there's anything we can do for you. How are you today?" 2. Inbound Call Prompt: - "Thank you for calling [Company], this is [Agent's Name]. I'm here to assist you with any questions or concerns you may have. What can I do for you today?" 3. Generic Fallback Prompt: - "Hello, you've reached [Company], and this is [Agent's Name]. How may I assist you on this fine day?" In practice, the system would need logic to determine the call direction and select the appropriate prompt. If the system cannot determine the direction, it would use the generic fallback prompt. The prompts can be in text form for text-to-speech conversion or as URLs to pre-recorded audio files. Please note that the actual implementation would depend on the capabilities of the voice API or system you are using. If you need further assistance with the technical aspects or setup, please let me know!
s
were is the logic placed to help the agent determine the call direction?
v
@Steward C The logic to determine the call direction is typically placed within the call handling or routing system of your voice API or telephony platform. This logic is part of the backend infrastructure that manages the call flow. Here's a general overview of where and how this might be implemented: 1. Event Triggers: - Inbound calls usually trigger an event when a call is received. - Outbound calls trigger a different event when a call is initiated by the system. 2. Call Direction Logic: - The system uses these events to set a flag or variable indicating the call direction. - This could be as simple as a boolean value or a string that says "inbound" or "outbound." 3. Routing Logic: - Based on the call direction flag, the system routes the call to the appropriate handler. - The handler then executes the correct script or plays the correct first message. 4. Implementation: - This logic is often implemented in the call control scripts or application server that interfaces with the voice API. - It may involve programming in languages such as Python, JavaScript (Node.js), or using a visual call flow builder if the platform provides one. 5. Voice API Configuration: - The voice API itself may have configuration options to specify different behaviors for inbound and outbound calls. - You would use the API's documentation to set these configurations correctly. 6. Testing: - After setting up the logic, thorough testing is essential to ensure that the system correctly identifies the call direction and responds with the appropriate message. If you're using a specific voice API or telephony platform, you would need to consult the documentation for that system to understand exactly how to implement this logic. If you need assistance with a particular system or API, please provide more details, and I can give you more targeted advice.
s
so setting this up as you say is beyond the system prompt section of the agent?
v
@Steward C Yes, that's correct. The logic for determining the direction of the call and selecting the appropriate system prompt is beyond the simple configuration of the system prompt section. It involves backend programming and integration with the telephony or voice API platform that manages the call flow. The system prompt section typically allows you to define the initial message or behavior when the agent starts a conversation. However, the underlying logic that decides whether the call is inbound or outbound and then selects the correct prompt based on that information is part of the call handling infrastructure. This backend logic would be part of the application or service that interfaces with the voice API, and it would be responsible for managing the state of the call, executing the correct workflows, and providing the right context for the agent to deliver the appropriate system prompt. If you're setting up or programming a voice agent, you would need to work with the API's capabilities and possibly write code to handle these scenarios. The specifics would depend on the tools and platforms you're using. If you need guidance on a particular system or API, you might need to consult the documentation or reach out to their support for more detailed instructions.
s
@Steward C sorry for the late response. Please check the following videos on assistant customization for inbound calls https://docs.vapi.ai/community/inbound and following for outbound https://docs.vapi.ai/community/otubound These videos will help you get unblocked.
Do let me know if further help is required.
s
I setup a python file to try and distinguish between outbound and inbound calls so the agent can respond to each audience in a different way. How do I test it, the file is there but when I call it doesn't seem like the agent is using script for inbound calls.
You said: Call Direction Logic: The system uses these events to set a flag or variable indicating the call direction. This could be as simple as a boolean value or a string that says "inbound" or "outbound." where is the flag or variable indicating call direction set?
s
@Steward C just checking if this issue is resolved for you?
s
it is not I am trying to test vapi so it pulls from my .py file and I see it is not. What is it I need to do to have it do so? The reason is the agent makes outbound and inbound calls and if someone calls it cannot sound like the agent is trying to sell the person something vs playing a customer support role.
There?
s
@Steward C Sorry, could you please: 1. Rephrase your issue 2. Share the GitHub repo of your code 3. For the voice agent, provide:
Copy code
- The call ID
- When exactly this happened (the timestamp)
- What response you expected to get
- What response you actually got instead
This would really help me figure out what went wrong!
10 Views