The POST /register
endpoint allows you to register a provider and configure how interactions tags with that provider are handled.
Panel |
---|
borderColor | #eeeeee |
---|
bgColor | white |
---|
titleColor | white |
---|
borderWidth | 1 |
---|
titleBGColor | #871fff |
---|
borderStyle | solid |
---|
title | In this page |
---|
|
|
Insert excerpt |
---|
| _ExcerptAPICloudNextGen |
---|
| _ExcerptAPICloudNextGen |
---|
nopanel | true |
---|
|
Header parameters in Requests (Interactions API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
---|
interactions:write | Entire endpoint |
Request
...
ProviderSettings
...
Example Request
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -L -X POST "https://***.api.newvoicemedia.com/interactions/register" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v1+json" \
-H "Content-Type: application/json" \
--data-raw "<JSON BODY>" |
Example body
Code Block |
---|
|
{
"provider": "TestProviderName",
"endpoint": "https://endpoint.example.com/routingendpoint",
"headers":
{
"x-header1": "value1",
"x-header2": "value2"
},
"agentactionspermitted":
{
"release" : 1,
"hold" : 1,
"transferToAgent": 1,
"transferToRoute": 1
}
} |
provider
. Required The name of the provider that you are registering. After registering a provider, you can use the name of that provider in the body of a POST /Invoke
request (in the provider
property) to restrict or allow agent actions on the associated interactions, and, optionally, make requests to the endpoint.
endpoint
. Optional An https endpoint that will receive notifications made by Vonage Contact Center (VCC). VCC sends notifications after assigning associated interactions to agents, and when those agents release the interactions.
headers
. Optional Array of key-value pairs. Each pair contains a header name and a header value. This set of headers is included in any POST
request from VCC to the provider endpoint.
Info |
---|
If you specify an authorization header, you must specify the header in the following format:
Authorization: <type> <credentials> For example:
"Authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1l" or
"Authorization": "Bearer 24d80e703a037349cb4818cf7ec695cc" |
agentactionspermitted
. Required Array of key-value pairs. Each pair contains an operation name (key) and a 0 or 1 (value). 0 indicates that the operation is not allowed and 1 indicates that the operation is allowed.
agentactionspermitted
- Currently the only supported operations are release, hold, transferToAgent and transferToRoute. Agents can only perform the allowed operations on interactions associated with the provider.
- The release operation enables an agent to end an interaction.
- The hold operation enables an agent to put a caller on hold (in the case of a live interaction) or park a nonlive interaction.
- The hold operation enables the retrieve operation by inference.
- The transferToAgent and transferToRoute operations enable an agent to transfer the interaction to an agent or route respectively.
- Unless specified, all operations—other than
...
...
- operation—are not allowed.
...
Registering a provider and allowing release
Code Block |
---|
|
{
"provider": "TestProviderName",
"agentactionspermitted":
{
"release" : 1
}
} |
Registering a provider with a callback endpoint
Code Block |
---|
|
{
"provider": "TestProviderName",
"endpoint": "https://endpoint.example.com/routingendpoint",
"headers":
{
"x-header1Authorization": "value1Basic <token>",
}
} |
Registering a provider without a callback endpoint
Code Block |
---|
|
{
"x-header2provider": "value2"
}TestProviderName",
"agentactionspermitted":
{
"release" : 1,
"hold" : 1,
"transferToAgent": 1,
"transferToRoute": 1
}
} |
...
Callbacks
Providers registered will receive the following API callbacks.
Interaction assigned to Agent
Code Block |
---|
|
[
{
"provider"notification": "AssignToAgent",
"objectid": "TestProviderName88381694",
"agentactionspermittednotificationid": "d8016173-f069-4fa4-ac3e-2a4a1bae6ea8",
"params": {
"AccountName": "InsightsDemoEMEA",
"Agent": "releaseInsightsAgentEMEA",
"AgentId": 1,"5464"
}
}
"hold" : 1] |
Interaction released from the VCC Platform
Code Block |
---|
|
[
{
"notification": "Release",
"objectid": "88381694",
"transferToAgentnotificationid": 1,
"309eb0a5-6647-4b5c-9bf7-54a2b9a82768",
"params": {
"transferToRouteAccountName": 1"InsightsDemoEMEA"
}
}
] |
Notification
. The key indicating what action has been performed, the value is either AssignToAgent or Release.objectid
. Matching the externalId from the Create inbound interaction request body, this identifies the interaction.notificationid
. A generated unique notification ID.params
.AccountName
. The name of the VCC account where the notification occurred.Agent
. When assigned to the agent, this indicates the username of the agent assigned to the interaction.AgentId
. When assigned to the agent, this indicates the display ID of the agent assigned the interaction.
Insert excerpt |
---|
| _ExcerptRunInPostman |
---|
| _ExcerptRunInPostman |
---|
nopanel | true |
---|
|