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
  3. Follow instructions for Configuring Telephony Call Data Fields in Channel Automation
  4. Follow instructions for Configure Call Information Views

Source Code

INAPI Global Variable Function

Example Usage

Conversation Flow Code Block that calls the API with some data and user name 'ccmary'

(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();
  });