Integrating Bandwidth with Cognigy via AIBridge on the Universal Platform
Important: This article contains steps specific to our Universal Platform. If you're using our Legacy North American Platform, please see Integrating Bandwidth with Cognigy via AIBridge on the Legacy North American Platform.
Bandwidth’s AIBridge allows you to easily test and deploy new Voice AI tools in the contact center without all the overhead of building custom integrations. Our pre-built integrations with top AI providers take the development time down from weeks to hours, unlocking a new level of flexibility to add and switch out vendors as desired and continuously refine your customer experience without the burden of technical debt.
In this guide, we'll show you how to use AIBridge to accelerate your enterprise’s adoption of virtual agents and deliver better customer experiences at scale with Cognigy.
What do I need to get started?
- A registered Bandwidth account contracted for AIBridge with phone numbers.
- A registered Cognigy account (you can use a free trial account for testing purposes).
- A Google Cloud Platform account for Text-to-Speech and Speech-to-Text services.
How does it work?
When a call is received to a Bandwidth number, we deliver it through AIBridge to your Cognigy instance and automatically handle the conversion of Text-to-Speech and Speech-to-Text in the call flow. You can use these services directly in your Google instance using the API keys obtained from your selected vendor (Google) or from Bandwidth’s own Google integration.
To connect your Bandwidth numbers to Cognigy, follow these steps:
- Create your Bandwidth endpoint in Cognigy
- Register your Cognigy endpoint in Bandwidth
- Register your Text-to-Speech and Speech-to-Text provider in Bandwidth
- Create your Bandwidth BOT
- Route Bandwidth numbers to your BOT
- Set up your Virtual Agent flow in Cognigy
Create your Bandwidth endpoint in Cognigy
First, you must create a Bandwidth endpoint in the Cognigy platform. Endpoints are used to connect external channels, such as Bandwidth to Cognigy. Bandwidth converts channel-specific inputs and outputs to the standardized input object accepted by Cognigy.
- Log into the Cognigy Portal.
- Using the side navigation bar, create an agent or select one you've already created.
- In the side navigation bar, select Deploy -> Endpoints and click New Endpoint. For more information on Cognigy Endpoints, see Endpoints.
-
Complete the following fields:
- Name: Provide a name for your endpoint.
- Flow: Select an optional flow (you can also do this later).
- Endpoint Type: Select Bandwidth.
- Click Save.
- Save a copy of your endpoint URL – you'll need to provide it in the next section.
Register your Cognigy endpoint in Bandwidth
Once you've created your Bandwidth endpoint in Cognigy, you must register it in the Bandwidth App.
- Log into the Bandwidth App.
- In the left navigation bar, click Account and select Integrations.
- Click Add Integration.
- Confirm that the Integration Product field is set to AIBridge (it will be selected by default).
- Complete the following fields:
- Name: Provide a name for this integration.
- Integration Type: Select Cognigy.
- Roles: Select Bot.
- Description: Briefly describe this integration (optional).
- Bot Url: Paste the Cognigy endpoint URL created earlier.
- Click Add to save this integration.
Register your Text-to-Speech and Speech-to-Text provider in Bandwidth
Since Cognigy only provides BOT functionality, it requires a mandatory Speech-to-Text and Text-to-Speech provider.
Through AIBridge, Bandwidth uses APIs to automatically convert Text-to-Speech and Speech-to-Text. This is a Bring-Your-Own (BYO) service, which means you must have your own account and billing relationship with your selected provider. Bandwidth’s preferred Speech-to-Text and Text-to-Speech provider is Google. If you'd like to use a different provider, please contact your Account Manager.
Google Cloud Platform
The following steps explain how to complete the basic setup. For more information, see Cloud Text-to-Speech API and Cloud Speech-to-Text.
- Log into the Google Cloud Platform.
- Select the relevant GCP Project.
- Create a new service account or use an existing one. For more information on service accounts, see Service accounts overview. We recommend creating a new service account to only deal with a certain set of permissions that have been granted.
- In the left-hand menu, select APIs & Services and click API Library.
- Search for "speech-to-text", then select Cloud Speech-to-Text API and click Enable.
- Return to the API Library and search for “text-to-speech”, then select Cloud Text-to-Speech API and click Enable.
- Click Manage for Cloud Text-to-Speech API. Then, in the left-hand menu, select Credentials.
- Ensure you're enabling this service on the account you created or selected in Step 3.
- In the left-hand menu, select IAM & Admin and click IAM.
- Click Edit for the service account you created or selected in Step 3.
- Assign IAM roles Cloud Speech Client and Cloud Speech-to-Text Service Agent.
- Select IAM & Admin and click Service Accounts.
- Click on the existing service account and select the Keys tab.
- Select Add Key and click Create New Key.
- Select JSON and click Create.
- Save a copy of your private key and client email – you'll need to provide it in the next section.
Bandwidth App
- Log into the Bandwidth App.
- In the left navigation bar, click Account and select Integrations.
- Click Add Integration.
- Confirm that the Integration Product field is set to AIBridge (it will be selected by default).
- Complete the following fields:
- Name: Provide a name for this integration.
- Integration Type: Select Google.
- Roles: Select Text to Speech and Speech to Text.
- Description: Briefly describe this integration (optional).
- Private Key: Enter your private key created earlier.
- Client Email: Enter your client email created earlier.
- Region: Enter the appropriate region (e.g., "global").
- Location: Enter the appropriate location (e.g., "global").
- Environment: Enter the appropriate environment (e.g., “production”).
- Project Id: Enter your project ID.
- Click Add to save this integration.
Bandwidth is now ready to consume Google services directly from your account. Any billing records for Text-to-Speech and Speech-to-Text will be directly generated in your Google Cloud Platform account.
Create your Bandwidth BOT
Once you've registered your endpoint and your Text-to-Speech and Speech-to-Text provider, you're ready to create your Bandwidth BOT.
Bandwidth App
- In the left navigation bar, click Applications and select Bots.
- Click Create Bot.
- Complete the following fields:
- Name: Enter a name for your BOT.
- Description: Briefly describe this BOT.
- Bot Framework: Select the name of the Bot Framework created earlier.
- Text-to-speech: Select the name of the Text-to-Speech provider created earlier.
- Speech-to-text: Select the name of the Speech-to-Text provider created earlier.
- Voice Name: Select the voice name for your Text-to-Speech service.
- Language: Select the language for your Text-to-Speech service.
- Click Save to create your BOT.
Route Bandwidth numbers to your BOT
First, you must order a phone number from Bandwidth or use an existing one. You can use Advanced Call Routing (ACR) to route Bandwidth numbers to your BOTs in various ways. You must also decide whether you want to apply ACR settings to the entire Location or a specific phone number.
The following steps explain how to set up this configuration via the Bandwidth App or the Visual Builder.
Bandwidth App – Voice Configuration Packages
Voice Configuration Packages (VCP) allow you to define voice configurations that can apply to a group of phone numbers. Once a phone number is assigned to a VCP, it takes on the ACR settings defined by the VCP. This applies to all numbers assigned to the VCP.
- Log in to the Bandwidth App.
- In the side navigation bar, click Service Management and select Voice Configurations.
- Click Add Package or select an existing VCP.
- Under Routing, click Create Primary Route.
- Under Action, select Route To AIBridge Bot.
- Under Bot, select the name of the BOT created earlier.
- Click Save.
- Click Create Package (if creating a new VCP) or Save Changes (if updating an existing one)
Visual Builder – Voice Configuration Packages
The Visual Builder is our drag-and-drop, no-code graphical user interface (GUI) that allows you to create complex call flows for inbound calls. You can create call flows at the Location or TN level.
- In the side navigation bar, click Visual Builder.
- Click Create New Flow and apply the flow at the VCP level.
- Under Call Control, add the Advanced Call Routing node.
- Under Integrations, add the AIBridge node.
- Under Bot, select the name of the BOT created earlier.
- Select Publish or Publish As.
Set up your Virtual Agent flow in Cognigy
The flow is a visual representation of a potential dialog in a user-friendly interface. It's composed of individual nodes with different functionalities, ranging from generating output to collecting backend information, and is automatically executed as soon as the call comes into the numbers you've routed to your Cognigy endpoint.
Cognigy
Create a new flow
Use the following steps to create a new flow. For more information on designing your first Cognigy flow, see Flows.
- Log into the Cognigy platform and select your agent.
- In the left-hand menu, navigate to Build -> Flows.
- Click New Flow.
- Enter a name and description.
- Click Create.
Link your flow to your Bandwidth endpoint
Once you've set up your flow, you can link it to your Bandwidth endpoint if you haven't already done so earlier.
- In the left-hand menu, navigate to Deploy -> Endpoints and click on your existing Cognigy endpoint created earlier.
- Under Flow, select the new flow created here or choose an existing one.
- Click Save. You've now successfully linked Bandwidth to Cognigy via AIBridge. Any incoming calls will be directly routed to your BOT.
Transferring calls
You can use Transfer to send the current call to another Bandwidth phone number. This is useful for customer escalations or in scenarios where the virtual agent is unable to resolve the query.
To learn more about transferring calls in Cognigy, see Transfer. Once the call is transferred to a Bandwidth number, it'll look like an incoming call to Bandwidth.
You can use Advanced Call Routing to decide where to send the call (for example, to a contact center agent in Genesys using our BYOC for Genesys Cloud).
Support and further issues
If you’re still having trouble connecting Bandwidth to Cognigy, here are a few last tips:
- Check whether your calls are reaching Bandwidth by looking at your Call History.
- Check your BOT configuration and flow in the Cognigy portal.
- If you see a call record showing up in Bandwidth with an error message, please open a ticket with your Bandwidth Support Team.
Article is closed for comments.