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 Clio



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

createContact

Creates a new person or company as a contact.

getContactRetrieves a contact (person or company) by ID.
listContactsRetrieves all contacts.
updateContactUpdates an existing contact.

Operation details

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

Creating a new contact

The createContact operation creates a new person or company as a contact.

createContact
<clio.createContact>
	<contactType>{$ctx:contactType}</contactType>
    <clioConnectEmail>{$ctx:clioConnectEmail}</clioConnectEmail>
    <addresses>{$ctx:addresses}</addresses>
    <webSites>{$ctx:webSites}</webSites>
    <instantMessengers>{$ctx:instantMessengers}</instantMessengers>
    <companyName>{$ctx:companyName}</companyName>
    <firstName>{$ctx:firstName}</firstName>
    <lastName>{$ctx:lastName}</lastName>
    <title>{$ctx:title}</title>
    <company>{$ctx:company}</company>
    <customFieldValues>{$ctx:customFieldValues}</customFieldValues>
    <prefix>{$ctx:prefix}</prefix>
    <phoneNumbers>{$ctx:phoneNumbers}</phoneNumbers>
    <emailAddresses>{$ctx:emailAddresses}</emailAddresses>
    <activityRates>{$ctx:activityRates}</activityRates>
</clio.createContact>
Properties
  • contactType: The contact type, can be either "company" or "person".
  • clioConnectEmail: The Clio connect e-mail address if the contact is a Clio connect user.
  • addresses: The collection of mailing addresses.
  • webSites: The collection of websites of the contact.
  • instantMessengers: The collection of instant messenger addresses of the contact.
  • companyName: The company's name (if the contact is a company).
  • firstName: The person's first name.
  • lastName: The person's last name.
  • title: The person's title.
  • company: The company the person belongs to.
  • customFieldValues: A polymorphic collection of custom field values set on this contact. You can get a list of custom fields from the custom fields and custom field sets end points.
  • prefix: A person's prefix (e.g. Mr, Mrs).
  • phoneNumbers: A collection of telephone numbers. The first telephone number listed is the default.
  • emailAddresses: A collection of e-mail addresses of the contact.
  • activityRates: A collection of firm-wide and attorney specific rates.
Sample request

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

Sample Request for createContact
{
    "lastName": "Perera",
    "addresses": [
        {
            "name": "Billing",
            "street": "4148 Kuhlman Islands",
            "city": "Hirthemouth",
            "postal_code": "75745-8618",
            "province": "Ohio",
            "country": "United States"
        }
    ],
    "emailAddresses": [
        {
            "name": "Work",
            "address": "binsandsons@kofeest.net",
            "default_email": "binsandsons@kofeest.net"
        }
    ],
    "instantMessengers": [
        {
            "name": "Work",
            "address": "wso2@gmail.com"
        }
    ],
    "phoneNumbers": [
        {
            "name": "Work",
            "number": "872-913-0768"
        }
    ],
    "webSites": [
        {
            "name": "Work",
            "address": "kofeest.net"
        }
    ],
	"activityRates": "",
    "customFieldValues": "",
    "accessToken": "dcLXVwl8BeAUL697Dltw1PJOCYQM7Scm2BXSFuOO",
    "companyName": "Navantis",
    "title": "Senior Consultant",
    "prefix": "Mr",
    "company": "",
    "apiUrl": "https://app.goclio.com",
    "contactType": "Person",
    "firstName": "Suresh",
    "clioConnectEmail": "wso2.connector.virtusa@gmail.com"
}
Related Clio documentation

http://api-docs.clio.com/v2/index.html#create-a-contact

Retrieving a contact by ID

The getContact operation retrieves a contact (person or company) by ID.

getContact
<clio.getContact>
	<contactId>{$ctx:contactId}</contactId>
</clio.getContact>
Properties
  • contactId: The ID of the contact whose details should be retrieved.
Sample request

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

getContact
{
    "contactId": "887956542",
    "accessToken": "",
    "apiUrl": "https://app.goclio.com"
}
Related Clio documentation

