Custom deployment channel (API)
Use the Dialog API to deploy agents to custom channels.
Overview
You can use the Dialog API to integrate your agent with any custom channel or interface (voice, chat or multimodal). Any Voiceflow agent type works with a Custom Channel deployment as it uses the Dialog Manager API, which is available across every project type.
The Dialog Manger API integrates through a REST API with your Custom Channel.
Example Custom Channel Deployment
First steps
Before you start with the Dialog Manager API, you need to create a project on your Voiceflow workspace.
Clone the starter pack
Download the API Examples repo found here to access a variety of prebuilt API examples, including Node.js, Python, Rust, and HTML.
Authentication
We'll need to access the Project API key
for the design we want to connect into our app. To obtain the API Key:
- Open the agent project you are using
- Select on the Integrations tab (shortcut:
3
). Found on the left-hand menu. - Copy the
Dialog API Key
found in the Dialog API section.
![Above you can see the Integrations section within an Assistant project](https://files.readme.io/dcf4795-small-CleanShot_2023-05-02_at_00.30.30.png)
Above you can see the Integrations section within an agent project
Launch
Open up the API Examples pack in your favorite code editor.
HTML and JQuery
- Replace
'YOUR_API_KEY_HERE'
inindex.html
with your API Key.- Open index.html on any browser to start your chat!
Example:
Node.js
- If you do not have node, install Node.js and npm from nodejs.org, or follow an equivalent guide.
- In this folder, run
npm install.
- Replace
'YOUR_API_KEY_HERE'
inindex.js
with your Dialog Manager API Key.- run
npm
start to start your chat!
Example:
$ npm start
> What is your name?: tyler
what can I do for you?
...
> Say something: send email
who is the recipient?
...
> Say something: [email protected]
what is the title of your email?
...
> Say something: How was your day?
sending the email for [email protected] called "How was your day?". Is that correct?
...
> Say something: yes
successfully sent the email for [email protected] called "How was your day?"
The end! Start me again with `npm start`
Video Walkthrough
Updated about 1 month ago