use the data received in the initial function call...
# support
t
I have a requirement of first calling an api and then confirming the details with the user like the product name and then making the next api response with the product_id received from the first api call upon confirmation from the user. How can i do it in Vapi or should I do some configurations in my Make scenario
v
You can continue this conversation by mentioning me in the message.
@thilak To achieve this workflow with VAPI, you would typically follow these steps: 1. **API Call**: Make the first API call from your server to fetch the product details. This can be done within your Make scenario or directly from your server code, depending on where you want to handle the logic. 2. **User Confirmation**: Once you receive the product details, use VAPI to prompt the user to confirm the product name. You can do this by sending a voice or text response to the user asking for confirmation. 3. **Capture Confirmation**: Capture the user's response using VAPI's voice recognition capabilities. You'll need to set up intents and entities to understand the user's confirmation or denial. 4. **Second API Call**: If the user confirms the details, make the second API call with the
product_id
received from the first call. This can again be handled in your Make scenario or your server code. 5. **Finalize**: Inform the user of the successful operation or next steps. For the VAPI part, you would need to set up the following: - **Endpoint**: Ensure you have an endpoint on your server that VAPI can hit to send and receive messages as per the Assistant Request docs. - **Server URL**: Add the endpoint URL to the Server URL field in the Account page on the Vapi Dashboard. - **Intents and Entities**: Configure the necessary intents and entities in VAPI to understand user confirmations. - **Dialog Management**: Manage the conversation flow to ensure that the user is prompted correctly and that their responses are handled appropriately. If you need assistance with setting up the Make scenario or the server-side logic, please ask support for more info on this.
Got it. Tagging @User for additional help.
s
Hey @thilak check the inbound videos for pulling information right before the call https://docs.vapi.ai/community/inbound and then to get data during the call you can use tools

https://youtu.be/mhCy1kFGKVU?feature=shared