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.
Operation | Description |
---|---|
Creates a new person or company as a contact. | |
getContact | Retrieves a contact (person or company) by ID. |
listContacts | Retrieves all contacts. |
updateContact | Updates 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.
<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
The contact type, can be either "company" or "person".contactType:
The Clio connect e-mail address if the contact is a Clio connect user.clioConnectEmail:
The collection of mailing addresses.addresses:
The collection of websites of the contact.webSites:
The collection of instant messenger addresses of the contact.instantMessengers:
The company's name (if the contact is a company).companyName:
The person's first name.firstName:
The person's last name.lastName:
The person's title.title:
The company the person belongs to.company:
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.customFieldValues:
A person's prefix (e.g. Mr, Mrs).prefix:
A collection of telephone numbers. The first telephone number listed is the default.phoneNumbers:
A collection of e-mail addresses of the contact.emailAddresses:
A collection of firm-wide and attorney specific rates.activityRates:
Sample request
Following is a sample REST/JSON request that can be handled by the createContact operation.
{ "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
operation retrieves a contact (person or company) by ID.getContact
<clio.getContact> <contactId>{$ctx:contactId}</contactId> </clio.getContact>
Properties
The ID of the contact whose details should be retrieved.contactId:
Sample request
Following is a sample REST/JSON request that can be handled by the
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
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
The wildcard search for contacts matching the query string. Fields searched are name, first_name, last_name, title, phone_numbers, email_addresses and addresses.query:
Either "company" or "person", returns only contacts of that type.type:
The wildcard search for the person's first_name matching the first_name string.firstName:
The wildcard search for the person's last_name matching the last_name string.lastName:
The wildcard search for the company's or person's full name matching string.name:
Returns employees that belong to the given company ID.companyId:
One of "All", "Open", "Closed", "Pending", "None", returns only contacts which are clients that have at least one matter.mattersStatus:
Returns records with an ID greater than the offset.offset:
The maximum number of records to be returned (int, default: 1000).limit:
Returns records created on or after the date (date, ISO 8601 format).createdSince:
Returns records updated on or after the date (date, ISO 8601 format).updatedSince:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.listAccounts
{ "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.
<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
The ID of the contact whose details should be retrieved.contactId:
The Clio connect e-mail address if the contact is a Clio connect user.clioConnectEmail:
The collection of mailing addresses.addresses:
The collection of websites of the contact.webSites:
The collection of instant messenger addresses of the contact.instantMessengers:
The company's name (if the contact is a company).companyName:
The person's first name.firstName:
The person's last name.lastName:
The person's title.title:
The company the person belongs to.company:
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.customFieldValues:
A person's prefix (e.g. Mr, Mrs).prefix:
A collection of telephone numbers. The first telephone number listed is the default.phoneNumbers:
A collection of e-mail addresses of the contact.emailAddresses:
A collection of firm-wide and attorney specific rates.activityRates:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.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.
<?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>