Multilingual message contents not working for tran...
# support
j
Hello Vapi team, I am trying to get a transferCall tool set up with two variations of the transfer message--one in english and the other in Spanish. Here is my current setup: - Created a tool using the contents array (tool id: ac7cde26-3a23-4592-b8a1-3d0c31fba4bf) - In the messages list, I've included a "request-start" message with a contents list - In the contents list, I included two contents objects--one with a language of en, the other with a language of es No matter how I try to configure it, I can not get the transferCall tool call to play one transfer message in english for english speakers and another message in spanish for spanish speakers. Any guidance on achieving this would be greatly appreciated!
v
@Jeff Hello there! It's great to hear that you're setting up a transferCall tool with multilingual support. To achieve the desired functionality where the transfer message is played in English for English speakers and in Spanish for Spanish speakers, you'll need to ensure that your tool is configured to detect the language preference of the caller and then select the appropriate message based on that preference. Here's a general approach to setting this up: 1. **Language Detection**: Implement a mechanism to detect the caller's preferred language. This could be done through an initial prompt asking the caller to choose a language or by detecting the language from the caller's previous interactions. 2. **Conditional Logic**: Once the language is detected, use conditional logic within your tool to select the appropriate message from the contents array based on the language code (
en
for English,
es
for Spanish). 3. **Transfer Call**: Use the selected message to initiate the transferCall with the message in the caller's preferred language. If you've already set up the contents array with messages in both English and Spanish, you're halfway there. The key is to add the logic that will check the caller's language preference and then play the corresponding message. If you need further assistance with the specific implementation or if you're encountering any issues, please provide more details about your current setup, and I'll be happy to guide you through the process. If there's a specific function or tool within VAPI that you're using and need help with, let me know, and I can provide more targeted advice.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
j
Here is an updated tool id with the setup (the original had an error): 1d6e0d84-d78f-4d27-9a9a-9978273e6a1a
s
Hey @Jeff To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
2 Views