Integrating Squads into the Web Snippet

I need some help with integrating a squad into the web snippet. For reference, the current web snippet in the docs is as below:

<script>
var vapiInstance = null;
const assistant = "<assistant_id>"; // Substitute with your assistant ID
const apiKey = "<your_public_api_key>"; // Substitute with your Public key from Vapi Dashboard.
const buttonConfig = {}; // Modify this as required

(function (d, t) {
var g = document.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src =
"https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g, s);

g.onload = function () {
vapiInstance = window.vapiSDK.run({
apiKey: apiKey, // mandatory
assistant: assistant, // mandatory
config: buttonConfig, // optional
});
};
})(document, "script");

</script>

Right now, I have a web snippet like the above in my web page that activates an assistant I created in the dashboard.

But now I have updated my assistant to be part of a squad, meaning my original assistant now has a couple of other assistants its able to pass on the call to.

I want to add this new squad into the web snippet. How?

I'm aware that I can replace the <assistant_id> section with JSON for a complete assistant. But for a squad, should I simply replace the 'const asssistant' part with 'const squad' and then insert the JSON for the squad?
Was this page helpful?