integrating 2 different assistants in 1 number.
# support
t
So i have a outreach bot that reaches out to people. but the problem here is if the people call the bot, can the bot not use the same prompt and same first message. so i have to do something that sais if you call this promt and first message and if you receave call this promt and message.
v
Hi @Tarik, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Phone Calling]() * [Web Calling]() * [Inbound Calling]() * [Outbound Calling]() -----------------------------
### Answer To achieve different behaviors for outbound and inbound calls using the same phone number, you can configure your assistant to dynamically adjust its behavior based on the call type. Here’s how you can do it: 1. **Set Up the Assistant**: - Create an assistant in the Vapi dashboard with the desired configurations for both outbound and inbound calls. 2. **Dynamic Behavior Based on Call Type**: - You can specify different prompts and first messages for outbound and inbound calls by checking the type of call in your server logic and updating the assistant configuration accordingly. 3. **Example Configuration**: For outbound calls:
Copy code
json
{
  "firstMessage": "Hi this is Jennifer from Vappy’s Pizzeria giving you a call back since we got disconnected. Would you like to finish your order with us?",
  "systemPrompt": "You are a voice assistant for Vappy’s Pizzeria, a pizza shop located on the Internet..."
}
For inbound calls:
Copy code
json
{
  "firstMessage": "Vappy’s Pizzeria speaking, how can I help you?",
  "systemPrompt": "You are a voice assistant for Vappy’s Pizzeria, a pizza shop located on the Internet..."
}
4. **Implementing in Code**: - When setting up the assistant for an outbound call, you might use a structure like this:
Copy code
javascript
    vapi.createAssistant({
        firstMessage: "Hi this is Jennifer from Vappy’s Pizzeria giving you a call back since we got disconnected. Would you like to finish your order with us?",
        systemPrompt: "You are a voice assistant for Vappy’s Pizzeria, a pizza shop located on the Internet...",
        // Other configurations
    });
- For inbound calls, you can configure the assistant to use a different first message and prompt in the server logic. 5. **Server Logic**: Ensure your server can distinguish between inbound and outbound calls and apply the correct assistant settings. You might use the
serverUrl
in the Assistant configuration to dynamically adjust settings based on the call type. Here is the documentation you might find useful: - [Phone Calling]() [(1)]() - [Outbound Calling]() [(2)]() - [Create Assistant]() [(3)]()
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
2 Views