assistant-request message is not triggering on the...
# support
r
what is the difference between server URL in Organization Settings and server URL in assistant Messaging advanced settings ?
v
Hi there! đŸ‘‹ I don't have enough information about your specific setup to diagnose why your assistant-request message isn't triggering, but I can definitely explain the difference between the two server URL settings you mentioned. According to the [documentation](https://docs.vapi.ai/tools/default-tools), the main difference between these two server URL settings is their scope and precedence: Organization Settings Server URL: - This is set at the account/organization level in the Vapi Dashboard - Serves as the default URL for all assistants under your account - Has lower precedence in the hierarchy Assistant Messaging Advanced Settings Server URL: - This is configured specifically for an individual assistant - Can be set in the "Advanced" tab of the assistant section in the dashboard - Overrides the organization-level server URL when configured - Has higher precedence in the hierarchy The precedence order for server URLs in Vapi is: 1.
tool.server.url
(if configured, and only for "tool-calls" message) 2.
assistant.serverUrl
(if configured) 3.
phoneNumber.serverUrl
(if configured) 4.
org.serverUrl
(if configured) This means that if you have a server URL configured at the assistant level, it will take priority over the organization-level URL for that specific assistant's communications. Would you like me to help troubleshoot why your assistant-request message isn't triggering? I'd need more details about your setup to assist further. Sources: - [https://docs.vapi.ai/tools/default-tools](https://docs.vapi.ai/tools/default-tools) - [https://docs.vapi.ai/api-reference/webhooks/server-message](https://docs.vapi.ai/api-reference/webhooks/server-message) - [https://docs.vapi.ai/server-url/setting-server-urls](https://docs.vapi.ai/server-url/setting-server-urls)
r
which one is triggered before the call starts to fetch the dynamic variables ?
which one is triggered before the call starts to fetch the dynamic variables ? @Vapi Support Bot
v
Hi there! đŸ‘‹ I don't have specific information about which server URL is triggered first to fetch dynamic variables before a call starts, but I can share what I know about how this process works. According to the documentation, the server URL precedence in Vapi follows this order: 1.
tool.server.url
(if configured, and only for "tool-calls" message) 2.
assistant.serverUrl
(if configured) 3.
phoneNumber.serverUrl
(if configured) 4.
org.serverUrl
(if configured) This means that if you have configured a server URL at the assistant level, it would take precedence over the organization-level URL when Vapi needs to communicate with your server. For dynamic variables specifically, they are typically fetched using the assistant-request message. This message is triggered when: - A number receives a call - A phone number without an assigned assistant or squad is called - The system needs to determine which assistant to use (for example, based on time of day) The assistant-request message is sent to your server URL as a POST request, and your server should respond with a JSON object containing the assistant configuration, which can include dynamic variables. Is there anything specific about your setup that you'd like me to help with? Sources: - [https://docs.vapi.ai/api-reference/webhooks/server-message](https://docs.vapi.ai/api-reference/webhooks/server-message) - [https://docs.vapi.ai/server-url/events](https://docs.vapi.ai/server-url/events) - [https://docs.vapi.ai/examples/inbound-support](https://docs.vapi.ai/examples/inbound-support)
r
how to use dynamic variables inside vapi workflow to set the assistant’s first message to “Hello {{name}}" ?
how to use dynamic variables inside vapi workflow to set the assistant’s first message to “Hello {{name}}" ? @Vapi Support Bot
can dynamic variables used inside API request node of Vapi workflow otherwise how i am going to identify the workflow behaviour since it depends on the caller phone number {{customer.name}} in other words how to use {{customer.name}} dynamic variable inside a condition node or API request in Vapi workflow ? @Vapi Support Bot
v
Hi there! đŸ‘‹ I don't have specific information about which server URL is triggered first to fetch dynamic variables before a call starts. However, I can definitely help with using dynamic variables in your Vapi workflow! Yes, dynamic variables can be used inside both API request nodes and condition nodes in Vapi workflows. Here's how to use the
{{customer.name}}
variable in both contexts: ### Using
{{customer.name}}
in API Request Nodes: You can include dynamic variables in the
queryParameters
section of your API request configuration using double curly braces. For example:
Copy code
json
{
  "task": "ApiRequest",
  "method": "GET",
  "url": "https://api.example.com/data",
  "headers": {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  },
  "queryParameters": {
    "customerName": "{{customer.name}}",
    "otherParam": "someValue"
  }
}
According to the [documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344671338249453660), the
{{customer.name}}
variable will be replaced with the actual customer name value that was received earlier in your workflow. ### Using
{{customer.name}}
in Condition Nodes: For condition nodes, you can use dynamic variables to create branching paths based on the customer's name. Here's how: 1. Insert a condition node into your workflow 2. Attach one or more nodes to the condition node 3. Click the "Logic" tag on each connecting edge 4. Define rules or comparisons using the
{{customer.name}}
variable For example, you could create a condition that checks if
{{customer.name}}
equals a specific value, or if it's not empty. If you encounter issues with
{{customer.name}}
, you might need to use just
{{name}}
instead and adjust your
variableValues
accordingly:
Copy code
json
variableValues: {
  name: customer.name,
}
To set the assistant's first message to "Hello {{name}}", you would include this in your assistant configuration with the dynamic variable syntax.
r
how to add queryParameters section of my API request configuration of my Vapi workflow ? @Vapi Support Bot
v
Hi there! đŸ‘‹ I don't have specific step-by-step instructions on how to add the queryParameters section in the Vapi workflow interface, but I can definitely help with the structure and format you should use. Based on the information I found, you can include a
queryParameters
section in your API Request node configuration using the following JSON structure:
Copy code
json
{
  "task": "ApiRequest",
  "method": "GET",
  "url": "https://api.example.com/data",
  "headers": {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  },
  "queryParameters": {
    "param1": "{{dynamicValue1}}",
    "param2": "{{dynamicValue2}}",
    "customerName": "{{customer.name}}"
  }
}
According to the [documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344671338249453660), the
queryParameters
section is where you define the parameters that will be added to your API request URL. Each parameter is defined as a key-value pair, and you can use dynamic variables (with double curly braces
{{}}
) to insert values that were collected earlier in your workflow. For example, if you want to include the customer's name as a query parameter, you would add
"customerName": "{{customer.name}}"
to your queryParameters section. Is there anything specific about the API Request configuration that you'd like me to explain further? Source: - [https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344671338249453660](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344671338249453660)
a
If you need to run assistant-request, you need to remove the assistantid an squadid and add server / url to your phone config. you do this via postman.. this is mine { "server": { "url": "https://[webhookurl]" } }
r
would you please explain more phone config of Vapi or Twilio ? @alexrb1
a
Vapi. It should look something like this... but once you choose one or the other you can't undo it. so you need to use something like postman to reset it... this will use the org server webhook to make the call to get the assistant > { > "assistantId": null, > "squadId": null, > "server": null > } https://cdn.discordapp.com/attachments/1360355244948721875/1360767192999923752/image.png?ex=67fc50b4&is=67faff34&hm=a236475ebed0ff48bc37439406bb6acb5ac2b3983ec575ef17b286b2876ffd68&
p
Hey Ramy, Checking if you have more questions which are yet to be resolved. Happy to contribute!
5 Views