This document provides a model for integrating SmartReach with a Voice AI Vendor. The document is intended for AI Vendors and their clients.

SmartReach REST APIs 

You can find details about each API that is referenced in this document in the Session API and Configuration API sections of the REST APIs section.

To begin with, see the SmartReach API Overview and SmartReach API Quick Start Guide sections of the SmartReach Developer Portal.

Virtual Agent Management and Data Collection

A set of virtual agents is configured on the SmartReach 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 that is connected to the AI Vendor.  Configuration and automation of Virtual Agents requires assistance from the SmartReach Implementation team.

  1. When a call is routed to the virtual agent through the SmartReach standard routing services, SmartReach conferences the AI Vendor using an 899 number assigned specifically for the SmartReach client. The number passes as part of the invite. The AL vendor is able to identify the calls associated with a specific agent based on the information provided in the SIP invite.

    For example, INVITE sip:+18990000001@XX.XXX.XX.XX:5070 SIP/2.0^M


  2. To obtain additional data associated with the call, the AI Vendor can access the screen pop data that is typically presented to a human agent. The data can include the caller account number, caller  phone number, caller  address, and so on. 

    Before accessing Screen Pop, you must obtain a Session ID.  The SmartReach 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.

    Session API Request:

    https://docs.livevox.com/dp/ra/u17/session-api-76802583.html#id-.SessionAPIvU17-Login

    curl -L 'https://api.stg4.livevox.com/session/login' \

    -H 'LIVEVOX-Access: 8146ba6345XXXXXXXX5cd5b8719' \

    -H 'Content-Type: application/json' \

    -d '{

         "clientName": "Integration_Services",

         "userName": "AIVA1",

         "password": "XXX",

         "agent": "true"

    }'

    Field NameDescription
     LIVEVOX-AccessHeader that corresponds to an API security token on our platform.
    clientNameThe unique name assigned to each client on our platform.
    userNameThe agent login ID, extracted from the SIP headers (for example, X-transaction-id).
    passwordA shared password for all virtual agents. This will be provided once virtual agents are created.
    agentA Boolean flag (true/false) indicating whether the user is an agent.

    Screen Pop API

    https://docs.livevox.com/dp/ra/latest/agent-api-methods-133268568.html#id-.AgentAPIMethodsvFall23-GetScreenPopDetails

    GET /callControl/agent/screenpop

    Host: localhost.com

    Content-Type: application/json

    Accept: application/json  

    #Response
    200 OK
    Content-Type: application/json
    {
    	"screenPopRow": [{
    		"key": "FIRST NAME",
    		"value": "LV"
    	},
    	{
    		"key": "LAST NAME",
    		"value": "SUP"
    	},
    	{
    		"key": "ACCOUNT NUMBER",
    		"value": "abc"
    	},
    	{
    		"key": "PHONE DIALED",
    		"value": "9174645253"
    	},	
    	{
    		"key": "Call Direction",
    		"value": "Outbound"
    	},
    	{
    		"key": "Classification",
    		"value": "Spanish"
    	},	
    	{
    		"key": "Call Skill Name",
    		"value": "Manual (Manual 4)"
    	}]
    }
    
    
    CODE
     
  3. If the AI Vendor collects additional data that must be associated with a contact, use the SmartReach Update Contact API.

  4. When the bot completes a call with the caller , the AI Vendor must set the termination code for the call.  AI Vendor to work with their client to determine which termination codes will be used for sending the call to a human agent or ending the call.

  5.  If the call is to be sent to a human agent for servicing the DocDB endpoint may be used to pass information about the call back to the LiveVox Portal.  Client, AI Vendor and LiveVox to discuss what data needs to be returned and posted to the DocDB endpoint.  This data may be used to route the call if the call is to be routed differently based upon what happened in the call, or the data may be presented to the Agent to understand why the caller needed to escalate.
curl --location 'https://wrapper-prd.livevox.tools/reports/aiva2/' \
--header 'Content-Type: application/json' \
--header 'GET-TOKEN: 7894136-15156469-46798465141-1456' \
--data '{
    "ANI": "9437774223",
    "DNIS": "8998000405",
    "CallerAuthenticated": "True",
    "AccountNumber": "1-1018629-2",
    "Language": "English",
    "IntentCat1": "",
    "IntentCat2": "",
    "EscalationReason": "",
    "TerminationId": "751",
    "ConversationID": "ameliaTransaction",
    "PaymentMade": "False",
    "DisclosureProvided": "True",
    "ListOfIntents": "all stored in one field",
    "PendingStatus": "P"
}'

CODE


Field Descriptions:

  • ANI (caller  phone), transactionID and fulfillmentCounter(should always be = -1) are required as those values are used to retrieve the information for a specific record on the SmartReach end once the call is passed back using the termination code.
  • Inside the current state Object can send whatever information is needed. 
  • The external records Object is used to store the account that was verified/authenticated during the bot interaction, it is used inside SmartReach to perform a direct lookup against that value and present the match to the agent on the screen pop.


Caller Portal Config Requirements

  1.  Create or configure virtual agents. (SmartReach is required to configure virtual agents.)

  2. Configure a Basic Service for Virtual Agents to handle the calls.

  3. Set the Service ACD mode to “Agent Call Out”.

  4. Configure Service Groups for virtual agents and set the type to “LONGEST_AVAILABLE_AGENT”.

  5. Create term codes to support transfers to human agents.

  6. Create term codes for virtual agents to complete calls.

  7. Load contacts into the Contact Manager.

  8. Update contact flows to validate inbound calls against the Contact Manager.

  9. Configure the virtual agent desktop with the data required for the virtual agent screen popup.