yarcat
09/09/2025, 6:55 PMChiranjeet Mishra
09/10/2025, 3:05 PMfirstMessage configuration of your assistant or use a custom function to call your backend upon call initiation.
Here’s a basic method to achieve this:
1. Use the `firstMessageMode`**:** Set firstMessageMode to "assistant-speaks-first".
2. Invoke the Tool Automatically: Modify the firstMessage content to include the logic to call the tool. This could require configuring a system prompt that contains instructions for the assistant to call the backend tool immediately.
For a single assistant setup, configure the assistant on your server to recognize returning users:
json
{
"assistant": {
...
"firstMessage": "Welcome back, {{userName}}. Let me check the latest updates on our previous conversation.",
"firstMessageMode": "assistant-speaks-first"
...
},
"tools": [
{
"type": "apiRequest",
"name": "loadConversationDigest",
"url": "https://api.your-backend.com/conversation-digest",
"method": "GET",
"parameters": {
"userId": "{{userId}}"
}
}
]
}
Replace placeholders like {{userName}} and {{userId}} with the appropriate dynamic variables or session data. This should help in fetching the conversation digest automatically as soon as the call starts, without needing a manual user prompt.
If this doesn’t resolve the issue, please let us know and we’ll be happy to step in and assist further.Jasmin G
09/10/2025, 5:31 PMChiranjeet Mishra
09/11/2025, 10:58 PMvariableValues when starting the call
2. For customer names:
- Use the variable syntax: {{customerName}} (or your preferred variable name)
- Provide the value through assistantOverrides when making the call:
{
"assistantOverrides": {
"variableValues": {
"customerContext": "Previous conversation about billing issue on Sept 1",
"customerName": "John"
}
}
}
Remember that variables must be set when starting the call - they cannot be set in the dashboard directly