public interface ChatApiCommands
Defines the set of APIs available in a given chat session.
APIs will be linked to the account configured during initialization of ZopimChatApi.init(String)
Modifier and Type | Method and Description |
---|---|
void |
addNote(java.lang.String note)
Appends a note to the current visitor note
|
void |
disconnect()
Disconnect the current chat, used when switching to push mode.
|
boolean |
emailTranscript(java.lang.String email)
Emails the current chat transcript
|
void |
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 profile
|
void |
setPhoneNumber(java.lang.String phoneNumber)
Sets phone number information for the user that is in the current chat session.
|
void send(java.lang.String message)
This message will appear in the agent dashboard in an active chat queue.
message
- to be sentvoid send(@NonNull java.io.File file)
File must pass validation check and upload requirements defined in Zopim attachments page
A successful file upload will be visible in the agent dashboard.
file
- to sendChatLogObserver
,
Agent Dashboardvoid resend(java.lang.String messageId)
This message will appear in the agent dashboard.
messageId
- id of the message to resendboolean sendOfflineMessage(java.lang.String name, java.lang.String email, java.lang.String message)
Email must be provided in order for the agent to be able to respond.
name
- of the visitoremail
- of the visitormessage
- inquiryvoid sendChatRating(@NonNull ChatLog.Rating rating)
This will appear as a response to the chat rating questionnaire sent by an agent to the visitor.
rating
- to setvoid sendChatComment(@NonNull java.lang.String comment)
comment
- to setboolean emailTranscript(java.lang.String email)
It will send an email to the provided address with the current chat log
email
- address to send the transcript tovoid endChat()
void disconnect()
void setDepartment(java.lang.String department)
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 complete ChatService.onChatInitialized()
.
Setting a non defined department will have no effect.
department
- visitor is chatting withvoid setPhoneNumber(java.lang.String phoneNumber)
This information will be visible in the agent dashboard.
phoneNumber
- of the visitorvoid setName(java.lang.String name)
This information will be visible in the agent dashboard.
name
- of the visitorvoid setEmail(java.lang.String email)
This information will be visible in the agent dashboard.
email
- of the visitorvoid setNote(java.lang.String note)
note
- about the visitorvoid addNote(java.lang.String note)
note
- about the visitor to append