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 Contacts in Sirportly


Overview

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

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

OperationDescription

addContactMethod

Adds a contact method.

createContactCreates a new contact.
getContactRetrieves contact properties.
listContactsRetrieves all contacts.
searchContactsSearches contacts.

Operation details

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

Adding a contact method

The addContactMethod operation adds a contact method such as e-mail, phone, etc. 

addContactMethod
<sirportly.addContactMethod>
	<contact>{$ctx:contact}</contact>
   	<contactMethodType>{$ctx:contactMethodType}</contactMethodType>
    <contactData>{$ctx:contactData}</contactData>
	<isDefault>{$ctx:isDefault}</isDefault>
</sirportly.addContactMethod>
Properties
  • contact: Required - The ID, reference or name of a contact.
  • contactMethodType: The type of contact method.
  • contactData: The associated data of the contact method.
  • isDefault: If true, contact method will be the default to contact.
   Sample request

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

Sample Request for addContactMethod
{
	"apiUrl":"https://anusoft.sirportly.com",
	"apiToken":"007898a0-d9e7-3d5a-f6e2-c1a7d3853555",
	"apiSecret":"rrcxnqny86nrpxec0riiyufd4mylt45kr2l2bltsb435u5y68i",
	"contact" : "4062433",
	"contactMethodType" : "telephone",
	"contactData" : "+94782449770"
}

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/contacts/add-a-contact-method

Creating a new contact

The createContact operation creates a new contact.

createContact
<sirportly.createContact>
    <contactName>{$ctx:contactName}</contactName>
    <contactReference>{$ctx:contactReference}</contactReference>
    <company>{$ctx:company}</company>
    <pin>{$ctx:pin}</pin>
    <sla>{$ctx:sla}</sla>
	<priority>{$ctx:priority}</priority>
</sirportly.createContact>
Properties
  • contactName: The name of the contact person.
  • contactReference: The reference number of the contact. Must be unique or blank.
  • company: The company name of the contact.
  • pin: The pin of the contact. Leave blank for auto generated.
  • sla: The ID or name of an SLA.
  • priority: The ID or name of a priority.
   Sample request

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

Sample Request for createContact
{
	"apiUrl":"https://anusoft.sirportly.com",
	"apiToken":"007898a0-d9e7-3d5a-f6e2-c1a7d3853555",
	"apiSecret":"rrcxnqny86nrpxec0riiyufd4mylt45kr2l2bltsb435u5y68i",
	"contactName" : "from soapui4",
	"contactReference" : "e",
	"company" : "virasoft",
	"pin" : "135060",
	"priority" : "high"
}

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/contacts/create-a-new-contact

Retrieving contact properties

The getContact operation retrieves contact properties.

getContact
<sirportly.getContact>
	<contact>{$ctx:contact}</contact>
</sirportly.getContact>
Properties
  • contact: Required - The name, ID or reference of a contact.
   Sample request

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

Sample Request for getContact
{
	"apiUrl":"https://anusoft.sirportly.com",
	"apiToken":"007898a0-d9e7-3d5a-f6e2-c1a7d3853555",
	"apiSecret":"rrcxnqny86nrpxec0riiyufd4mylt45kr2l2bltsb435u5y68i",
	"contact" : "chamath 1"
}

Related Sirportly documentation

https://sirportly.com/docs/api-specification/contacts/get-contact-properties

Retrieving all contacts

The listContacts operation retrieves all contacts.

listContacts
<sirportly.listContacts>
	<page>{$ctx:page}</page>
</sirportly.listContacts>
Properties
  • page: The number of the page to retrieve. Optional and defaults to 1.
   Sample request

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

Sample Request for listContacts
{
	"apiUrl":"https://anusoft.sirportly.com",
	"apiToken":"007898a0-d9e7-3d5a-f6e2-c1a7d3853555",
	"apiSecret":"rrcxnqny86nrpxec0riiyufd4mylt45kr2l2bltsb435u5y68i"
}

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/contacts/listing-all-contacts

Searching contacts

The searchContacts operation searches for contacts based on their contact methods and customer name.

searchContacts
<sirportly.searchContacts>
    <query>{$ctx:query}</query>
    <limit>{$ctx:limit}</limit>
	<types>{$ctx:types}</types>
</sirportly.searchContacts>
Properties
  • query: Required - The query string to search tickets. Must be greater than 3 characters.
  • limit: The number of results to return. Defaults to 30, 30 is maximum.
  • types: A comma separated list of contact method types. Searches all by default.
   Sample request

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

Sample Request for searchContacts
{
	"apiUrl":"https://anusoft.sirportly.com",
	"apiToken":"007898a0-d9e7-3d5a-f6e2-c1a7d3853555",
	"apiSecret":"rrcxnqny86nrpxec0riiyufd4mylt45kr2l2bltsb435u5y68i",
	"query" : "chamath@gmail.com"
}

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/contacts/searching-contacts-2

Sample configuration

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

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="sirportly_addContactMethod"
       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="contact" expression="json-eval($.contact)"/>
         <property name="contactMethodType" expression="json-eval($.contactMethodType)"/>
         <property name="contactData" expression="json-eval($.contactData)"/>
         <property name="isDefault" expression="json-eval($.isDefault)"/>
         <sirportly.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
            <apiSecret>{$ctx:apiSecret}</apiSecret>
         </sirportly.init>
         <sirportly.addContactMethod>
            <contact>{$ctx:contact}</contact>
            <contactMethodType>{$ctx:contactMethodType}</contactMethodType>
            <contactData>{$ctx:contactData}</contactData>
            <isDefault>{$ctx:isDefault}</isDefault>
         </sirportly.addContactMethod>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>