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.
Operation | Description |
---|---|
Adds a contact method. | |
createContact | Creates a new contact. |
getContact | Retrieves contact properties. |
listContacts | Retrieves all contacts. |
searchContacts | Searches contacts. |
Operation details
This section provides further details on the operations related to contacts.
Adding a contact method
The
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
Required - The ID, reference or name of a contact.contact:
The type of contact method.contactMethodType:
The associated data of the contact method.contactData:
If true, contact method will be the default to contact.isDefault:
Sample request
Following is a sample REST/JSON request that can be handled by the addContactMethod
operation.
{ "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
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
The name of the contact person.contactName:
The reference number of the contact. Must be unique or blank.contactReference:
The company name of the contact.company:
The pin of the contact. Leave blank for auto generated.pin:
The ID or name of an SLA.sla:
The ID or name of a priority.priority:
Sample request
Following is a sample REST/JSON request that can be handled by the createContact
operation.
{ "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
operation retrieves contact properties.getContact
<sirportly.getContact> <contact>{$ctx:contact}</contact> </sirportly.getContact>
Properties
Required - The name, ID or reference of a contact.contact:
Sample request
Following is a sample REST/JSON request that can be handled by the getContact
operation.
{ "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
operation retrieves all contacts.listContacts
<sirportly.listContacts> <page>{$ctx:page}</page> </sirportly.listContacts>
Properties
The number of the page to retrieve. Optional and defaults to 1.page:
Sample request
Following is a sample REST/JSON request that can be handled by the listContacts
operation.
{ "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
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
Required - The query string to search tickets. Must be greater than 3 characters.query:
The number of results to return. Defaults to 30, 30 is maximum.limit:
A comma separated list of contact method types. Searches all by default.types:
Sample request
Following is a sample REST/JSON request that can be handled by the searchContacts
operation.
{ "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.
<?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>