Accept inbound, or make outbound calls using AI Voice Agents in RevCent. Sign up with both Twilio and OpenAI, link the accounts in RevCent and have AI run calls.
With an AI Voice Agent, you can have AI accept incoming calls, or make outbound calls based on specific events. AI verbally communicates directly with callers based on instructions created by you. The AI can be given access to system tools, allowing it to search customers, look up sales, issue refunds and more.
The average cost per minute, as of 9/17/2025, is approximately $0.20.
Below are the general settings that apply to an AI Voice Agent.
Give the AI Voice Agent a name. For internal purposes only.
Give the AI Voice Agent a name. For internal purposes only.
Set the status of the agent.
Do you wish to have this agent active only within certain hours during the day? Useful for limiting late outbound calls.
Set the call method for the agent. Depending on the call method, additional settings will be available.
Select the voice third party integration you created which will be used for AI Voice Calls.
Select the AI third party integration you created which will be used for AI Voice Calls. It is important to select a realtime voice model when configuring the third party integration for AI.
Applies to outbound call method agents.
There are two outbound triggers available:
The AI Voice Agent is triggered when a specific Event occurs. You can filter the events to limit only specific events from triggering the AI Voice Agent.
Select the specific event notation and the AI Voice Agent will be automatically triggered when said event occurs.
Optional: The period of time to wait after the event occurred until the agent thread officially starts. Default minimum is 1 minute, maximum is 3 days.
You have the option to only activate the agent based on attributes of the item specific to the trigger. Before triggering the AI Voice Agent from an event, RevCent will check any filters to see if the item matches said filters. This enables you to only trigger the AI Voice Agent for items specific to a campaign, shop, metadata, etc.
In conjunction with base filters, you can also select a function to further filter which item will trigger the agent. The function must return a single term: either 'pass' or 'fail'. If 'pass', the agent will run. If 'fail', the agent will not run. Default is 'pass'. The function will be provided with the item data via event.item_details.
Pass
Example function return for a pass:
callback(null, 'pass');
Fail
Example function return for a fail:
callback(null, 'fail');
The maximum number of times the specific AI Voice Agent can be triggered for the same item. Recommended set 1.
Note: Max runs is per agent and item. An item can have more than one agent triggering it.
Important: Depending on the trigger and what the AI is doing, the same item can be processed multiple times. This is why the max run setting exists and should almost always be set to 1. For example: If you are triggering the agent to run on a declined sale, and the AI is going to reprocess the sale, if the AI's attempt to reprocess results in a decline, the AI will be triggered once again for the same sale. This is because the trigger would fire once for the original declined sale and again for the AI's declined sale, which you could avoid by setting max runs to 1. Having this setting greater than 1 can cause multiple attempts when you only intend to attempt once.
Only applies if Max Runs Per Item is greater than 1.
If you do intend to run the AI on the same item more than once, you can put a delay between the next agent run for the item. The Min Run Interval is the period of time that must transpire between runs for the same item. For example, if you are re-processing a sale using the AI, and the attempt is declined, you want to reprocess it once again but 1 day later, you would set Max Runs Per Item to 2, and put a min run interval of 1 day. This ensures that on the first decline by the AI, the AI would not run the same item again unless at least 1 day has passed.
The AI Voice Agent is activated either via API, either using a POST request or via an AI system action.
Below are the agent settings that apply to an AI Voice Agent.
Select a function which will run immediately prior to the agent being initiated for a call.
Select the agent voice specific to the AI integration you are using.
The most important part of an AI Voice Agent. The agent instructions are a single document outlining what the voice agent should do, interact, etc. The formatted markdown is exactly what the AI will be provided with.
The content of the instructions should be in markdown format, structured using sections. The markdown editor is provided within the web app when modifying your AI Voice Agent.
You have the ability to add dynamic content to your AI instructions using handlebars syntax.
The markdown editor supports dynamic data using Handlebars templating language, allowing you to customize the AI instructions. Handlebars takes the Input Data and extracts data based on the notation. Handlebars syntax allows you to generate customized instructions by inserting data to make an AI Voice call relevant to a specific caller.
For example, if you had the item data { “first_name”: “Bob”}
, you can reference this in the markdown instructions using handlebars syntax: {{first_name}}
which will output the string “Bob”.
In addition to substituting values, you can use Handlebars in your instructions to format dates, iterate over lists, and conditionally render content. Handlebars offers numerous advanced capabilities including conditionals, expressions and more.
Handlebars Documentation
Several custom helpers are available for you to format the output of an input string, number and more. These helpers are available in addition to the built-in Handlebars helpers.
Helper | Shortcode | Input Data | Output | Description |
---|---|---|---|---|
findWhereEquals | {{findWhereEquals 'metadata' 'name' 'affiliate_id' 'value'}} |
|
12345 | Finds a value within an array of objects. Please read the detailed explanation below. |
math | {{math 'add' shipping_amount tax_amount 'currency'}} |
|
$11.82 | Perform a mathematic calculation between two numbers with result formatting. Please read the detailed explanation below. |
toString | {{toString amount}} |
|
14.42 | Converts a value into a string including JSON objects. |
The findWhereEquals helper will find the value for a specific object property within an array of objects. Mostly useful for parsing the metadata array, searching for a value where another value equals something.
Arguments:
Format: {{findWhereEquals #1 #2 #3 #4}}
Example Shortcode: {{findWhereEquals 'metadata' 'name' 'affiliate_id' 'value'}}
Example Data:
{
"metadata": [
{
name: 'coupon_code',
value: '10percent',
entry_date: '2023-01-05'
},
{
name: 'affiliate_id',
value: '12345',
entry_date: '2023-01-05'
}
]
}
Handlebars | Output |
---|---|
{{findWhereEquals 'metadata' 'name' 'affiliate_id' 'value'}} |
12345 |
{{findWhereEquals 'metadata' 'name' 'coupon_code' 'value'}} |
10percent |
{{findWhereEquals 'metadata' 'value' '10percent' 'name'}} |
coupon_code |
The math helper will perform a mathematic calculation between two numbers with result formatting.
Arguments:
Format: {{math #1 #2 #3 #4}}
Example Shortcode: {{math 'add' shipping_amount tax_amount 'currency'}}
Example Data:
{
"shipping_amount": 10.40,
"tax_amount": 1.42
}
Handlebars | Output |
---|---|
{{math 'add' shipping_amount tax_amount 'currency'}} |
$11.82 |
{{math 'add' shipping_amount tax_amount 'float'}} |
11.82 |
{{math 'subtract' shipping_amount tax_amount 'integer'}} |
8 |
{{math 'multiply' shipping_amount tax_amount 'float'}} |
14.76 |
{{math 'divide' shipping_amount tax_amount 'float'}} |
7.32 |
The following JSON object is made available when compiling AI instructions using handlebars.
Note that fields can change dependent on call method, trigger event and whether you have a pre-agent function enabled.
{
"item": {
"has_item_details": true,
"item_type": "sale",
"item_id": "JBAy1XMbGAcm1pbQ57l9",
"item_details": {
"id": "JBAy1XMbGAcm1pbQ57l9",
"amount_gross": 103.56,
...
}
},
"customer": {
"id": "Bv70Vk7ar0u9R9WBY9ol",
"verified": true
},
"pre_agent_function": {
"has_response": true,
"response": {
"company_name": "Acme Inc.",
"allow_full_refunds": false
}
}
}
The item object contains the following properties.
Property | Type | Description | Call Method |
---|---|---|---|
has_item_details | boolean | Always true for outbound calls. May be true for inbound if customer match. | Inbound and Outbound |
item_type | string | The item type, specific to the trigger for outbound calls. Always “customer” if inbound customer match. | Inbound and Outbound |
item_id | string | The item ID, specific to the trigger item type for outbound calls. Always the customer ID if inbound customer match. | Inbound and Outbound |
item_details | object | The item details, specific to the trigger item type for outbound calls. Always the customer details if inbound customer match. | Inbound and Outbound |
The item object contains the following properties.
Property | Type | Description | Call Method |
---|---|---|---|
id | boolean | If a customer is associated with an outbound call, or an inbound call matches a customer phone. | Inbound Only |
verified | string | The customer ID if customer verified. | Inbound Only |
The pre_agent_function object contains the following properties.
Property | Type | Description |
---|---|---|
has_response | boolean | If a pre-agent function was run and a valid JSON object was returned. |
response | object | The JSON object returned from a pre-agent function. |
System can be made available to the AI when you enable them. You must enable each system action individually, as to prevent unwanted actions and reduce token cost. For example, if you do not want an AI Voice Agent to issue refunds, you would leave all refund actions disabled. If you want an AI Voice Agent to find a customer record, you would enable the Get Customer and Search Customer actions.
Note: System actions are opt-in, you must enable them individually when configuring your agent.
Below are the call limits you can apply to an AI Voice Agent.
Limit the total number of calls in a 24 hour period. 0 = no limit.
Limit each call to a total duration between 1 and 30 minutes. Default call duration limit is 15 minutes, max is 30 minutes.
For outbound agents only. Limit the total number of outbound calls this agent can make to the same customer. Meant to prevent spamming a customer with calls due to consecutive trigger events. 0 = no limit.
Below are the built-in call features that apply to an AI Voice Agent.
If a caller does not speak for a total of 30 seconds, the caller is assumed to be inactive and the call is automatically ended by the system.
For outbound calls, if the AI suspects that it has reached a voicemail it will hang up.
Call transfer ability is built in, simply tell the AI if/when a transfer should occur and supply a transfer number in the instructions.
Example instruction:
If the customer asks to speak to a supervisor, transfer the call to 123-456-7890
Call end ability is built in, simply tell the AI if/when to end a call in the instructions.
Example instruction:
If the caller no longer needs assistance, end the call.
Below are examples of AI Voice Agents in RevCent. Please note the markdown instructions for each.
Recommended: Read this OpenAI post on proper formatting for realtime agents OpenAI Realtime Prompting Guide
In this example, we want to call a customer when their payment is declined in order to help the customer successfully purchase.
Important: This example is provided as a starting point. You will definitely want to monitor calls and tweak instructions based on results. If you require a different type of agent, change the instructions as needed. Eventually you will have the best instructions for your agent but it will take time.
{{{toString item.item_details}}}
within the instructions.{{#if item.item_details.customer.first_name}}
conditional statement.
{{#if item.item_details.id}}
# Reference Sale (Internal)
Sale details for internal reference:
{{{toString item.item_details}}}
{{/if}}
# Role & Objective (Internal)
- You are an outbound customer service agent in regards to a sale that had a declined payment.
- You want to help them complete the pending sale with a successful payment using a new card.
# Personality & Tone (Internal)
## Personality
- Friendly, calm and approachable expert customer service agent.
## Tone
- Warm, concise, confident, never fawning.
## Language
- The conversation will be only in English.
- Do not respond in any other language even if the user asks.
- If the user speaks another language, politely explain that support is limited to English.
## Variety
- Do not repeat the same sentence twice.
- Vary your responses so it doesn't sound robotic.
# Conversation Flow
## 1) Greeting
Goal: You are currently connected to a customer. Set tone and invite the reason for calling. How to respond:
- Identify as Customer Support and that you are calling to help fix the declined payment.
{{#if item.item_details.customer.first_name}}
- Keep the opener brief and address the customer by first name during the opener.
{{else}}
- Keep the opener brief.
- Get the details of the sale without telling the caller, you are only retrieving the details for internal reference.
{{/if}}
- Without telling the caller about or confirming the operation took place, Insert the following metadata entries to the sale using the InsertMetadata operation:
"ai_voice_agent_called": "true"
## 2) Add A New Card
Goal: Add a new card to the customer account.
- Ask the customer if they would like to add a new card.
- If the customer agrees to add a new card, add the card then proceed to step 3.
- If the customer does not want to add a new card, try to convince them to. If they still refuse, hang up.
## 3) Resolve
Goal: Re attempt the pending sale
- Run the process pending sale operation using the same payment profile ID and campaign ID from the original pending sale and include the metadata entries:
"ai_processed": "true"
"ai_processed_payment": "true"
- Make sure you have processed the pending sale a maximum of 2 times during the conversation.
## 4) Confirm/Close
Goal: Confirm outcome and end cleanly. How to respond:
- State the process pending sale attempt result.
- If the result was declined, ask if the customer would like to try yet another different card.
- If the customer provides a new card with required fields, re-attempt the pending sale with new card information.
- If you attempt payment and it was successful, insert the following metadata to the sale without telling the caller:
"ai_processed_success": "true"
- If you attempt payment and it was unsuccessful, insert the following metadata to the sale without telling the caller:
"ai_processed_success": "false"
End call if caller declines more help.
Enable the following system actions:
In this example, we want to accept calls as a customer service agent.
Important: This example is provided as a starting point. You will definitely want to monitor calls and tweak instructions based on results. If you require a different type of agent, change the instructions as needed. Eventually you will have the best instructions for your agent but it will take time.
{{{toString item.item_details}}}
within the instructions.{{#if item.item_details.first_name}}
conditional statement.
# Role & Objective (Internal)
- You are an inbound customer service agent.
# Personality & Tone (Internal)
## Personality
- Friendly, calm and approachable expert customer service agent.
## Tone
- Warm, concise, confident, never fawning.
## Language
- The conversation will be only in English.
- Do not respond in any other language even if the user asks.
- If the user speaks another language, politely explain that support is limited to English.
## Variety
- Do not repeat the same sentence twice.
- Vary your responses so it doesn't sound robotic.
# Conversation Flow
## 1) Greeting
Goal: You are currently connected to a caller. Set tone and invite the reason for calling. How to respond:
- Identify as Customer Support.
- Keep the opener brief and invite the caller’s goal. Sample phrases (do not always repeat the same phrases, vary your responses):
{{#if item.item_details.first_name}}
- “Thanks for calling {{item.item_details.first_name}} —how can I help today?” Exit when: Caller states an initial goal or symptom.
{{else}}
- “Thanks for calling —how can I help today?” Exit when: Caller states an initial goal or symptom.
{{/if}}
## 2) Customer Details
---------
{{#if item.item_details}}
The customer details are: {{{toString item.item_details}}}
- Proceed to step 4
{{else}}
Goal: Confirm identity and retrieve the account. How to respond:
- Once you have email or phone, search customers.
- If lookup fails, try the alternate identifier once; otherwise ask the customer to call back. Sample phrases:
- “Thanks—looking up your account now.”
- “If that doesn’t pull up, what’s the other contact—email or phone?”
- “Found your account.” Exit when: Customer is found.
- Proceed to step 3
{{/if}}
## 3) Verify Caller
---------
Goal: Verify the account is the caller.
- Ask to verify the zip code on the account.
- If unable to verify zip code after three attempts, end the call.
- If verified, proceed to step 4
## 4) Diagnose
---------
Goal: Find out why the customer has called customer support.
- If the customer has an issue with a sale, proceed to step 5.
- If the customer has a payment issue, proceed to step 6.
- If the customer has an issue with a shipment, proceed to step 7.
- For any other issues, try your best to resolve the issue.
## 5) Sale Issue
Goal: Get the sale related to the customer
- Get the most recent sale for the customer using IDs contained within the sales array found in the customer details. Tell the customer you are looking up their sale information.
- If you retrieve the sale for the customer, try to resolve the issue.
- If you are unable to retrieve the sale, try one more time then hang up.
## 6) Payment Issue
Goal: Find out what the issue is related to payment.
- If the customer threatens to file a chargeback or call their bank, do not ever issue a refund.
- If the customer requests a refund, ask them why, then issue a refund.
- Create a note for the customer explaining why they requested a refund.
## 7) Shipment Issue
Goal: Get the shipment related to the customer
- Get the most recent shipment for the customer using IDs contained within the shipments array found in the customer details. Tell the customer you are looking up their shipment information.
- If you retrieve the shipment for the customer, try to resolve the issue.
- If you are unable to retrieve the shipment, try one more time then hang up.
## 8) Confirm/Close
Goal: Confirm outcome and end cleanly. How to respond:
If caller no longer requires assistance, say a friendly goodbye, then end the call.
Only enable the system actions specific to the inbound agents' purpose. Depending on what you want the agent to do, go through the system action list and enable only the ones the agent will need to fulfill tasks.