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 Tasks in Clio



Overview

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

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

OperationDescription

createTask

Creates a new task for a contact or matter.

getTaskRetrieves a task by ID.
listTasksRetrieves all tasks.
updateTaskUpdates an existing task.

Operation details

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

Creating a new task

The createTask operation creates a new task for a contact or matter.

createTask
<clio.createTask>
    <name>{$ctx:name}</name>
    <description>{$ctx:description}</description>
    <priority>{$ctx:priority}</priority>
    <assignee>{$ctx:assignee}</assignee>
    <assigner>{$ctx:assigner}</assigner>
    <matter>{$ctx:matter}</matter>
    <dueAt>{$ctx:dueAt}</dueAt>
    <complete>{$ctx:complete}</complete>
    <completedAt>{$ctx:completedAt}</completedAt>
    <isPrivate>{$ctx:isPrivate}</isPrivate>
    <isStatuteOfLimitations>{$ctx:isStatuteOfLimitations}</isStatuteOfLimitations>
    <reminders>{$ctx:reminders}</reminders>
    <activities>{$ctx:activities}</activities>
    <cascadingSource>{$ctx:cascadingSource}</cascadingSource>
    <cascadingOffset>{$ctx:cascadingOffset}</cascadingOffset>
    <cascadingOffsetType>{$ctx:cascadingOffsetType}</cascadingOffsetType>
	<optionalFields>{$ctx:optionalFields}</optionalFields>
</clio.createTask>
Properties
  • name: The name of the task.
  • description: The description of the task.
  • priority: The priority of the task, one of "High", "Normal" or "Low'" If not supplied, defaults to "Normal".
  • assignee: The user to whom this task is assigned. When setting, the assignee defaults to current_user or the previous assignee on create and update, respectively. Passing nil as the assignee will remove the assignee.
  • assigner: The user by whom this task was assigned.
  • matter: The matter this task relates to.
  • dueAt: The date on which the task is due.
  • complete: Indicates whether the task is complete.
  • completedAt: The date on which the task was completed.
  • isPrivate: Indicates whether the task is private.
  • isStatuteOfLimitations: In Clio, a statute of limitations being satisfied is represented by the task object. If the statute of limitations has been satisfied, the "complete" field will be "true". It is important to note there can only be one statute of limitations for each matter.
  • reminders: The collection of reminders for a task.
  • activities: The collection of activities associated with the task. They will be of type TimeEntry.
  • cascadingSource: A task whose due date will be used to calculate the current task's due date.
  • cascadingOffset: The difference in the number of days between this task and the cascading source's due date.
  • cascadingOffsetType: The type of offset used in cascading date calculation, can be one of "CalendarDays", "BusinessDays", "CalendarWeeks", "CalendarMonths", and CalendarYears".
  • optionalFields: Create associated objects. Currently supported: “activities”. Activities must be of type TimeEntry.
Sample request

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

Sample Request for createTask
{
    "cascadingOffset": "5",
    "reminders": [ {
            "minutes": 30,
            "method": "Popup"
         }],
    "accessToken": "dcLXVwl8BeAUL697Dltw1PJOCYQM7Scm2BXSFuOO",
    "matter": "",
    "isStatuteOfLimitations": "false",
    "assignee": "",
    "completedAt": "2015-02-20",
    "cascadingSource": "",
    "dueAt": "2015-03-20",
    "isPrivate": "false",
    "complete": "false",
    "priority": "Normal",
    "description": "Call and inform Sahan about the meeting with the lawyer from colombo.",
    "name": "Call and inform Sahan about the meeting",
    "apiUrl": "https://app.goclio.com",
    "optionalFields": "activities",
    "activities": [
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Note down to take the number."
      }
    ],
    "assigner": "",
    "cascadingOffsetType": "CalendarDays"    
}
Related Clio documentation

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

Retrieving a task by ID

The getTask operation retrieves a task by ID.

getTask
<clio.getTask>
	<taskId>{$ctx:taskId}</taskId>
    <optionalFields>{$ctx:optionalFields}</optionalFields>
</clio.getTask>
Properties
  • taskId: The ID of the task whose details should be retrieved.
  • optionalFields: Includes data for associated objects. Currently supported: "time_entries".
Sample request

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

getTask
{
    "taskId": "",
    "accessToken": "",
    "apiUrl": "https://app.goclio.com",
    "optionalFields": ""
}
Related Clio documentation

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

Retrieving all tasks

The listTasks operation retrieves all tasks.