http://api-docs.clio.com/v2/index.html#get-a-contact

Retrieving all contacts

The listContacts operation retrieves all the accounts.

listContacts
<clio.listContacts>
    <query>{$ctx:query}</query>
    <type>{$ctx:type}</type>
    <firstName>{$ctx:firstName}</firstName>
    <lastName>{$ctx:lastName}</lastName>
    <name>{$ctx:name}</name>
    <companyId>{$ctx:companyId}</companyId>
    <mattersStatus>{$ctx:mattersStatus}</mattersStatus>
    <offset>{$ctx:offset}</offset>
    <limit>{$ctx:limit}</limit>
    <createdSince>{$ctx:createdSince}</createdSince>
	<updatedSince>{$ctx:updatedSince}</updatedSince>
</clio.listContacts>
Properties
  • query: The wildcard search for contacts matching the query string. Fields searched are name, first_name, last_name, title, phone_numbers, email_addresses and addresses.
  • type: Either "company" or "person", returns only contacts of that type.
  • firstName: The wildcard search for the person's first_name matching the first_name string.
  • lastName: The wildcard search for the person's last_name matching the last_name string.
  • name: The wildcard search for the company's or person's full name matching string.
  • companyId: Returns employees that belong to the given company ID.
  • mattersStatus: One of "All", "Open", "Closed", "Pending", "None", returns only contacts which are clients that have at least one matter.
  • offset: Returns records with an ID greater than the offset.
  • limit: The maximum number of records to be returned (int, default: 1000).
  • createdSince: Returns records created on or after the date (date, ISO 8601 format).
  • updatedSince: Returns records updated on or after the date (date, ISO 8601 format).
Sample request

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

listContacts
{
    "createdSince": "",
    "limit": "",
    "lastName": "",
    "accessToken": "dcLXVwl8BeAUL697Dltw1PJOCYQM7Scm2BXSFuOO",
    "mattersStatus": "Open",
    "query": "",
    "type": "Person",
    "name": "Perera",
    "apiUrl": "https://app.goclio.com",
    "companyId": "",
    "updatedSince": "",
    "firstName": "",
    "offset": ""
}
Related Clio documentation

http://api-docs.clio.com/v2/index.html#get-all-contacts

Updating an existing contact

The updateContact operation updates an existing contact.

updateContact
<clio.updateContact>
	<contactId>{$ctx:contactId}</contactId>
    <clioConnectEmail>{$ctx:clioConnectEmail}</clioConnectEmail>
    <addresses>{$ctx:addresses}</addresses>
    <webSites>{$ctx:webSites}</webSites>
    <instantMessengers>{$ctx:instantMessengers}</instantMessengers>
    <companyName>{$ctx:companyName}</companyName>
    <firstName>{$ctx:firstName}</firstName>
    <lastName>{$ctx:lastName}</lastName>
    <title>{$ctx:title}</title>
    <company>{$ctx:company}</company>
    <customFieldValues>{$ctx:customFieldValues}</customFieldValues>
    <prefix>{$ctx:prefix}</prefix>
    <phoneNumbers>{$ctx:phoneNumbers}</phoneNumbers>
    <emailAddresses>{$ctx:emailAddresses}</emailAddresses>
	<activity_rates>{$ctx:activity_rates}</activity_rates>
</clio.updateContact>
Properties
  • contactId: The ID of the contact whose details should be retrieved.
  • clioConnectEmail: The Clio connect e-mail address if the contact is a Clio connect user.
  • addresses: The collection of mailing addresses.
  • webSites: The collection of websites of the contact.
  • instantMessengers: The collection of instant messenger addresses of the contact.
  • companyName: The company's name (if the contact is a company).
  • firstName: The person's first name.
  • lastName: The person's last name.
  • title: The person's title.
  • company: The company the person belongs to.
  • customFieldValues: A polymorphic collection of custom field values set on this contact. You can get a list of custom fields from the custom fields and custom field sets end points.
  • prefix: A person's prefix (e.g. Mr, Mrs).
  • phoneNumbers: A collection of telephone numbers. The first telephone number listed is the default.
  • emailAddresses: A collection of e-mail addresses of the contact.
  • activityRates: A collection of firm-wide and attorney specific rates.
