Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CRUD operations for phone #813

Merged
merged 4 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/api-reference/phone/buy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: 'Buy AI phone number'
api: 'POST https://api-v2.opencopilot.so/backend/voice-channel/phone-number/buy'
authMethod: 'bearer'
description: 'This endpoint allows you to purchase a new phone number for your organization, enabling AI-driven communication. The phone number can be used to automatically answer calls, handle customer complaints, and respond to questions efficiently, leveraging AI to enhance customer support and streamline interactions.'
---

<ParamField body="organization_id" type="string" required>
The unique identifier for the copilot (organization) you want to create an AI
phone for. This is a required parameter.
</ParamField>

<ParamField body="area_code" type="string" required>
The area code for the phone number you want to buy. This is a required
parameter.
</ParamField>

<ParamField body="name" type="string">
The name to associate with the purchased phone number. If not provided, a
default name will be used.
</ParamField>
11 changes: 11 additions & 0 deletions docs/api-reference/phone/delete.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: 'Delete phone number'
api: 'DELETE https://api-v2.opencopilot.so/backend/voice-channel/phone-number/:phone_number_id'
authMethod: 'bearer'
description: 'This endpoint allows you to delete a phone number from your organization'
---

<ParamField path="phone_number_id" type="string" required>
The unique identifier for the phone number you would like to delete from your
organization
</ParamField>
38 changes: 38 additions & 0 deletions docs/api-reference/phone/get-all-phones.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: 'Get all phone numbers'
api: 'GET https://api-v2.opencopilot.so/backend/voice-channel/phone-numbers/:organization_id'
authMethod: 'bearer'
description: 'This endpoint allows you to list all the phone number of your organization.'
---

<ParamField path="organization_id" type="string" required>
The unique identifier for the copilot (organization) you want to create an AI
phone for. This is a required parameter.
</ParamField>

<ResponseExample>
```json Response
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organization_id": "15ca3add-0b6c-4fca-9829-b13bc8a39bba",
"provider_id": "091274",
"phone_number": "+14155690123",
"name": "My AI phone agent that calms down customers",
"base_prompt": "You are phone voice assistant. Always provice a short, to the point, and clear response. Do not engage in conversation with the user. Always ask the user to configure their account on Open CoPilot.",
"initial_message": "Hello, this phone is being managed by Open, how can I help you today?",
"handoff_phone_number": "+15103435446",
"created_at": "2024-08-12T22:02:40.000Z"
},
{ "id": "568e0f1d-f81f-4b31-a8dc-3c19be8a4654",
"organization_id": "b492c760-f0c4-43a7-8027-fa6c181f3369",
"provider_id": "091274",
"phone_number": "+14155690907",
"name": "My AI phone agent that compliments customers",
"base_prompt": "You are phone voice assistant. Always provice a short, to the point, and clear response. Do not engage in conversation with the user. Always ask the user to configure their account on Open CoPilot.",
"initial_message": "Hello, this phone is being managed by Open, how can I help you today?",
"handoff_phone_number": "+15103435446",
"created_at": "2024-08-24T12:01:59.000Z"}
]
```
</ResponseExample>
35 changes: 35 additions & 0 deletions docs/api-reference/phone/update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: 'Update phone number'
api: 'PUT https://api-v2.opencopilot.so/backend/voice-channel/phone-number/:phone_number_id'
authMethod: 'bearer'
description: 'This endpoint allows you to update a phone number from your organization'
---

<ParamField path="phone_number_id" type="string" required>
The unique identifier for the phone number you would like to update from your
organization
</ParamField>
{/* body */}
<ParamField body="name" type="string">
The name that identifies your AI phone
</ParamField>

<ParamField body="base_prompt" type="string">
The base prompt guides the AI's responses when interacting with customers. It
serves as the foundational instruction set for the AI phone, defining how it
should initiate conversations, handle customer inquiries, and respond to
various scenarios. This prompt helps ensure that the AI provides consistent
and relevant responses tailored to the specific needs of the organization and
its customers.
</ParamField>

<ParamField body="handoff_phone_number" type="string">
The handoff phone number is the phone number that the AI agent uses to handoff
the conversation with the customer if the customer asks to talk to a human, or
the AI phone agent cannot answer on of the customer's questions
</ParamField>

