How to apply override variables for an outbound Va...
# support
j
I am trying to create an outbound call with a vapi squad. However, I could not find any clear documentation that advises the simplest way to apply variable overrides at the start of the call or during the call that are applicable to the squad? I am trying to start the call using a persistent squad Id. I do not want to create a transient squad for the call.
c
Here’s an example payload you can use to start an outbound call with a squadId and assistantOverrides:
Copy code
curl -X POST https://api.vapi.ai/call \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "squadId": "your-squad-id-here",
    "assistantOverrides": {
      "variableValues": {
        "customerName": "John Doe",
        "accountNumber": "12345",
        "customVariable": "value"
      }
    },
    "phoneNumberId": "your-phone-number-id",
    "customer": {
      "number": "+11234567890"
    }
  }'
j
Hey Kyle, thank you for sharing this
If I am to use
assistantOverrides
with a persistent
squadId
, is it safe to say that the variableValues would get applied to all the assistants that are part of the squad? And if they do, as part of the assistantTransfer, if we were to capture variable overrides in the assistantTransfer, is it safe to assume they would then override into the assistant compared to what was provided in the initial
/call
API
c
Hi Jeremy L, If you have any questions about setting up or managing outbound campaigns or squads using Vapi, feel free to ask. You can refer to [Outbound campaigns overview](https://docs.vapi.ai/outbound-campaigns/overview) for campaign scheduling and management, or the [e-commerce order management squad guide](https://docs.vapi.ai/squads/examples/ecommerce-order-management) if you're using squads for order management.