50 lines
1.9 KiB
Markdown
50 lines
1.9 KiB
Markdown
# Interaction Notification API
|
|
|
|
Interaction Notification API is used to push Call Pops into Channel Automation.
|
|
|
|
## Prerequisits
|
|
|
|
1. Install and configure the _Channel Automation Interface_ Package from Resource Center -> Hub.
|
|
2. Download then Import into you IVA Workspace [INAPI Package](_studio_dependencies/ConversationFlowExport/IVA-Solution-Consultants_Peter's-Workspace_INAPI_e8063074-0129-41df-9a40-2f5386b0b3d5.json)
|
|
3. Follow instructions for [Configuring Telephony Call Data Fields](https://em-docs.verint.com/15_3/em-channels/Content/Telephony/Configuring_Telephony_Call_Data_Fields.htm) in Channel Automation
|
|
4. Follow instructions for [Configure Call Information Views](https://em-docs.verint.com/15_3/em-channels/Content/Configuring_the_Transfer_Bot__Voice_.htm)
|
|
|
|
## Source Code
|
|
|
|
[INAPI](./_studio_dependencies/Global%20Variable/INAPI.js) Global Variable Function
|
|
|
|
## Example Usage
|
|
|
|
Conversation Flow Code Block that calls the API with some data and user name 'ccmary'
|
|
|
|
```javascript
|
|
(async () => {
|
|
const ani = recognizedObject.metadata.ani;
|
|
const dnis = recognizedObject.metadata.dnis;
|
|
const firstName = conversationData.customer?.firstName ?? "FirstName";
|
|
const lastName = conversationData.customer?.lastName ?? "LastName";
|
|
const studentId = conversationData.customer?.studentId ?? "StudentId";
|
|
const dob = conversationData.customer?.dob ?? "1/1/1970";
|
|
INAPI().post(`${ani}`, `${dnis}`, "ccmary", {
|
|
"@type": "ved:TelephonyCallDataED",
|
|
"ved:firstName": `${firstName}`,
|
|
"ved:lastName": `${lastName}`,
|
|
"ved:studentId": `${studentId}`,
|
|
"ved:dob": `${dob}`,
|
|
});
|
|
})()
|
|
.catch((error) => {
|
|
console.log(error.message);
|
|
recognizedObject.answers.push("");
|
|
recognizedObject.errorInfo = {
|
|
...recognizedObject.errorInfo,
|
|
label: {
|
|
data: error.toJSON ? error.toJSON() : {},
|
|
message: error.message,
|
|
},
|
|
};
|
|
})
|
|
.finally(() => {
|
|
next();
|
|
});
|
|
``` |