Overriding squad variables in inbound calls
# support
k
Hello, when an assistant is called in inbound calls, we can freely give the user's information in assistantOverrides with the assistant-selector webhook, as in the example:
Copy code
response_data = {
                "assistantId": HOTEL_INBOUND_ASSISTANT_ID,
                "assistantOverrides": {
                    "variableValues": {
                        "name": user_full_name or "",
                        "phoneNumber": phone_number or "",
                        "meetings": meetings_list
                    }
                },
            }
In another scenario, the user calls the Squad we created and is transferred to different agents as needed. We use four agents in the relevant Squad. We'd like to know how we can assign assistantOverrides values that can be applied to each of these agents. thanks
Copy code
response_data = {
                "squadId":"SQUAD_ID"
            }
k
To pass assistantOverrides for multiple agents in a Squad, return a full squad object not just squad_Id in the assistant-request webhook, and include assistantOverrides inside each members entry to inject user-specific data per assistant.. https://docs.vapi.ai/squads-example
k
Did I need to specify all the information about assistants again ? I thought it would be sufficient to just specify the override information, as in the assistant overrides.
c
No, you must specify the full squad.members list to apply assistantOverrides using only squadId without redefining members won’t allow overrides to be applied..
2 Views