Send API request to VAPI with variables
# support
m
Hi, I want to create a voice bot for my client, where we could send variable requests like product name, size, color etc. and confirm the order using this app. Sending variables is necessary to confirm the order. Process: Client orders something on the store -> we send a request to the api with the order details -> the bot calls the client and confirms the order -> we receive information e.g. on a webhook that the order has been confirmed or not. Can we do this using vapi?
v
@magtppe Absolutely, VAPI is well-suited for creating a voice bot that can handle variable requests such as product name, size, color, and other details to confirm orders. Here's how you can set it up: 1. **Endpoint Creation**: You'll need to create an endpoint on your server that can handle requests from VAPI. This endpoint will receive messages with the order details as per the Assistant Request documentation. 2. **Server URL Configuration**: Once your endpoint is ready, you'll add the endpoint URL to the Server URL field in the Account page on the VAPI Dashboard. This will direct the VAPI to send requests to your server. 3. **Sending Variable Requests**: When a client places an order, your system will send a request to the VAPI with the order details. This request will include variables such as product name, size, color, etc. 4. **Voice Bot Interaction**: VAPI will then initiate a call to the client using the voice bot, which will confirm the order details with the client. You can customize the bot's script to ensure it captures all necessary confirmations. 5. **Confirmation and Webhook**: After the call, the bot can send the confirmation status back to your server, typically using a webhook. Your server can then process this information accordingly. To get started, you'll need to set up your voice bot script, define the variables you want to send, and configure your server to handle requests and responses. If you need any assistance with the setup or have any specific questions, feel free to ask!
You can continue this conversation by mentioning me in the message.
@magtppe Sweet. Have a great day!
@Vapi Sweet. Have a great day!
m
yes
s
@magtppe Please refer to this comprehensive guide for utilizing dynamic values or variables, from telephony setup to their application within your assistant. https://bajajcodes.notion.site/Setting-Up-Dynamic-Variables-for-Your-Vapi-Calls-A-Quick-Guide-14077ff426238037b101f91a446f7f6a?pvs=4 Do let me know if you require further help.
Thanks @Mason | Building KOI for guiding @magtppe
m
Thank you so much for help 🙂
4 Views