Server Events Retrieving Assistants - Return Squad...
# support
j
Hello. I went through the documentation on handling server events for retrieving assistants so that you can inject dynamic data into the first message such as the caller's name etc. I was wondering if there was any way to return an ID to a squad rather than only an assistant. I have a squad that has an initial agent to handle the caller's intent which is where I would like to inject the caller's name into the first message. However, after that, I would like the squad to handle the call rather than only that single assistant. Any help would be greatly appreciated.
v
Currently, the Vapi documentation only shows support for returning an
assistantId
or a full assistant configuration in response to an
assistant-request
event—not a
squadId
.
If you want to use a squad for multi-assistant workflows, you may need to initiate the call with the squad as the entry point, rather than via the server event for inbound calls. Actionable next step: If you need dynamic data (like the caller's name) in the first message of the initial assistant in a squad, consider handling this logic in your application layer or reach out to [Vapi support](https://docs.vapi.ai/support) to confirm if this feature is on the roadmap or if there is a recommended workaround. Sources: - [Server Events: Retrieving Assistants](https://docs.vapi.ai/server-url/events) - [Squads (Multi-Assistant Conversations)](https://docs.vapi.ai/squads) - [API Reference: Create Call](https://docs.vapi.ai/api-reference/calls/create?explorer=true) - [API Reference: Create Squad](https://docs.vapi.ai/api-reference/squads/create?explorer=true) - [Support](https://docs.vapi.ai/support)
j
@User Messed around with this idea a little bit more and was able to come up with a solution. When receiving the webhook, I retrieved the squad ID I was looking for, added
firstMessage
into the
assistantOverrides
field for the assistant I wanted to create the dynamic first message for and then passed the response object back to Vapi as such
Copy code
{
  squad: ...
}
and it seemed to work fine. Not sure how stable this is going to be since it is undocumented but for right now it works.
v
Hey, I'm sorry to hear about the issues you're facing. If you could record a loom video showing the error or inconsistency in the dashboard along with the steps to reproduce it, that would be really helpful. I can share it with my team, and we'll take a look and try to reproduce the issue to fix it for you.