Vapi
Integration steps for Vapi
Integration
Collecting Payment
Create tools
In VAPI, you’ll need to create the SendContextToProtegee
and GetContextFromProtegee
tools in order to let your agent interact with Protegee. Don’t worry, all this requires from you is to press a button.
You’ll want to grab your VAPI private api key. It will look like:
Once you have that, you can run the following curl command (but replace my_protegee_api_token
and my_vapi_private_key
with the correct keys)
You can also manually try out the endpoint by checking out: VAPI Create Tools
Setup forwarding phone number + Enable SendContextFromProtegee
On Assistant 1’s function page, make sure SendContextFromProtegee
is selected from the dropdown and the forwarding phone number is set to Protegee’s number (you can this at settings).
Prompt your agent to call SendContextToProtegee tool + transfer the call
This lets Protegee know who to handle the payment for and how much. Something similar to:
Agent Instructions
Give it a shot
If you have any issues, check out the debug page for more information.
Checking on the status of the payment
The following instructions are OPTIONAL. If you specified a number in the callback
field, Protegee will transfer the caller back to this number once the payment process is complete. In order to continue the call, you’ll want to make a webhook to get details on how the call went. The following are instructions on how to do that.
Setup a callback agent
If you’d like the caller to be transferred back from Protegee, make a second agent and enable GetContextFromProtegee
on the agent’s Functions page.
Enable GetContextFromProtegee tool call for the agent
On Assistant 1’s function page, make sure SendContextFromProtegee
is selected from the dropdown and the forwarding phone number is set to Protegee’s number (you can this at settings).
Prompt your agent to check the status
You can add something like this to Agent 2’s prompt.
Agent Prompt
After you greet the caller with the first message, immediately call the GetContextFromProtegee function and read back the response to the caller. Then ask if there’s anything else you can help with. If they wish to book an appointment, your goal is to gather necessary information from callers in a friendly and efficient manner like follows…
Try it out!
If you have any issues, check out the debug page for more information.