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 Replies in SupportBee


Overview

The following operations allow you to work with replies. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with replies, see Sample configuration

OperationDescription

createReply

Creates a reply to the ticket.

getReplyRetrieves a specified reply of the ticket.
listRepliesRetrieves all replies of the ticket.

Operation details

This section provides further details on the operations related to replies.

Creating a reply to the ticket

The createReply operation creates a reply to the ticket.

createReply
<supportbee.createReply>
	<ticketId>{$ctx:ticketId}</ticketId>
    <html>{$ctx:html}</html>
    <text>{$ctx:text}</text>
	<attachmentIds>{$ctx:attachmentIds}</attachmentIds>
</supportbee.createReply>
Properties
  • ticketId: The ID of the ticket to which the reply would be added.
  • html: HTML content of the reply.
  • text: Text content of the reply.
  • attachmentIds: Attachments to be added to the reply.
   Sample request

Following is a sample REST/JSON request that can be handled by the createReply operation.

Sample Request for createReply
{
    "apiUrl": "https://globalitanywhere.supportbee.com",
    "authToken": "XsnedoEipoufygveyV6F",
    "ticketId": 5333133,
    "html": "<p>The ticket was resolved successfully.</p>",
    "text": "SurveyID - 123456",
    "attachmentIds": ["123456"]
}
Related SupportBee documentation

https://developers.supportbee.com/api#create_reply

Retrieving a specified reply of the ticket

The getReply operation retrieves a specified reply of the ticket.

getReply
<supportbee.getReply>
    <ticketId>{$ctx:ticketId}</ticketId>
	<replyId>{$ctx:replyId}</replyId>
</supportbee.getReply>
Properties
  • ticketId: The ID of the ticket whose reply to retrieve.
  • replyId: The ID of the reply to retrieve.
Sample request

Following is a sample REST/JSON request that can be handled by the getReply operation.

Sample Request for getReply
{
    "apiUrl": "https://globalitanywhere.supportbee.com",
    "authToken": "XsnedoEipoufygveyV6F",
    "ticketId": 5333133,
    "replyId": 2486685
}
Related SupportBee documentation

https://developers.supportbee.com/api#show_reply

Retrieves all replies of the ticket

The listReplies operation retrieves all replies of the ticket. 

listReplies
<supportbee.listReplies>
	<ticketId>{$ctx:ticketId}</ticketId>
</supportbee.listReplies>
Properties
  • ticketId: The ID of the ticket whose replies would be listed.
Sample request

Following is a sample REST/JSON request that can be handled by the listReplies operation.

Sample Request for listReplies
{
    "apiUrl": "https://globalitanywhere.supportbee.com",
    "authToken": "XsnedoEipoufygveyV6F",
    "ticketId": 5333133
}
Related SupportBee documentation

https://developers.supportbee.com/api#fetching_replies

Sample configuration

Following is a sample proxy service that illustrates how to connect to SupportBee with the init operation and use the createReply operation. The sample request for this proxy can be found in the createReply sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="supportbee_createReply" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="authToken" expression="json-eval($.authToken)"/>
         <property name="ticketId" expression="json-eval($.ticketId)"/>
         <property name="html" expression="json-eval($.html)"/>
         <property name="text" expression="json-eval($.text)"/>
         <property name="attachmentIds" expression="json-eval($.attachmentIds)"/>
         <supportbee.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <authToken>{$ctx:authToken}</authToken>
         </supportbee.init>
         <supportbee.createReply>
            <ticketId>{$ctx:ticketId}</ticketId>
            <html>{$ctx:html}</html>
            <text>{$ctx:text}</text>
            <attachmentIds>{$ctx:attachmentIds}</attachmentIds>
         </supportbee.createReply>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>