<ParamField body="initial_message" type="string">
The initial message is the first thing that the AI phone agent says when
answering the phone call.
</ParamField>
2 changes: 1 addition & 1 deletion docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ icon: "book"
<Card
title="Phone Support"
icon="phone"
href="phone/new"
href="phone/phone-support"
>
Use our phone support AI agent to handle customer support on the phone.
</Card>
Expand Down
12 changes: 11 additions & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"group": "Phone Support",
"icon": "phone",
"pages": ["phone/new"]
"pages": ["phone/phone-support", "phone/ai-phone-agent", "phone/human-phone-agent"]
},
{
"group": "Actions",
Expand Down Expand Up @@ -91,6 +91,16 @@
"api-reference/contacts/update"
]
},
{
"group": "Phone",
"icon": "phone",
"pages": [
"api-reference/phone/buy",
"api-reference/phone/get-all-phones",
"api-reference/phone/delete",
"api-reference/phone/update"
]
},
{
"group": "Email",
"icon": "envelope",
Expand Down
45 changes: 45 additions & 0 deletions docs/phone/ai-phone-agent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: 'AI Phone Agent'
icon: 'headset'
---

The **AI Phone Agent** is designed to enhance your organization's customer service by:

- **Answering calls immediately** without any delay, ensuring your customers are attended to as soon as they call.
- **Handling customer inquiries** with AI-driven responses that are both accurate and context-aware.
- **Redirecting calls to a human agent** if the customer requests human assistance or if the AI Phone Agent is unable to provide an appropriate answer. The transition is seamless, ensuring a smooth experience for the customer.

### Buying an AI Phone Number

To get started with the AI Phone Agent, you can buy an AI phone number directly from the dashboard. This number will be linked to your organization and can be customized for specific use cases.

<img src="/phone/buy-ai-phone.png" alt="Buy AI Phone Number" />

### Customizing the AI Phone Agent

You can change the base prompt of the AI Phone Agent to tailor it to different scenarios within your business. For example, you might want to have different AI agents for various departments, such as:

- **Customer Support:** An AI agent specifically trained to handle common product questions and basic troubleshooting.
- **Sales Inquiries:** An AI agent focused on providing information about your products and services, helping to drive sales.

<img src="/phone/customize-phone.png" alt="Buy AI Phone Number" />
In general, consider the following when customizing your AI Phone Agent:

- **Keep the base prompt clear and concise** to ensure the AI understands the core responsibilities.
- **Simplify the language** to make the AI's responses easy to understand, especially over the phone.
- **Align the prompt with specific goals**, such as increasing sales conversions or improving customer satisfaction.

{/* ### Video Demo

<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/FYmA-Xx2diU"
title="AI Phone Agent Demo"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe> */}

{/* This video provides a demo of the AI phone agent answering calls and handing off to a human agent to answer. The human agent is talked about more in the following section. */}
Binary file added docs/phone/buy-ai-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/phone/customize-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions docs/phone/human-phone-agent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: 'Human Agent'
icon: 'user-headset'
---

The **Human Phone Agent** empowers your organization with a personal touch, enabling human agents to:

- **Make outbound calls** directly to customers, using the handoff phone number set up after purchasing the AI phone number.
- **Receive incoming calls**, ensuring that customer queries and issues are handled by a real person when needed.
- **Instantly call contacts**, allowing for quick and efficient communication with key customers or stakeholders.

### Setting Up the Handoff Phone Number

After purchasing your AI phone number, you can set up a handoff phone number for human agents. This number will be used to make and receive calls, offering a seamless transition from AI to human interaction.

<img src="/phone/setting-up-phone.png" alt="Setup AI Phone Number" />

### Using the Human Phone Agent

Once the handoff phone number is configured, human agents can immediately begin making and receiving calls. This feature is especially useful for:

- **Personalized customer support**: When AI alone isn’t enough, human agents can take over to provide detailed and empathetic support.
- **Sales and follow-ups**: Human agents can directly engage with leads and clients, driving sales and fostering stronger relationships.

{/* ### Video Demo
This video provides a quick demonstration of how to set up and use the Human Phone Agent, showcasing the ease and efficiency of integrating human agents into your communication flow.
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/FYmA-Xx2diU"
title="Human Phone Agent Demo"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe> */}


File renamed without changes.
Binary file added docs/phone/setting-up-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading