create squad | handOff tool message issue
# support
j
Hi there, Could you please share the approach or correct technique with using the Vapi CREATE squad API endpoint so that when i create the squad, I am able to also create the squad with
handOff
tools that have a fixed content that can be said by the assistant before, during or prior the
handOff
? I have tried using both assistantOverrides and memberOverrides objects when calling the CREATE squad API, both resulting in having no effect on forcing the agent to say something before handing off. If i manually apply the configuration in the squad UI panel, it will work take effect but trying to apply the configuration through the API has been unsuccessful. See image attached to clarify exactly what I am referring to. Could you please provide advice on what is the correct method to apply this through the API so that it takes effect properly. https://cdn.discordapp.com/attachments/1439410355255119964/1439410355859361842/image.png?ex=694dd55b&is=694c83db&hm=c6b1c89cf7488b2b8139db6f9d20700c6be7641f34ba877a785ee8475bd727fc&
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
Could you please share your current payload and we will send back a modified and corrected one
j
Hi Kyle, no problems. Here's our current payload. Can you please share the correct modified one?
Copy code
{
  "name": "demo-squad",
  "members": [
    {
      "assistantId": "eac0e8dc-1c7e-4dc9-9f06-23c05057d6e0",
      "assistantDestinations": [
        {
          "type": "assistant",
          "assistantId": "b078a9cc-efcf-4176-ae63-75c902b54eae",
          "assistantName": "dental-receptionist-agent",
          "description": "Transfer to this agent if you're looking to discuss dental care",
          "contextEngineeringPlan": {
            "type": "all"
          }
        },
        {
          "type": "assistant",
          "assistantId": "cfc1bd71-63c4-4c8f-a151-367da893dc01",
          "assistantName": "solar-sales-agent",
          "description": "Transfer to this agent if you're looking to discuss solar sales",
          "contextEngineeringPlan": {
            "type": "all"
          }
        }
      ]
    },
    {
      "assistantId": "b078a9cc-efcf-4176-ae63-75c902b54eae",
      "assistantDestinations": [
        {
          "type": "assistant",
          "assistantId": "eac0e8dc-1c7e-4dc9-9f06-23c05057d6e0",
          "assistantName": "property-compliance-agent",
          "description": "Transfer to this agent if you're wanting to be transferred back to the property compliance agent router",
          "contextEngineeringPlan": {
            "type": "all"
          }
        }
      ]
    },
    {
      "assistantId": "cfc1bd71-63c4-4c8f-a151-367da893dc01",
      "assistantDestinations": [
        {
          "type": "assistant",
          "assistantId": "eac0e8dc-1c7e-4dc9-9f06-23c05057d6e0",
          "assistantName": "property-compliance-agent",
          "description": "Transfer to this agent if you're wanting to be transferred back to the property compliance agent router",
          "contextEngineeringPlan": {
            "type": "all"
          }
        }
      ]
    }
  ]
}
Hey Kyle, any updates here please?
k
Here you go
Copy code
{
  "name": "demo-squad",
  "members": [
    {
      "assistantId": "eac0e8dc-1c7e-4dc9-9f06-23c05057d6e0",
      "assistantOverrides": {
        "model": {
          "tools": [
            {
              "type": "handoff",
              "messages": [
                {
                  "type": "request-start",
                  "content": "Let me transfer you now, please hold."
                },
                {
                  "type": "request-complete",
                  "content": "You're now connected."
                },
                {
                  "type": "request-failed",
                  "content": "I'm sorry, the transfer failed. Let me try again."
                }
              ],
              "destinations": [
                {
                  "type": "assistant",
                  "assistantId": "b078a9cc-efcf-4176-ae63-75c902b54eae",
                  "description": "Transfer to this agent if you're looking to discuss dental care",
                  "contextEngineeringPlan": {
                    "type": "all"
                  }
                },
                {
                  "type": "assistant",
                  "assistantId": "cfc1bd71-63c4-4c8f-a151-367da893dc01",
                  "description": "Transfer to this agent if you're looking to discuss solar sales",
                  "contextEngineeringPlan": {
                    "type": "all"
                  }
                }
              ]
            }
          ]
        }
      }
    },
    {
      "assistantId": "b078a9cc-efcf-4176-ae63-75c902b54eae",
      "assistantOverrides": {
        "model": {
          "tools": [
            {
              "type": "handoff",
              "messages": [
                {
                  "type": "request-start",
                  "content": "Transferring you back to the main agent."
                }
              ],
              "destinations": [
                {
                  "type": "assistant",
                  "assistantId": "eac0e8dc-1c7e-4dc9-9f06-23c05057d6e0",
                  "description": "Transfer back to the property compliance agent router",
                  "contextEngineeringPlan": {
                    "type": "all"
                  }
                }
              ]
            }
          ]
        }
      }
    }
  ]
}
3 Views