call id
# support
s
How can i dynamically create the prompt for an inbound agent so the agent know who the caller is by name based on the phone number calling in a make.com scenario?
v
@Sigurd To dynamically create a prompt for an inbound agent that includes the caller's name based on their phone number in a make.com (formerly Integromat) scenario, you would typically follow these steps: 1. **Database Lookup**: You need a database or CRM where phone numbers are associated with names. When a call comes in, you would look up the caller's phone number in the database to retrieve the associated name. 2. **Make.com Scenario Configuration**: In your make.com scenario, you would set up a module that triggers when a call is received. This could be a webhook or a dedicated module for your telephony service. 3. **Retrieve Caller Information**: Use the phone number from the incoming call trigger to search your database. This can be done using a make.com module that connects to your database or CRM. 4. **Set Dynamic Variables**: Once you have the caller's name, you can set it as a dynamic variable in make.com. 5. **Pass Variable to VAPI**: When starting the call, pass the
assistantOverrides
with
variableValues
to the VAPI or SDK, including the retrieved name as a dynamic variable. Here's a simplified example of how you might set up the
assistantOverrides
with `variableValues`:
Copy code
json
{
  "variableValues": {
    "name": "Retrieved Caller Name"
  }
}
6. **Create Dynamic Prompt**: In your VAPI configuration, you would set up the assistant's message to include the dynamic variable, such as "Hello, {{name}}!". By following these steps, when a call comes in, the make.com scenario will automatically look up the caller's name, pass it to VAPI, and the agent will be greeted with a personalized message that includes the caller's name. If you need further assistance with setting up this process in make.com or VAPI, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
@Sigurd You need to use dynamic variables that will contain your user information and use them with your assistant using assistant overrides. First, you have to assign a server URL to your phone number. Then, right before the call, Vapi will make a request to your server URL asking for the assistant. At this time, you can either return a transient assistant or an assistant with assistant overrides. Make sure to include the dynamic variables inside your prompt so your assistant can use them during the call. You can learn more about this process here https://www.notion.so/vapi/Setting-Up-Dynamic-Variables-for-Your-Vapi-Calls-A-Quick-Guide-140008c8393f8057ac24db4089edc466