Async Transcript API

The AsyncTranscriptAPI method allows the application to pull the conversation history of past aynchronus engagements.

Public Methods
Public Methods
  • public MessageTypes getMessageType()

    Possible Message Types are.

    MessageTypes.TYPE_CHATLINE

    MessageTypes.TYPE_STATECHANGE

    MessageTypes.TYPE_CHATAUTHORIZED

    MessageTypes.TYPE_AUTOMATION_REQUEST

    MessageTypes.TYPE_MEMBER_CONNECTED

    MessageTypes.TYPE_COMMAND

    MessageTypes.TYPE_MEMEBER_LOST

  • public Object getProperty(String name)

    Below table list the properties that can be present in a GetMessageResponse. Pass the property name to retreive its value.

    NameValueTypeDescription
     agentNameName of agent assigned to this engagementstringAgent name
     agentIsTyping-statetrue/falsebooleanIndicates the agent is currently typing a response.
     agentIDNumeric ID of the agent assignedstringThe unique identifier of the agent (same as agent login ID)
     commandpushURLstringA pushURL command is sent
     fromMessage senderstringThis field contains the recommended customer facing agent name (typically presented something like “Jim: How can I help you?” where Jim is the agent name presented to the customer
     messageTag to wrap the content of each message Indicates a new agent message is included
     messageTextChat line textstringThe actual agent text/message
    messageTypechatLine | command | stateChange | chatroom.member_connected | chatroom.member_loststringType of message that is being returned. When the “stateChange” message type is received, you will also receive the “state” field indicating what state was changed. When the “command” message type is received, you will also receive the “command” field indicating what command was sent.
     queueDepthNumber of customers ahead of you in queuenumberQueue depth is provided when state is queued.
     sequenceNumberSequence number of this messagenumberThe client application can use the sequence number to ensure that messages are displayed in the correct order
    statequeued | assigned | closed | agentIsTyping| transfer | conferencestringThe current status of the engagement. This field presents only if messageType = stateChange
     urlURL of page sentstringWhen messageType is command this field will be included and contain the URL to be pushed in the customer’s browser
    waitTimeEstimated wait time in secondsnumberEstimated wait time is provided when state is queued.
        
        
    Other parameters what returns from CR
    NameExampleMessage types where this parameter appears
    agent.alias<agent.alias>Agent</agent.alias><messageType>stateChange</messageType><state>assigned</state>, <messageType>chatLine</messageType>, <messageType>chatroom.member_connected</messageType>
     business_unit.id<business_unit.id>22</business_unit.id><messageType>stateChange</messageType><state>assigned</state>, <messageType>chatroom.member_connected</messageType>
    chatroom.chat_id<chatroom.chat_id>7657620082880181644</chatroom.chat_id><messageType>chatroom.member_connected</messageType>, <messageType>chatroom.member_lost</messageType>
    chatroom.member.name<chatroom.member.name>1</chatroom.member.name><messageType>chatroom.member_connected</messageType> 
    chatroom.member.id<chatroom.member.id>1</chatroom.member.id><messageType>chatroom.member_connected</messageType>, <messageType>chatroom.member lost</messageType>
     chatroom.member.type<chatroom.member.type>agent</chatroom.member.type><messageType>chatroom.member_connected</messageType>, <messageType>chatroom.member_lost</messageType>
    chatrouter.address <chatrouter.address>192.168.0.20</chatrouter.address><messageType>stateChange</messageType><state>assigned</state>
    client.display.text<client.display.text>Agent has left the chat&amp;nl;You are being transferred, please hold...</client.display.text><messageType>stateChange</messageType><state>transfer</state>, <messageType>chatroom.member_connected</messageType>
    cobrowse.enabled<cobrowse.enabled>true</cobrowse.enabled><messageType>stateChange</messageType><state>assigned</state>
    display.text<display.text>Agent is typing...</display.text><messageType>stateChange</messageType><state>agentIsTyping</state>, <messageType>chatroom.member_connected</messageType>, <messageType>chatroom.member_lost</messageType>, <messageType>stateChange</messageType><state>closed</state>
    escalate<escalate>false</escalate><messageType>stateChange</messageType><state>closed</state>
    event.agent_first_name<event.agent_first_name>User First Name</event.agent_first_name><messageType>stateChange</messageType><state>assigned</state>, <messageType>chatroom.member_connected</messageType>
    event.agent_last_name<event.agent_last_name>User Last Name</event.agent_last_name><messageType>stateChange</messageType><state>assigned</state>, <messageType>chatroom.member_connected</messageType>
    exit<exit>true</exit><messageType>chatroom.member_lost</messageType>
    host.node.id<host.node.id>192.168.0.20</host.node.id><messageType>stateChange</messageType><state>assigned</state>, <messageType>stateChange</messageType><state>transfer</state>
    msg.originalrequest.id<msg.originalrequest.id>5722840798275623</msg.originalrequest.id><messageType>stateChange</messageType><state>assigned</state>, <messageType>stateChange</messageType><state>transfer</state>
    owner<owner>true</owner><messageType>chatroom.member_connected</messageType>
    reason<reason>Transfer accepted and sent to 1</reason>
    <messageType>stateChange</messageType><state>transfer</state>
    screening<screening>true</screening><messageType>chatroom.member_connected</messageType>
     script.id<script.id>200023</script.id><messageType>chatLine</messageType>
    tc.mode<tc.mode>transfer</tc.mode><messageType>chatroom.member_connected</messageType>, <messageType>chatroom.member_lost</messageType>, <messageType>stateChange</messageType><state>closed</state>
    type<type>2</type><messageType>stateChange</messageType><state>agentIsTyping</state>
    user.id<user.id>2</user.id><messageType>stateChange</messageType><state>agentIsTyping</state>


new AsyncTranscriptAPI(AsyncTranscriptAPI.Mode.ALL).getAsyncMessages(new OnSuccessListener<ArrayList<GetMessageResponse>>() {
    @Override
    public void onResponse(ArrayList<ConversationResponse> response) {
    }
});