This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Tickets in LiveChat
Overview
The following operations allow you to work with tickets. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with tickets, see Sample configuration.
Operation | Description |
|---|---|
Creates a new ticket. | |
Retrieves a single ticket item for the given ticket ID. | |
Retrieves all tickets. |
Operation details
This section provides further details on the operations related to tickets.
Creating a new ticket
The createTicket operation creates a new ticket.
createTicket
<livechat.createTicket>
<message>{$ctx:message}</message>
<sourceType>{$ctx:sourceType}</sourceType>
<subject>{$ctx:subject}</subject>
<assigneeId>{$ctx:assigneeId}</assigneeId>
<requesterEmail>{$ctx:requesterEmail}</requesterEmail>
<requesterName>{$ctx:requesterName}</requesterName>
<group>{$ctx:group}</group>
<sourceUrl>{$ctx:sourceUrl}</sourceUrl>
</livechat.createTicket>Properties
message:The requester's message.sourceType:The source of the ticket. Possible values: "chat-window", "mail", "lc2". Default: "lc2".subject:The ticket subject. Defaults to "(no subject)".assigneeId:The login ID of the agent that will be assigned to the ticket.requesterEmail:The requester's e-mail address.requesterName:The requester's name.group:The list of groups. Must be an array with group IDs. Defaults to [0].sourceUrl:The URL of the website from which the ticket was sent. Applies only if source[type] is "chat-window".
Sample request
Following is a sample REST/JSON request that can be handled by the createTicket operation.
Sample Request for createTicket
{
"apiUrl":"https://api.livechatinc.com",
"login":"anu.thushi@gmail.com",
"apiKey":"81df74bda524d8027f0717cffaf318b2",
"message":"Message",
"sourceType":"chat-window",
"subject":"Test Subject",
"assigneeId":"anu.thushi@gmail.com",
"requesterEmail":"mary.brown@email.com",
"requesterName":"Chamath",
"group":[0,2],
"sourceUrl":"www.krishantha.net"
}Related LiveChat documentation
http://developers.livechatinc.com/rest-api/#create-ticket
Retrieving a single ticket item
The getTicketyById operation retrieves a single ticket item for the given ticket ID.
getTicketyById
<livechat.getTicketById>
<ticketId>{$ctx:ticketId}</ticketId>
</livechat.getTicketById>Properties
ticketId:The ticket ID to retrieve a ticket item.
Sample request
Following is a sample REST/JSON request that can be handled by the getTicketById operation.
Sample Request for getTicketById
{
"apiUrl":"https://api.livechatinc.com",
"login":"anu.thushi@gmail.com",
"apiKey":"81df74bda524d8027f0717cffaf318b2",
"ticketId":"Q62JR"
}Related LiveChat documentation
http://developers.livechatinc.com/rest-api/#get-single-ticket
Retrieving all tickets
The listTickets operation retrieves all tickets.
listTickets
<livechat.listTickets>
<status>{$ctx:status}</status>
<dateTo>{$ctx:dateTo}</dateTo>
<query>{$ctx:query}</query>
<requesterMail>{$ctx:requesterMail}</requesterMail>
<tag>{$ctx:tag}</tag>
<assigned>{$ctx:assigned}</assigned>
<assignee>{$ctx:assignee}</assignee>
<order>{$ctx:order}</order>
<source>{$ctx:source}</source>
<page>{$ctx:page}</page>
<tagged>{$ctx:tagged}</tagged>
<dateFrom>{$ctx:dateFrom}</dateFrom>
<group>{$ctx:group}</group>
</livechat.listTickets>Properties
status:Not set by default. Possible values: "open", "pending", "solved", "spam".dateTo:Returns tickets with any of their activities matching the date. Defaults to "today".query:Returns tickets containing the query.requesterMail:Returns tickets assigned to the given requester.tag:Returns tickets for the specified tag.assigned:If 0, returns only unassigned tickets. If 1, returns only tickets assigned to any agent.assignee:Returns tickets assigned to given agent's login.order:Orders tickets by date of last ticket modification. Possible values: "desc", "asc". Default: "desc".source:Returns tickets for the given source. Possible values: "lc2" (created from archives), "mail", "facebook", "agent-app-manual" (created manually), "chat-window" (created from ticket form).page:The page number, defaults to 1.tagged:If 1 is passed, returns tickets having any tag. If 0 is passed, returns tickets without any tag.dateFrom:Returns tickets with any of their activities matching the date. Defaults to the beginning of time.group:Returns tickets for a given group.
Sample request
Following is a sample REST/JSON request that can be handled by the listTickets operation.
Sample Request for listTickets
{
"apiUrl":"https://api.livechatinc.com",
"login":"anu.thushi@gmail.com",
"apiKey":"81df74bda524d8027f0717cffaf318b2",
"dateTo":"2015-02-25",
"assignee":"anu.thushi@gmail.com",
"order":"asc",
"page":"1",
"tagged":"0",
"dateFrom":"2015-02-01",
"group":"0"
}Note
There are more optional parameters available. For more information on the usage of these parameters please check the API document.