Shall I wrap the squad object in a result key on a...
# support
p
my server returns the following object on assistant-request but it doesn't seem to trigger the squad as nothing happens over the phone and the call is redirected. here is the payload returned by server: { "squad":{ "members":[ { "assistant_id":"5f4faadd-5888-4ad7-a504-8f3035830b94", "assistant_destinations":[ { "type":"assistant", "assistant_name":"faq", "message":" ", "description":"Transfer à l'assistant de faq" }, { "type":"assistant", "assistant_name":"spelling", "message":" ", "description":"Transfer à l'assistant de spelling" }, { "type":"assistant", "assistant_name":"booking", "message":" ", "description":"Transfer à l'assistant de booking" } ] }, { "assistant":{ "name":"faq", "assistant_id":"0c2fd21f-d0bf-4353-a76d-0348b879cb75" } }, { "assistant":{ "name":"spelling", "assistant_id":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf" } }, { "assistant":{ "name":"booking", "assistant_id":"67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f" } } ] } } Any help appreciated https://cdn.discordapp.com/attachments/1309469609342275665/1309469609442672670/Screenshot_2024-11-22_at_11.43.57.png?ex=6741b21b&is=6740609b&hm=b24596ea002b771e69be1a782a7e8826c517334cd6bc47d482ec9c576e613d6a&
v
message has been deleted
@paul gaston It seems there might be a discrepancy in the structure of the payload your server is returning. The first member of the squad includes an
assistant_id
and
assistant_destinations
, which is not consistent with the expected structure based on the context provided. The subsequent members seem to have a nested
assistant
object, which also doesn't align with the expected
squad.members.assistantId
attribute. The correct structure for the
squad
object should only include
assistantId
directly within each member object, like so:
Copy code
json
{
   "squad":{
      "members":[
         {
            "assistantId":"5f4faadd-5888-4ad7-a504-8f3035830b94"
         },
         {
            "assistantId":"0c2fd21f-d0bf-4353-a76d-0348b879cb75"
         },
         {
            "assistantId":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf"
         },
         {
            "assistantId":"67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f"
         }
      ]
   }
}
Please ensure that your server returns the payload in the correct format. If the issue persists after correcting the payload, or if you need further assistance with the API, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
p
thank you, I'm going to try this. But how can i configure the seamless transitions (without assistgant saying: "I'm tranferring your call") with this payload if I may ask?
@Vapi
v
@paul gaston To configure seamless transitions between assistants without an audible message indicating the transfer, you would typically set up the transitions in your Voice API configuration to not include any announcement or message that indicates a transfer is taking place. However, the payload structure you've provided does not seem to include any specific parameters for configuring the behavior of transitions between assistants. Typically, such configurations would be handled on the server-side or within the Voice API platform settings, rather than in the payload itself. If the Voice API you are using supports seamless transitions, you would need to refer to its documentation to understand how to configure such behavior. This might involve setting certain flags or parameters when defining the call flow or within the assistant settings. If you are unsure how to proceed or if the documentation does not provide clear instructions, please reach out to the support team for the Voice API you are using. They should be able to provide you with the necessary steps to achieve seamless transitions between assistants. If you need further assistance with the VAPI configuration or have any other questions, feel free to ask!
p
can you provide an example on how to make that happen? I can eventually update the vapi api configuration if you let me know how to do so
@Vapi
v
@paul gaston Certainly! To enable seamless transitions between assistants without an audible transfer message, you would typically need to configure your Voice API (VAPI) to handle transitions silently. This is often done by setting specific parameters or using certain methods that the API provides. Here's a conceptual example of how you might configure a seamless transition in a VAPI configuration:
Copy code
json
{
  "squad": {
    "members": [
      {
        "assistantId": "5f4faadd-5888-4ad7-a504-8f3035830b94",
        "silentTransfer": true
      },
      {
        "assistantId": "0c2fd21f-d0bf-4353-a76d-0348b879cb75",
        "silentTransfer": true
      },
      {
        "assistantId": "beecc680-7d5b-4c2c-bc1f-771dbc0aefdf",
        "silentTransfer": true
      },
      {
        "assistantId": "67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f",
        "silentTransfer": true
      }
    ]
  }
}
In this example, a
silentTransfer
parameter is added to each assistant configuration. When set to
true
, it indicates that the transition to this assistant should occur without any audible message. Please note that this is a hypothetical example, and the actual implementation will depend on the specific capabilities and configuration options provided by your VAPI. You will need to consult the API documentation or reach out to the support team to understand the exact parameters and methods available for configuring silent transitions. If the VAPI does not natively support silent transitions, you may need to implement custom logic within your application to handle the transitions without playing a message. This could involve managing the call state and routing calls to the appropriate assistant based on the context or user input. If you need further assistance with the actual VAPI configuration or if the above example does not align with the capabilities of your VAPI, please ask support for more info on this.
p
can you tell me all the parameters available in the object containing assistantId and silentTransfert? I mean, what are other available properties?
@Vapi
v
@paul gaston Please ask support for more info on this.
p
since I added "silentTransfer": true in the payload the assistant isn't picking up the phone anymore
it worked without that
@Vapi
v
@paul gaston I apologize for the confusion earlier. It seems that adding the
"silentTransfer": true
parameter might not be compatible with the current configuration of your Voice API or it may not be a recognized parameter. If the assistant was functioning correctly before this change, I recommend reverting to the previous configuration that did not include the
"silentTransfer"
parameter. To resolve the issue and achieve seamless transitions without an audible transfer message, you will need to consult the documentation for your specific Voice API or reach out to the support team for guidance on how to properly configure this behavior. If you have any other questions or need further assistance, please let me know!
p
@Shubham Bajaj please help me 🙂
i have "endedReason"=>"assistant-request-returned-invalid-assistant" when the server return payload such as: { "squad":{ "members":[ { "assistant_id":"5f4faadd-5888-4ad7-a504-8f3035830b94", "assistant_destinations":[ { "type":"assistant", "assistant_name":"faq", "message":" ", "description":"Transfer to FAQ assistant for general questions" }, { "type":"assistant", "assistant_name":"spelling", "message":" ", "description":"Transfer to spelling assistant for name collection" }, { "type":"assistant", "assistant_name":"booking", "message":" ", "description":"Transfer to booking assistant for appointment management" } ] }, { "assistant_id":"0c2fd21f-d0bf-4353-a76d-0348b879cb75" }, { "assistant_id":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf" }, { "assistant_id":"67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f" } ] } }"."
s
Copy code
json
{
   "squad":{
      "members":[
         {
            "assistantId":"5f4faadd-5888-4ad7-a504-8f3035830b94",
            "assistantDestinations":[
               {
                  "type":"assistant",
                  "assistantName":"faq",
                  "message":" ",
                  "description":"Transfer to FAQ assistant for general questions"
               },
               {
                  "type":"assistant",
                  "assistantName":"spelling",
                  "message":" ",
                  "description":"Transfer to spelling assistant for name collection"
               },
               {
                  "type":"assistant",
                  "assistantName":"booking",
                  "message":" ",
                  "description":"Transfer to booking assistant for appointment management"
               }
            ]
         },
         {
            "assistantId":"0c2fd21f-d0bf-4353-a76d-0348b879cb75",
            "assistantDestinations":[]
         },
         {
            "assistantId":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf",
            "assistantDestinations":[]
         },
         {
            "assistantId":"67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f",
            "assistantDestinations":[]
         }
      ]
   }
}
@paul gaston try with this squad, your missing assistant destinations for the rest of squad members.
p
thank you but that's not about it.
i'm gonna solve this on my own, keeping you updated.
thank you for the reply tho
s
If this is not the issue then what's the issue @paul gaston ?
4 Views