Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Return to User Hub



Contents

Introduction

This document provides a model for integrating LiveVox with an artificial intelligence speech vendor (AI Vendor). The document is intended for the AI Vendor and their clients.

LiveVox REST APIs 

Details about each API that is referenced in this document can be found in the LiveVox Session, Call Control, and Contact APIs on the LiveVox Developer Portal (Username: prospect; Password: Livevox12345^).

To begin with, see the LiveVox API Overview and LiveVox API Quick Start Guide sections of the portal.

Virtual Agent Management and Data Collection

A set of Virtual Agents are configured on the LiveVox portal. A one to one ratio of Virtual Agents exists for calls handled by the AI Vendor. The client must plan for the appropriate number of Virtual Agents to handle their call volume, in addition to determining the maximum number of simultaneous calls for each service connected to the AI Vendor.

  1. The AI Vendor must ensure that the Virtual Agents are ready on the platform. To do so:
    1. Obtain the Virtual Agent session ID.

      POST https://{{APIHost}}/session/login
      Header: API token provided by LiveVox

      Body example: {"clientName": "Training2", "userName": "AI Vendor1", "password": "xxxx", "agent": "true" 


    2. Add the Virtual Agent to the appropriate service.

      POST https://{{APIHost}}/callControl/agent/service/join?serviceId=XXXXXX&phoneNumber=899XXXXXXX (see below for more info related assigning agent 899#s)
      Header: Session ID from 1



    3. Set the Virtual Agent to READY.

      POST https://{{APIHost}}/callControl/agent/status/ready
      Header: Session ID from 1a


      • The LiveVox session ID expires after two hours of inactivity. If a Virtual Agent does not change the state (that is, receive a call), the session ID expires. Therefore, the client must move Virtual Agents in the Ready state to the Not Ready state, and then back to the Ready state, every hour.
      • Virtual Agents must be logged on only during the defined open hours of the LiveVox call center. If they are expected to receive calls outside the open hours, additional planning related to routing and other factors (such as, maintenance windows) must be considered. Virtual Agent support during closed hours must be addressed as part of phase 2+.
  2. When a call is routed to the Virtual Agent through the LiveVox standard routing services, LiveVox conferences the AI Vendor using a unique 899 number for the agent. This unique number passes as part of the invite. This allows the AI Vendor to identify the calls associated with each agent. 

    An example is as follows.

    LiveVox Virtual AgentINVITE
    Virtual_Agent_1INVITE sip:+18990000001@XX.XXX.XX.XX:5070 SIP/2.0^M
    Virtual_Agent_2INVITE sip:+18990000002@XX.XXX.XX.XX:5070 SIP/2.0^M
    Virtual_Agent_3INVITE sip:+18990000003@XX.XXX.XX.XX:5070 SIP/2.0^M
  3. If the AI Vendor collects additional data that must be associated with a contact, use the LiveVox Update Contact API.

    PUT https://{{APIHost}}/contact/contacts/{account}
    Header: Session ID from 1a
    Body: See the LiveVox Developer Portal for details and work with the client to determine which fields in Contact Manager must be updated


    The additional data must be one that is stored for a long time and associated with the contact

  4. If the AI Vendor collects data specific to calls that appear on the Human Agent screens, use the LiveVox AI Integration App (AIA) API.

    • Update the AIA.
    • The URL is specific to a client and is provided as part of the client's project.
    • A separate specification document is provided for the method, headers, parameters, and body of the AIA.
    • The data fields include:
      • transactionId
      • sessionId
      • ani
      • accountNumber
      • nextAction
      • callOutcome
      • lvresult
      • Other1
        thru
      • Other20
  5. If the client wants to route non-LiveVox validated consumers to the AI Vendor, the AI Vendor can collect data and update the contact through the Update Contact API or create a contact through the Create Contact API.

    To update the contact:

    PUT https://{{APIHost}}/contact/contacts/{account}
    Header: Session ID from 1a
    Body: See the LiveVox Developer Portal for options to update


    To create a contact:

    PUT https://{{APIHost}}/contact/contacts/
    Header: Session ID from 1a
    Body: See the LiveVox Developer Portal for options to update

  6. When the AI Vendor completes a call, a term code is assigned to the call indicating that either the call is over or the call must be transferred to a Human Agent.

    To obtain the TransID and SessionID for the call:

    POST https://{{APIHost}}/callControl/agent/status
    Header: Session ID from 1a
    Body example: {"stateChangedAfter": "1573809480000"}


    To assign the agent term code:

    PUT https://{{APIHost}}/callControl/agent/call/termCode
    Header: Session ID from 1a
    Body example: {"callTransactionId": "108821676850", "callSessionId": "U5EF8FT5DFC07F9@10.101.21.216", "termCodeId": "101416228", "phoneDialed": "2134634007", "moveAgentToNotReady": "false"}


    The Virtual Agent is now ready to receive another call.

Customer Portal Config Requirements

  1. Create or configure Virtual Agents.

    LiveVox is required to configure Virtual Agents.

  2. Set the Service ACD mode to Agent Call Out.
  3. Set Service Groups for Virtual Agents to LONGEST_AVAILABLE_AGENT.
  4. Create term codes to support transfers to Human Agents.
  5. Load contacts into Contact Manager.
  6. Update call flows to validate consumers against Contact Manager.

Sample SIP INVITE

Request-Line: INVITE sip:+18990000001@XX.XX.XX.XX:5060 SIP/2.0

Message Header

Record-Route: <sip: XX.XX.XX.XX:5060;r2=on;lr;did=0c.a75cb3e7>

Record-Route: <sip: XX.XX.XX.XX;r2=on;lr;did=0c.a75cb3e7>

Record-Route: <sip: XX.XX.XX.XX:5070;lr;did=0c.9c237b23>

To: sip:+ 18990000001@ XX.XX.XX.XX:5070

Contact: <sip: XX.XX.XX.XX:5060;transport=udp>

Call-ID: 5e18e8dc-0000-7b7397a3-f7f2e4ec-d3e93b6c@10.101.21.27

CSeq: 4117825 INVITE

Content-Length: 177

Content-Type: application/sdp

From: <sip:+19192109237@ XX.XX.XX.XX:5060>;tag=telstage-4c11af69-5e18e8dc

X-Lv-Destination-Ip:

X-Lv-Destination-Port: 5060

Session-Privacy: no

Carrier-Name: tmis

Session-ID: U2DB327T5E18E8DC@XX.XX.XX.XX

Pool-Name: carrierinbound

Allow: INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, OPTIONS, INFO, REGISTER, SUBSCRIBE, MESSAGE, UPDATE

Session-Expires: 1800;refresher=uac

Supported: timer

Max-Forwards: 68

Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK623f.ac426ea3.0

Via: SIP/2.0/UDP XX.XX.XX.XX:5070;received= XX.XX.XX.XX;branch=z9hG4bK623f.02823352.0

Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK5e18e8dc-0000-7b7397a4-f7f2e4ec-d3e93b6c

  • No labels