listTasks
<clio.listTasks>
    <query>{$ctx:query}</query>
    <priority>{$ctx:priority}</priority>
    <matterId>{$ctx:matterId}</matterId>
    <isStatuteOfLimitations>{$ctx:isStatuteOfLimitations}</isStatuteOfLimitations>
    <assigneeId>{$ctx:assigneeId}</assigneeId>
    <assigneeType>{$ctx:assigneeType}</assigneeType>
    <assignerId>{$ctx:assignerId}</assignerId>
    <dateRange>{$ctx:dateRange}</dateRange>
    <completed>{$ctx:completed}</completed>
    <taskPermission>{$ctx:taskPermission}</taskPermission>
    <optionalFields>{$ctx:optionalFields}</optionalFields>
    <updatedSince>{$ctx:updatedSince}</updatedSince>
    <createdSince>{$ctx:createdSince}</createdSince>
    <limit>{$ctx:limit}</limit>
	<offset>{$ctx:offset}</offset>
</clio.listTasks>
Properties
  • query: How to query tasks: "All" (default), "AssignedToMe", "AssignedByMe" or "Matters".
  • priority: The priority of tasks to show: "High", "Normal", or "Low".
  • matterId: Limits the tasks to only those belonging to this matter.
  • isStatuteOfLimitations: If "true", this parameter filters the tasks which represent if a statute of limitations has been satisfied. If "false", this parameter filters the tasks which do NOT represent if a statute of limitations has been satisfied.
  • assigneeId: Scopes the tasks to those assigned to the given user; use "not-me" to return tasks that are not assigned to the current user.
  • assigneeType: Scopes the tasks to those of the specified type. Must be one of "User" or "Contact". If assignee_id is provided, but assignee_type is not, "User" will be assumed for assignee_type.
  • assignerId: Scopes the tasks to those assigned by the given user; use 'not-me' to return tasks that do not belong to the current user.
  • dateRange: The date range of tasks to show: "all" (default), "due_this_week", "due_today", "due_tomorrow", and "overdue".
  • completed: Scopes the tasks to those that are complete ("true") or incomplete ("false").
  • taskPermission: Scopes the tasks to those that are private only ("private"), or public only ("public"). Returns all tasks by default.
  • optionalFields: Includes data for associated objects. Currently supported: "time_entries".
  • updatedSince: Returns records updated on or after the date (date, ISO 8601 format).
  • createdSince: Returns records created on or after the date (date, ISO 8601 format).
  • limit: The maximum number of records to be returned (int, default: 1000).
  • offset: Returns records with an ID greater than the offset.
Sample request

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

listTasks
{
    "createdSince": "2015-01-10",
    "limit": "5",
    "dateRange": "",
    "accessToken": "dcLXVwl8BeAUL697Dltw1PJOCYQM7Scm2BXSFuOO",
    "query": "",
    "isStatuteOfLimitations": "false",
    "taskPermission": "public",
    "optionalFields": "time_entries",
    "matterId": "",
    "assignerId": "344393568",
    "priority": "Normal",
    "assigneeId": "344393568",
    "assigneeType": "User",
    "apiUrl": "https://app.goclio.com",
    "updatedSince": "2015-01-10",
    "offset": "10",
    "completed": "false"
}
Related Clio documentation

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

Updating an existing task

The updateTask operation updates an existing task.

updateTask
<clio.updateTask>
    <taskId>{$ctx:taskId}</taskId>
    <cascadingOffsetType>{$ctx:cascadingOffsetType}</cascadingOffsetType>
    <cascadingOffset>{$ctx:cascadingOffset}</cascadingOffset>
    <cascadingSource>{$ctx:cascadingSource}</cascadingSource>
    <activities>{$ctx:activities}</activities>
    <reminders>{$ctx:reminders}</reminders>
    <isStatuteOfLimitations>{$ctx:isStatuteOfLimitations}</isStatuteOfLimitations>
    <isPrivate>{$ctx:isPrivate}</isPrivate>
    <complete>{$ctx:complete}</complete>
    <completedAt>{$ctx:completedAt}</completedAt>
    <dueAt>{$ctx:dueAt}</dueAt>
    <matter>{$ctx:matter}</matter>
    <assignee>{$ctx:assignee}</assignee>
    <description>{$ctx:description}</description>
    <name>{$ctx:name}</name>
    <priority>{$ctx:priority}</priority>
	<optionalFields>{$ctx:optionalFields}</optionalFields>
