API request to SQUAD does not recognize the variab...
# support
a
Hi team i have created a squad in my dashboard and using the below sample API request to have the squad perform an outbound call. However the variables passed on to the squad is not being recognized by the assistant. For example the variable {{Fullname}} is John Doe and the first message of the assistant is Hey there Am I speaking with {{fullname}}?. But the the assistant says "Hey there am i speaking with....? instead of hey there am i speaking with John Doe? { "squadId": "f7c14f11-2bd7-47ae-977f-3c01ab58abec", "customer": { "number": "+61406421813", "name": "Jeff Harper" }, "phoneNumberId": "3036a8c6-d792-4f8d-a673-2ef74ed2f10b", "assistantOverrides": { "variableValues": { "CurrentDate": "2024-11-08", "fullname": "John Smith", "OriginalCreditor": "Vodafone Australia", "AccountType": "Telecommunications Services", "CurrentBalance": "$500", "DOB": "01/01/1986", "Postcode": "2000", "CaseID": "618963b1-3e0f-ef11-9f89-00224896b7dd", "CustomerID": "STI-102360" } } }
v
message has been deleted
@ASh - Stoneink Hello! It seems like there might be a mismatch between the variable name used in the assistant's message template and the variable name provided in the
assistantOverrides
. In your API request, you've set the variable
fullname
to "John Smith", but in the assistant's message, it's using
{{Fullname}}
with an uppercase 'F'. Variable names are case-sensitive, so you'll need to ensure that they match exactly. To fix this issue, you can either update the assistant's message template to use
{{fullname}}
with a lowercase 'f', or update the
assistantOverrides
in your API request to use
Fullname
with an uppercase 'F'. Would you like to proceed with updating the assistant's message template or the API request?
You can continue this conversation by mentioning me in the message.
a
@Vapi the variables used in both the prompt and api request are both fullname so case sensitivity match
v
@ASh - Stoneink I apologize for the confusion. If the variable names match exactly in both the prompt and the API request, but the assistant is still not recognizing the variable, it could be due to a few reasons: 1. There might be an issue with the way the assistant is parsing the variables. Ensure that the syntax for variable substitution in the assistant's script is correct and follows the expected format. 2. The assistant might not be properly configured to handle dynamic variables. Check the assistant's configuration to ensure it's set up to accept and process variables. 3. There could be a technical glitch or a bug in the system that's preventing the variables from being recognized. To assist you further, I would need to check the assistant's configuration and the system logs. Since I'm a support bot, I don't have direct access to your system. I recommend reaching out to our technical support team with the details of your issue, including the API request and the assistant's behavior, so they can investigate and resolve the problem. Would you like guidance on how to contact our technical support team, or is there anything else I can assist you with?
a
how do i Check the assistant's configuration to ensure it's set up to accept and process variables? @Vapi
v
@ASh - Stoneink To check the assistant's configuration for handling variables, you would typically follow these steps: 1. **Access the Assistant's Dashboard**: Log in to the dashboard where you manage your voice assistant. 2. **Review the Assistant's Script**: Look for the script or dialogue flow section where the assistant's responses are defined. Ensure that the placeholders for variables (e.g.,
{{fullname}}
) are correctly placed within the script. 3. **Check Variable Handling**: There should be a section or a feature within the dashboard that allows you to define and manage variables. Ensure that the variables you want to use are listed there and are properly connected to the script. 4. **Test the Assistant**: Use a testing feature if available to simulate a call and see if the assistant correctly replaces the variables with their values. 5. **Review Documentation**: Check the platform's documentation for any specific syntax or configuration requirements related to variable handling. 6. **Check for Updates**: Ensure that your assistant is using the latest version of the software or platform, as updates may affect how variables are handled. 7. **Contact Support**: If you've checked all the above and the issue persists, it may be best to contact the platform's support team for help. They can provide specific guidance based on the system you're using. If you're unsure about any of these steps or if they don't seem to apply to your specific platform, please reach out to the support team for more detailed assistance. Would you like to know how to contact the support team for further help?
a
I have checked that and the prompt does contain {{fullname}} and it's still not working @Vapi
v
@ASh - Stoneink I'm sorry to hear that the issue persists even after verifying the prompt and variable names. Since the problem is not resolved by the usual checks, it might be best to involve our technical support team for a more in-depth investigation. They can look into the system logs, configuration details, and potentially identify any underlying issues that are not immediately apparent. Please reach out to the support team with the following information: - A detailed description of the issue. - The exact steps you've taken to troubleshoot so far. - The API request you're making (with any sensitive information redacted). - The response you're receiving from the assistant. - Any relevant screenshots or logs that illustrate the problem. The support team will be able to guide you through the next steps to diagnose and resolve the issue. If you need assistance contacting support or if there's anything else I can do to help, please let me know.
a
how do i contact the support team? @Vapi
v
@ASh - Stoneink To contact the support team, you can typically follow these steps: 1. **Support Portal**: Visit the official support portal or help center for VAPI or the platform you're using. Look for a 'Contact Us' or 'Support' section. 2. **Email**: You may find a support email address to which you can send a detailed description of your issue. Make sure to include all relevant information for a quicker resolution. 3. **Phone**: Some services offer phone support. Check if there's a customer service number listed on the website or in the documentation. 4. **Live Chat**: If available, use the live chat feature on the website for immediate assistance from a support agent. 5. **Support Ticket**: You might be able to submit a support ticket directly through the dashboard where you manage your voice assistant. Look for a 'Help' or 'Support' button. 6. **Community Forums**: Some platforms have community forums where you can post your issue and get help from other users or support staff. 7. **Documentation**: Review the platform's documentation for any specific instructions on contacting support. Before reaching out, make sure you have your account information, the details of the issue, and any steps you've already taken to resolve it. This will help the support team assist you more efficiently. If you need the exact contact details or if there's anything else I can help you with, please let me know.
s
Hey @ASh - Stoneink can you share the call id?
a
Hi @Shubham Bajaj here is the call ID as an example 00c5ce2f-0073-4488-b3a2-0cc75c621ec5
I have tried multiple variations of the request and tested it with multiple assistants and in none of the scenarios the variables come through to be used by the assistant
s
Hey @ASh - Stoneink These are the overrides for the
assistant
or `assistantId`'s settings and template variables, so instead pass a transient squad and inside it pass
membersOverrides
to apply single set of varaibles to all of the assistant.
Do let me know how it goes.
a
@Shubham Bajaj i have tried that but it comes back with an error that membersOverrides is not a function to be used i have used in both squad and the root json. any chance you could send me a template of the API json to send? the second problem we're having is that the squad is actually not transferring the call to next member when the criteria is met and based on all the videos i've watched there seems to be no problem with the code itself hereis an example of where the first agent should pass the call to OTP agent if the user wants to pay but it doesnt happen { "name": "Stoneink Collection Call", "phoneNumberId": "3036a8c6-d792-4f8d-a673-2ef74ed2f10b", "assistantId": "2a622cef-b1df-49d2-9347-08b15b5790d2", "customer": { "number": "+61406421813", "name": "John Smith" }, "assistantOverrides": { "variableValues": { "CurrentDate": "2024-11-08", "fullname": "John Smith", "originalcreditor": "Vodafone Australia", "accountType": "Telecommunications Services", "CurrentBalance": "$500", "DOB": "01/01/1986", "Postcode": "2150", "CaseID": "618963b1-3e0f-ef11-9f89-00224896b7dd", "CustomerID": "STI-102360" } }, "squad": { "members": [ { "assistantId": "2a622cef-b1df-49d2-9347-08b15b5790d2", "assistantDestinations": [ { "type": "assistant", "assistantName": "Outbound OTP Agent", "message": "one second", "description": "Trigger the transition to the Outbound OTP Agent if customer wants to pay now." } ] }, { "assistantId": "e62fb91a-17a7-4f21-9948-e8c2fb40a8eb" } ] } }
s
Hey @ASh - Stoneink check this on how to make calls using SQUAD and memberOverrides.
Copy code
curl -X POST https://api.vapi.ai/call \
     -H "Authorization: Bearer " \
     -H "Content-Type: application/json" \
     -d '{
  "name": "CreateCallUsingSquad",
  "squad": {
    "members": [
      {
        "assistantId": "<insert-first-memeber-assistant-id-here>",
        "assistantDestinations": [
          {
            "assistantName": "<insert-assistant-name-here>",
            "message": "<insert-message-here>",
            "description": "<insert-description-here>"
          }
        ]
      },
      {
        "assistantId": "<insert-second-memeber-assistant-id-here>",
        "assistantDestinations": []
      }
    ],
    "membersOverrides": {
      "variableValues": {
        "key": "value"
      }
    }
  },
  "phoneNumberId": "<insert-phone-number-id-here>",
  "customer": {
    "numberE164CheckEnabled": false,
    "number": "<insert-custom-number-here>"
  }
}'
@ASh - Stoneink for call transferring not working, can you share to call id along with when it was expected to transfer with timetstamp.
Hey @ASh - Stoneink checking if this ticket can be closed?
a
@Shubham Bajaj thanks for responding no the problem is not resolved yet, just been out of office for a week. I am going to try the json code you sent to initiate the squad call and when the transfer doesnt work ill send you the call ID give me a a couple of hours 🙂
hi @Shubham Bajaj ok i used this API request { "name": "Stoneink Collection Call", "phoneNumberId": "3036a8c6-d792-4f8d-a673-2ef74ed2f10b", "squad": { "members": [ { "assistantId": "2a622cef-b1df-49d2-9347-08b15b5790d2", "assistantDestinations": [ { "type": "assistant", "assistantName": "Outbound OTP Agent", "message": "one second", "description": "Trigger the transition to the Outbound OTP Agent if customer wants to pay now." } ] }, { "assistantId": "e62fb91a-17a7-4f21-9948-e8c2fb40a8eb" } ], "membersOverrides": { "variableValues": { "CurrentDate": "2024-11-08", "fullname": "John Smith", "OriginalCreditor": "Vodafone Australia", "AccountType": "Telecommunications Services", "CurrentBalance": "$500", "DOB": "01/01/1986", "Postcode": "2000", "CaseID": "618963b1-3e0f-ef11-9f89-00224896b7dd", "CustomerID": "STI-102360" } } }, "customer": { "number": "+61406421813", "name": "John Smith" } }
The variables dont come therough and when i request to be transfered to Outbound OTP Agent the assistant says "one second" and terminates the call
@Shubham Bajaj this is call ID 14b445dd-e37d-4d0f-a5cd-a732e04db06d
s
@ASh - Stoneink the call end reason is
pipeline-error-eleven-labs-voice-disabled-by-owner
which means the voice used for the assistant call transfered isn't available for use because of this call got terminated. I will check about this with the team if it's an mistake or few voices are taken back.
a
Hi @Shubham Bajaj ok i will be waiting for your response
3 Views