how to use squad for web calling
# support
s
useEffect(() => { const loadVapiSDK = async () => { const script = document.createElement('script'); script.src = "https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js"; script.defer = true; script.onload = () => { const vapi = (window as any).vapiSDK.run({ apiKey: "459bd1a3-73c9-467b-adcc-c01a7a75a4ca", assistant: "5c7432cc-5d63-4724-825d-9083902482ea", assistantOverrides: { metadata: { organizationId: "b6de252a-9b69-4904-b065-335dc4ab4603", campaignId: "Webagent", agentId: "5c7432cc-5d63-4724-825d-9083902482ea", calendarId: "LSAFM9R1m3qK4piI3tEy", ghlLocationId: "aSxzU7PBySQqmlAqeFKh", }, }, });
v
Could you please provide more details about what you're trying to achieve with this code snippet? Are you encountering any specific issues or errors when using the Vapi SDK in your application? Sources: - [Vapi Web SDK Documentation](https://docs.vapi.ai/sdk/web) - [Common Issues with Vapi SDK Usage](https://discord.com/channels/1211482211119796234/1211483291191083018/1336399188665040968)
s
Actually i am having an ai appintment booking agent for healthcare i am placing it on my website as a call button i have created a squad of different languages agent i want that to perform functionaliity
@Shubham Bajaj Sir
@Vapi Support Bot
v
Could you please clarify what specific functionality you want the AI appointment booking agent to perform? Are you looking to enable specific features like multi-language support or integration with a particular calendar system? This will help me provide more targeted assistance. 😊 Sources: - [Vapi Web SDK Documentation](https://docs.vapi.ai/sdk/web) - [Common Issues with Vapi SDK Usage](https://discord.com/channels/1211482211119796234/1211483291191083018/1336399188665040968)
s
@Shubham Bajaj
@Vapi
p
Hey @Shahmeer, you have to pass the squadId as third parameter in the start function and first two as null parameters.
Copy code
vapi.start(null, null, squadId)

//vapi.start()
/**
 start(
    assistant?: CreateAssistantDTO | string,
    assistantOverrides?: AssistantOverrides,
    squad?: CreateSquadDTO | string,
  )
**/
s
Thank You So Much The Problem is Resolved.