/clio.updateTask>
Properties
  • taskId: The ID of the task to be updated.
  • cascadingOffsetType: The type of offset used in cascading date calculation, can be one of "CalendarDays", "BusinessDays", "CalendarWeeks", "CalendarMonths", and "CalendarYears".
  • cascadingOffset: The number of days difference between this task and the cascading source's due date.
  • cascadingSource: A task whose due date will be used to calculate the current task's due date.
  • activities: The collection of activities associated with the task. They will be of type TimeEntry.
  • reminders: The collection of reminders for a task.
  • isStatuteOfLimitations: In Clio, a statute of limitations being satisfied is represented by the task object. If the statute has been satisfied, the "complete" field will be "true". It is important to note there can only be one statute of limitations for each matter.
  • isPrivate: Indicates whether the task is private.
  • complete: Indicates whether the task is complete.
  • completedAt: The date on which the task was completed.
  • dueAt: The date on which the task is due.
  • matter: The matter this task relates to.
  • assignee: The user to whom this task is assigned. When setting, the assignee defaults to current_user or the previous assignee on create and update, respectively. Passing nil as the assignee will remove the assignee.
  • description: The description of the task.
  • name: The name of the task.
  • priority: The priority of the task, one of "High", "Normal" or "Low". If not supplied, defaults to "Normal".
  • optionalFields: Updates (or creates) associated objects. Currently supported: “activities”. Activities must be of type TimeEntry.
Sample request

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

Sample Request for updateTask
{
    "taskId": "12048935",
    "cascadingOffset": "4",
    "reminders":[ {
            "minutes": 45,
            "method": "Popup"
         }],
    "accessToken": "dcLXVwl8BeAUL697Dltw1PJOCYQM7Scm2BXSFuOO",
    "matter": "",
    "isStatuteOfLimitations": "true",
    "assignee": "",
    "cascadingSource": "",
    "dueAt": "2015-03-22",
    "complete": "true",
    "completedAt": "2015-02-28",
    "isPrivate": "true",
    "priority": "High",
    "description": "Call and inform Sandun about the meeting with the lawyer from colombo.",
    "name": "Call and inform Sandun about the meeting",
    "apiUrl": "https://app.goclio.com",
    "optionalFields": "activities",
    "activities": [
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Note down to take the number."
      },
	  {
        "type": "TimeEntry",
        "quantity": 3,
        "note": "Note down to take the number of both."
      }
    ],
    "cascadingOffsetType": "CalendarDays"
}
Related Clio documentation

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

Sample configuration

Following is a sample proxy service that illustrates how to connect to Clio with the init operation and use the createTask operation. The sample request for this proxy can be found in the createTask 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 xmlns="http://ws.apache.org/ns/synapse"
       name="clio_createTask"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="accessToken" expression="json-eval($.accessToken)"/>
         <property name="name" expression="json-eval($.name)"/>
         <property name="description" expression="json-eval($.description)"/>
         <property name="priority" expression="json-eval($.priority)"/>
         <property name="assignee" expression="json-eval($.assignee)"/>
         <property name="assigner" expression="json-eval($.assigner)"/>
         <property name="matter" expression="json-eval($.matter)"/>
         <property name="dueAt" expression="json-eval($.dueAt)"/>
         <property name="complete" expression="json-eval($.complete)"/>
         <property name="completedAt" expression="json-eval($.completedAt)"/>
         <property name="isPrivate" expression="json-eval($.isPrivate)"/>
         <property name="isStatuteOfLimitations"
                   expression="json-eval($.isStatuteOfLimitations)"/>
         <property name="reminders" expression="json-eval($.reminders)"/>
         <property name="activities" expression="json-eval($.activities)"/>
         <property name="cascadingSource" expression="json-eval($.cascadingSource)"/>
         <property name="cascadingOffset" expression="json-eval($.cascadingOffset)"/>
         <property name="cascadingOffsetType"
                   expression="json-eval($.cascadingOffsetType)"/>
         <property name="optionalFields" expression="json-eval($.optionalFields)"/>
         <clio.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </clio.init>
         <clio.createTask>
            <name>{$ctx:name}</name>
            <description>{$ctx:description}</description>
            <priority>{$ctx:priority}</priority>
            <assignee>{$ctx:assignee}</assignee>
            <assigner>{$ctx:assigner}</assigner>
            <matter>{$ctx:matter}</matter>
            <dueAt>{$ctx:dueAt}</dueAt>
            <complete>{$ctx:complete}</complete>
            <completedAt>{$ctx:completedAt}</completedAt>
            <isPrivate>{$ctx:isPrivate}</isPrivate>
            <isStatuteOfLimitations>{$ctx:isStatuteOfLimitations}</isStatuteOfLimitations>
            <reminders>{$ctx:reminders}</reminders>
            <activities>{$ctx:activities}</activities>
            <cascadingSource>{$ctx:cascadingSource}</cascadingSource>
            <cascadingOffset>{$ctx:cascadingOffset}</cascadingOffset>
            <cascadingOffsetType>{$ctx:cascadingOffsetType}</cascadingOffsetType>
            <optionalFields>{$ctx:optionalFields}</optionalFields>
         </clio.createTask>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>