Sample request

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

Sample Request for updateContact
{
    "activityRates": "",
    "lastName": "Fernando",
    "webSites": [
        {
            "name": "Work",
            "address": "kofeest.com"
        }
    ],
    "accessToken": "dcLXVwl8BeAUL697Dltw1PJOCYQM7Scm2BXSFuOO",
    "customFieldValues": "",
    "instantMessengers": [
        {
            "name": "Work",
            "address": "wso2.connector@gmail.com"
     }],
    "phoneNumbers": [
        {
            "name": "Home",
            "number": "872-913-0768"
    }],
    "companyName": "",
    "title": "Senior Manager",
    "contactId": "888148285",
    "prefix": "Dr",
    "company": "",
    "apiUrl": "https://app.goclio.com",
    "addresses": [
        {
            "name": "Billing",
            "street": "4148 Kuhlman Islands",
            "city": "Hirthemouth",
            "postal_code": "75745-8618",
            "province": "Kansas",
            "country": "United States"
        }
    ],
    "firstName": "",
    "clioConnectEmail": "wso2.connector.virtusa@gmail.com",
    "emailAddresses": [
        {
            "name": "Work",
            "address": "binsandsons@kofeest.net",
            "default_email": "binsandsons@kofeest.net"
        }
    ]
}
Related Clio documentation

http://api-docs.clio.com/v2/index.html#update-a-contact

Sample configuration

Following is a sample proxy service that illustrates how to connect to Clio with the init operation and use the createContact operation. The sample request for this proxy can be found in the createContact sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="clio_createContact" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="accessToken" expression="json-eval($.accessToken)"/>
         <property name="contactType" expression="json-eval($.contactType)"/>
         <property name="clioConnectEmail" expression="json-eval($.clioConnectEmail)"/>
         <property name="addresses" expression="json-eval($.addresses)"/>
         <property name="webSites" expression="json-eval($.webSites)"/>
         <property name="instantMessengers" expression="json-eval($.instantMessengers)"/>
         <property name="companyName" expression="json-eval($.companyName)"/>
         <property name="firstName" expression="json-eval($.firstName)"/>
         <property name="lastName" expression="json-eval($.lastName)"/>
         <property name="title" expression="json-eval($.title)"/>
         <property name="company" expression="json-eval($.company)"/>
         <property name="customFieldValues" expression="json-eval($.customFieldValues)"/>
         <property name="prefix" expression="json-eval($.prefix)"/>
         <property name="phoneNumbers" expression="json-eval($.phoneNumbers)"/>
         <property name="emailAddresses" expression="json-eval($.emailAddresses)"/>
         <property name="activityRates" expression="json-eval($.activityRates)"/>
         <clio.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </clio.init>
         <clio.createContact>
            <contactType>{$ctx:contactType}</contactType>
            <clioConnectEmail>{$ctx:clioConnectEmail}</clioConnectEmail>
            <addresses>{$ctx:addresses}</addresses>
            <webSites>{$ctx:webSites}</webSites>
            <instantMessengers>{$ctx:instantMessengers}</instantMessengers>
            <companyName>{$ctx:companyName}</companyName>
            <firstName>{$ctx:firstName}</firstName>
            <lastName>{$ctx:lastName}</lastName>
            <title>{$ctx:title}</title>
            <company>{$ctx:company}</company>
            <customFieldValues>{$ctx:customFieldValues}</customFieldValues>
            <prefix>{$ctx:prefix}</prefix>
            <phoneNumbers>{$ctx:phoneNumbers}</phoneNumbers>
            <emailAddresses>{$ctx:emailAddresses}</emailAddresses>
            <activityRates>{$ctx:activityRates}</activityRates>
         </clio.createContact>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>