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 Sirportly
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 |
---|---|
Adds content to a ticket. | |
createTicket | Creates a new ticket. |
getTicket | Retrieves ticket properties. |
listTickets | Retrieves all tickets. |
listTicketsByFilter | Retrieves tickets by filter. |
updateTicket | Updates ticket properties. |
searchTickets | Searches tickets. |
Operation details
This section provides further details on the operations related to tickets.
Adding content to a ticket
The
operation posts updates to a ticket. These updates can be either public or private, however the ticket must exist before you can post an update.addContentToTicket
<sirportly.addContentToTicket> <ticketReference>{$ctx:ticketReference}</ticketReference> <message>{$ctx:message}</message> <subject>{$ctx:subject}</subject> <isAuthenticated>{$ctx:isAuthenticated}</isAuthenticated> <postedAt>{$ctx:postedAt}</postedAt> <htmlBody>{$ctx:htmlBody}</htmlBody> <htmlSafe>{$ctx:htmlSafe}</htmlSafe> </sirportly.addContentToTicket>
Properties
Required - The reference of the ticket to be updated.ticketReference:
Required - The content of the ticket.message:
The subject of the ticket.subject:
Whether or not this update is authenticated.isAuthenticated:
The date/time the updated was posted.postedAt:
The HTML body to show as content.htmlBody:
If this HTML should be displayed within the staff interface to users, this value should be sent as '1'. If this is not sent, the HTML body will be escaped when displayed to the user.htmlSafe:
Sample request
Following is a sample REST/JSON request that can be handled by the addContentToTicket
operation.
{ "apiUrl":"https://anusoft.sirportly.com", "apiToken":"007898a0-d9e7-3d5a-f6e2-c1a7d3853555", "apiSecret":"rrcxnqny86nrpxec0riiyufd4mylt45kr2l2bltsb435u5y68i", "ticketReference" : "ZR-194119", "message" : "Test from SOAP" }
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/posting-an-update
Creating a new ticket
The
operation submits a new ticket into the support site.createTicket
</sirportly.init> <sirportly.createTicket> <subject>{$ctx:subject}</subject> <status>{$ctx:status}</status> <priority>{$ctx:priority}</priority> <sla>{$ctx:sla}</sla> <brand>{$ctx:brand}</brand> <department>{$ctx:department}</department> <team>{$ctx:team}</team> <assignedUser>{$ctx:assignedUser}</assignedUser> <submittedAt>{$ctx:submittedAt}</submittedAt> <customFields>{$ctx:customFields}</customFields> <contact>{$ctx:contact}</contact> <contactMethod>{$ctx:contactMethod}</contactMethod> <contactMethodType>{$ctx:contactMethodType}</contactMethodType> <contactMethodData>{$ctx:contactMethodData}</contactMethodData> <contactName>{$ctx:contactName}</contactName> <additionalContactMethods>{$ctx:additionalContactMethods}</additionalContactMethods> </sirportly.createTicket>
Properties
The subject for the ticket.subject:
The name or the ID of the status.status:
The name or ID of the ticket priority.priority:
The name or ID of the SLA.sla:
The name or ID of the brand.brand:
The name or ID of the department.department:
The name or ID of the team.team:
The username or ID of an assigned user.assignedUser:
The date/time the ticket was created.submittedAt:
The JSON object containing custom field values.customFields:
The ID of an existing contact.contact:
The ID of the existing contact method.contactMethod:
The type of contact method to use.contactMethodType:
The e-mail address or telephone number of the contact method.contactMethodData:
The name of the contact.contactName:
The comma additional contact methods list.additionalContactMethods:
Sample request
Following is a sample REST/JSON request that can be handled by the createTicket
operation.
{ "apiUrl" : "https://virasoft.sirportly.com", "apiToken" : "e6fd7f4b-02d1-a8bf-0407-c9038ed9ebe7", "apiSecret" : "rik5x53atxj550gqzylpgfy7lkbrbmsqgamse1ypiyih304crp", "subject" : "Test Subject", "status" : "New", "priority" : "Normal", "department" : "16630", "team" : "8833", "sla" : "NoValidate", "brand" : "7645", "assignedUser" : "12253", "submittedAt" : "2015-05-25", "customFields" : { "custom[telephone]" : "0112583695" }, "contact" : "4072366", "contactMethod" : "email", "contactMethodType" : "email", "contactMethodData" : "apptest.virajith@gmail.com", "contactName" : "App Vira", "additionalContactMethods" : "4072312" }
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/submitting-a-new-ticket
Retrieving ticket properties
The
operation retrieves ticket properties.getTicket
<sirportly.getTicket> <ticketReference>{$ctx:ticketReference}</ticketReference> <isRetrieveTimers>{$ctx:isRetrieveTimers}</isRetrieveTimers> <markAsRead>{$ctx:markAsRead}</markAsRead> </sirportly.getTicket>
Properties
The reference of the ticket to be fetched.ticketReference:
The flag to include ticket timers in the response.isRetrieveTimers:
The flag to mark all notifications regarding this ticket as read.markAsRead:
Sample request
Following is a sample REST/JSON request that can be handled by the getTicket
operation.
{ "apiUrl" : "https://virasoft.sirportly.com", "apiToken" : "e6fd7f4b-02d1-a8bf-0407-c9038ed9ebe7", "apiSecret" : "rik5x53atxj550gqzylpgfy7lkbrbmsqgamse1ypiyih304crp", "ticketReference" : "TA-930538", "isRetrieveTimers" : "1", "markAsRead" : "1" }
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/getting-all-ticket-properties
Retrieving all tickets
The
operation retrieves all tickets which are stored in the database.listTickets
<sirportly.listTickets> <page>{$ctx:page}</page> <sortBy>{$ctx:sortBy}</sortBy> <orderBy>{$ctx:orderBy}</orderBy> </sirportly.listTickets>
Properties
The page number to retrieve for pagination.page:
The name of the field to sort results.sortBy:
One of the asc or desc types for the sorting order.orderBy:
Sample request
Following is a sample REST/JSON request that can be handled by the listTickets
operation.
{ "apiUrl" : "https://virasoft.sirportly.com", "apiToken" : "e6fd7f4b-02d1-a8bf-0407-c9038ed9ebe7", "apiSecret" : "rik5x53atxj550gqzylpgfy7lkbrbmsqgamse1ypiyih304crp", "page" : "1", "sortBy" : "created_at", "orderBy" : "desc" }
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/listing-all-tickets
Retrieving tickets by filter
The
operation retrieves tickets which match a filter. listTicketsByFilter
<sirportly.listTicketsByFilter> <filter>{$ctx:filter}</filter> <user>{$ctx:user}</user> <page>{$ctx:page}</page> <sortBy>{$ctx:sortBy}</sortBy> <orderBy>{$ctx:orderBy}</orderBy> <conditions>{$ctx:conditions}</conditions> <isRawTicket>{$ctx:isRawTicket}</isRawTicket> </sirportly.listTicketsByFilter>
Properties
Required - The name or ID of the filter to be used.filter:
The username or ID of the user to be filtered.user:
The page number to return tickets for.page:
The name of the field to sort results.sortBy:
One of the asc or desc types for the sorting order.orderBy:
The additional conditions which will be added to the filter query.conditions:
The flag to retrieve full ticket information.isRawTicket:
Sample request
Following is a sample REST/JSON request that can be handled by the listTicketsByFilter
operation.
{ "apiUrl" : "https://virasoft.sirportly.com", "apiToken" : "e6fd7f4b-02d1-a8bf-0407-c9038ed9ebe7", "apiSecret" : "rik5x53atxj550gqzylpgfy7lkbrbmsqgamse1ypiyih304crp", "filter" : "All Tickets", "user" : "12253", "page" : "1", "sortBy" : "created_at", "orderBy" : "asc", "conditions" : "conditions[status]=New&conditions[priority]=High", "isRawTicket" : "1" }
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/listing-tickets-by-filter
Updating ticket properties
The
operation updates the properties associated with a ticket. updateTicket
<sirportly.updateTicket> <ticketReference>{$ctx:ticketReference}</ticketReference> <status>{$ctx:status}</status> <priority>{$ctx:priority}</priority> <departmentId>{$ctx:departmentId}</departmentId> <sla>{$ctx:sla}</sla> <team>{$ctx:team}</team> <assignedUser>{$ctx:assignedUser}</assignedUser> <subject>{$ctx:subject}</subject> <tagList>{$ctx:tagList}</tagList> <updatedAt>{$ctx:updatedAt}</updatedAt> <replyDueAt>{$ctx:replyDueAt}</replyDueAt> <resolutionDueAt>{$ctx:resolutionDueAt}</resolutionDueAt> <contactMethod>{$ctx:contactMethod}</contactMethod> <contactMethodData>{$ctx:contactMethodData}</contactMethodData> <contactName>{$ctx:contactName}</contactName> <additionalContactMethods>{$ctx:additionalContactMethods}</additionalContactMethods> <customFields>{$ctx:customFields}</customFields> </sirportly.updateTicket>
Properties
Required - The reference of the ticket to be updated.ticketReference:
The name or ID of the new status.status:
The name or ID of the new priority.priority:
The ID of the new department.departmentId:
The name or ID of the new SLA.sla:
The name or ID of the new team.team:
The username or ID of the user to be assigned.assignedUser:
The subject of the ticket.subject:
The space separated list of tags for the ticket.tagList:
The date/time the ticket was updated.updatedAt:
The date/time the ticket reply is due.replyDueAt:
The date/time the ticket resolution is due.resolutionDueAt:
The ID of the contact method to be assigned.contactMethod:
The e-mail address or telephone number of the contact method.contactMethodData:
The The name of the contact.contactName:
The comma separated additional contact methods list.additionalContactMethods:
The JSON object containing custom field values.customFields:
Sample request
Following is a sample REST/JSON request that can be handled by the updateTicket
operation.
{ "apiUrl" : "https://virasoft.sirportly.com", "apiToken" : "e6fd7f4b-02d1-a8bf-0407-c9038ed9ebe7", "apiSecret" : "rik5x53atxj550gqzylpgfy7lkbrbmsqgamse1ypiyih304crp", "ticketReference" : "HL-364011", "status" : "New", "priority" : "High", "departmentId" : "16630", "sla" : "NoValidate", "team" : "8833", "assignedUser" : "12253", "subject" : "New Subject", "tagList" : "IT Hardware", "updatedAt" : "2015-05-25", "replyDueAt" : "2015-05-38", "resolutionDueAt" : "2015-05-30", "customFields" : { "custom[Estimation]" : "3000", "custom[IsBillable]" : "False" }, "additionalContactMethods" : "4072366" }
Note
There are optional parameters available. For more information on the usage of these parameters please check the API document.
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/changing-ticket-properties
Searching tickets
The
operation searches for tickets using the full text support. searchTickets
<sirportly.searchTickets> <query>{$ctx:query}</query> <page>{$ctx:page}</page> </sirportly.searchTickets>
Properties
Required - The query string to search tickets.query:
The page number for paginated responses.page:
Sample request
Following is a sample REST/JSON request that can be handled by the searchTickets
operation.
{ "apiUrl" : "https://virasoft.sirportly.com", "apiToken" : "e6fd7f4b-02d1-a8bf-0407-c9038ed9ebe7", "apiSecret" : "rik5x53atxj550gqzylpgfy7lkbrbmsqgamse1ypiyih304crp", "query" : "Logging test", "page" : "1" }
Related Sirportly documentation
https://sirportly.com/docs/api-specification/tickets/searching-tickets
Sample configuration
Following is a sample proxy service that illustrates how to connect to Sirportly with the init
operation and use the addContentToTicket
operation. The sample request for this proxy can be found in the addContentToTicket sample request.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="sirportly_addContentToTicket" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiToken" expression="json-eval($.apiToken)"/> <property name="apiSecret" expression="json-eval($.apiSecret)"/> <property name="ticketReference" expression="json-eval($.ticketReference)"/> <property name="message" expression="json-eval($.message)"/> <property name="subject" expression="json-eval($.subject)"/> <property name="isAuthenticated" expression="json-eval($.isAuthenticated)"/> <property name="postedAt" expression="json-eval($.postedAt)"/> <property name="htmlBody" expression="json-eval($.htmlBody)"/> <property name="htmlSafe" expression="json-eval($.htmlSafe)"/> <sirportly.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiToken>{$ctx:apiToken}</apiToken> <apiSecret>{$ctx:apiSecret}</apiSecret> </sirportly.init> <sirportly.addContentToTicket> <ticketReference>{$ctx:ticketReference}</ticketReference> <message>{$ctx:message}</message> <subject>{$ctx:subject}</subject> <isAuthenticated>{$ctx:isAuthenticated}</isAuthenticated> <postedAt>{$ctx:postedAt}</postedAt> <htmlBody>{$ctx:htmlBody}</htmlBody> <htmlSafe>{$ctx:htmlSafe}</htmlSafe> </sirportly.addContentToTicket> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>