Interface ChatApiCommands
-
- All Known Implementing Classes:
- UninitializedChat, ZopimChat, ZopimChatApi
public interface ChatApiCommands
Chat APIs interfaceDefines the set of APIs available in a given chat session. APIs will be linked to the account configured during initialization of
ZopimChatApi.init(String)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
addNote(java.lang.String note)
Appends a note to the current visitor notevoid
disconnect()
Disconnect the current chat, used when switching to push mode.boolean
emailTranscript(java.lang.String email)
Emails the current chat transcriptvoid
endChat()
Ends the current chat.void
resend(java.lang.String messageId)
Re-sends the visitor message.void
send(java.io.File file)
Sends the file to the current chat log.void
send(java.lang.String message)
Sends the visitor message.void
sendChatComment(java.lang.String comment)
Sets a comment to the current chat session.void
sendChatRating(ChatLog.Rating rating)
Sets rating for the current chat session.boolean
sendOfflineMessage(java.lang.String name, java.lang.String email, java.lang.String message)
Sends email to agents defined in the dashboard for this account.void
setDepartment(java.lang.String department)
Sets a department to the current chat session.void
setEmail(java.lang.String email)
Sets the email for the user in the current chat session.void
setName(java.lang.String name)
Sets the name for the user in the current chat session.void
setNote(java.lang.String note)
Sets a note to the visitor profilevoid
setPhoneNumber(java.lang.String phoneNumber)
Sets phone number information for the user that is in the current chat session.
-
-
-
Method Detail
-
send
void send(java.lang.String message)
Sends the visitor message.This message will appear in the agent dashboard in an active chat queue.
- Parameters:
message
- to be sent- See Also:
- Agent Visitor List
-
send
void send(java.io.File file)
Sends the file to the current chat log. Successful file send will trigger a chat log update with information about the file being uploaded.File must pass validation check and upload requirements defined in Zopim attachments page
A successful file upload will be visible in the agent dashboard.
- Parameters:
file
- to send- See Also:
ChatLogObserver
, Agent Dashboard
-
resend
void resend(java.lang.String messageId)
Re-sends the visitor message.This message will appear in the agent dashboard.
- Parameters:
messageId
- id of the message to resend- See Also:
- Agent Visitor List
-
sendOfflineMessage
boolean sendOfflineMessage(java.lang.String name, java.lang.String email, java.lang.String message)
Sends email to agents defined in the dashboard for this account.Email must be provided in order for the agent to be able to respond.
- Parameters:
name
- of the visitoremail
- of the visitormessage
- inquiry- Returns:
- true if was able to send, false otherwise
-
sendChatRating
void sendChatRating(ChatLog.Rating rating)
Sets rating for the current chat session.This will appear as a response to the chat rating questionnaire sent by an agent to the visitor.
- Parameters:
rating
- to set
-
sendChatComment
void sendChatComment(java.lang.String comment)
Sets a comment to the current chat session.- Parameters:
comment
- to set
-
emailTranscript
boolean emailTranscript(java.lang.String email)
Emails the current chat transcriptIt will send an email to the provided address with the current chat log
- Parameters:
email
- address to send the transcript to- Returns:
- true if email was sent, false otherwise
-
endChat
void endChat()
Ends the current chat. This will update the connection status to closed.
-
disconnect
void disconnect()
Disconnect the current chat, used when switching to push mode.
-
setDepartment
void setDepartment(java.lang.String department)
Sets a department to the current chat session.Configuring a department in the chat will deliver the chat to the right group of agents supporting that department's inquiries. This information will be visible in the agent dashboard.
Provided department should be one of the departments available in this account. The list of available departments will be available in
LivechatDepartmentsPath
after initialization is completeChatService#onChatInitialized()
. Setting a non defined department will have no effect.- Parameters:
department
- visitor is chatting with- See Also:
- Departments Dashboard
-
setPhoneNumber
void setPhoneNumber(java.lang.String phoneNumber)
Sets phone number information for the user that is in the current chat session.This information will be visible in the agent dashboard.
- Parameters:
phoneNumber
- of the visitor- See Also:
- Agent Dashboard
-
setName
void setName(java.lang.String name)
Sets the name for the user in the current chat session.This information will be visible in the agent dashboard.
- Parameters:
name
- of the visitor- See Also:
- Agent Dashboard
-
setEmail
void setEmail(java.lang.String email)
Sets the email for the user in the current chat session.This information will be visible in the agent dashboard.
- Parameters:
email
- of the visitor- See Also:
- Agent Dashboard
-
setNote
void setNote(java.lang.String note)
Sets a note to the visitor profile- Parameters:
note
- about the visitor
-
addNote
void addNote(java.lang.String note)
Appends a note to the current visitor note- Parameters:
note
- about the visitor to append
-
-