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 Clevertim CRM
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.
Operation details
This section provides further details on the operations related to tasks.
Creating a task
The createTask
operation adds a new task.
<clevertimcrm.createTask> <name>{$ctx:name}</name> <location>{$ctx:location}</location> <case>{$ctx:case}</case> <startDate>{$ctx:startDate}</startDate> <endDate>{$ctx:endDate}</endDate> <customer>{$ctx:customer}</customer> <assignedUserId>{$ctx:assignedUserId}</assignedUserId> <taskType>{$ctx:taskType}</taskType> <comments>{$ctx:comments}</comments> <opportunity>{$ctx:opportunity}</opportunity> </clevertimcrm.createTask>
Properties
name:
The name of the task.location:
The location where the task will be addressed.case:
The identifier of the case under which the task will be filed.startDate:
The start date of the task.endDate:
The end date of the task.customer:
The ID of the customer related to the task.assignedUserId:
The ID of the assigned user.taskType:
The type of task.comments:
Comments related to the task.opportunity:
The identifier of the opportunity under which the task will be filed.
Sample request
Following is a sample REST/JSON request that can be handled by the createTask
operation.
{ "apiUrl":"https://www.clevertim.com", "apiKey":"tPnLGkETTPFbxfu0oIJtchPDxzBWzXaTSOStS4B6aGHIszKFrCZ11557", "name":"test task of wso2Connector project", "location":"London", "case":"22020", "startDate":{"y": 2013, "mo": 12, "d": 29, "h": 4, "mi": 4}, "endDate":{"y": 2013, "mo": 12, "d": 31, "h": 7, "mi": 5}, "customer":"114517", "assignedUserId":"", "taskType":"Call", "opportunity":"11307" }
Related Clevertim CRM documentation
https://github.com/clevertim/clevertim-crm-api/blob/master/resources/task.md#add-a-new-task
Updating a task
The updateTask
operation updates a task.
<clevertimcrm.updateTask> <id>{$ctx:id}</id> <name>{$ctx:name}</name> <location>{$ctx:location}</location> <case>{$ctx:case}</case> <startDate>{$ctx:startDate}</startDate> <endDate>{$ctx:endDate}</endDate> <customer>{$ctx:customer}</customer> <assignedUserId>{$ctx:assignedUserId}</assignedUserId> <isDeleted>{$ctx:isDeleted}</isDeleted> <isCompleted>{$ctx:isCompleted}</isCompleted> <taskType>{$ctx:taskType}</taskType> <opportunity>{$ctx:opportunity}</opportunity> </clevertimcrm.updateTask>
Properties
The identifier of the task.id:
name:
The name of the task.location:
The location where the task will be addressed.case:
The identifier of the case under which the task will be filed.startDate:
The start date of the task.endDate:
The end date of the task.customer:
The ID of the customer related to the task.assignedUserId:
The ID of the assigned user.isDeleted:
Whether the task is deleted.isCompleted:
Whether the task is completed.taskType:
The type of task.opportunity:
The identifier of the opportunity under which the task will be filed.
Sample request
Following is a sample REST/JSON request that can be handled by the updateTask
operation.
{ "apiUrl":"https://www.clevertim.com", "apiKey":"7hRfxQ3mXxLrnAmiIYxSIsFTlGdCYNfnqjY4pXtaAhYEe04HP3Z11751", "id":"46385", "name":"created for update check339", "location":"Vales", "startDate":{"y": 2014, "mo": 12, "d": 29, "h": 4, "mi": 4}, "endDate":{"y": 2014, "mo": 12, "d": 31, "h": 7, "mi": 5}, "customer":"117010", "assignedUserId":"11752", "isDeleted":false, "isCompleted":true, "taskType":"Call", "opportunity":"11902", "case":"22609" }
Related Clevertim CRM documentation
https://github.com/clevertim/clevertim-crm-api/blob/master/resources/task.md#update-an-existing-task
Listing tasks
The listTasks
operation retrieves all tasks.
<clevertimcrm.listTasks/>
Sample request
Following is a sample REST/JSON request that can be handled by the listTasks
operation.
{ "apiUrl":"https://www.clevertim.com", "apiKey":"tPnLGkETTPFbxfu0oIJtchPDxzBWzXaTSOStS4B6aGHIszKFrCZ11557" }
Related Clevertim CRM documentation
https://github.com/clevertim/clevertim-crm-api/blob/master/resources/task.md#get-all-tasks
Sample configuration
Following is a sample proxy service that illustrates how to connect to Clevertim CRM with the init
operation and use the createTask
operation. The sample request for this proxy can be found in createTask 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 xmlns="http://ws.apache.org/ns/synapse" name="ClevertimCRM_createTask" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="name" expression="json-eval($.name)"/> <property name="location" expression="json-eval($.location)"/> <property name="case" expression="json-eval($.case)"/> <property name="startDate" expression="json-eval($.startDate)"/> <property name="endDate" expression="json-eval($.endDate)"/> <property name="customer" expression="json-eval($.customer)"/> <property name="assignedUserId" expression="json-eval($.assignedUserId)"/> <property name="taskType" expression="json-eval($.taskType)"/> <property name="comments" expression="json-eval($.comments)"/> <property name="opportunity" expression="json-eval($.opportunity)"/> <clevertimcrm.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </clevertimcrm.init> <clevertimcrm.createTask> <name>{$ctx:name}</name> <location>{$ctx:location}</location> <case>{$ctx:case}</case> <startDate>{$ctx:startDate}</startDate> <endDate>{$ctx:endDate}</endDate> <customer>{$ctx:customer}</customer> <assignedUserId>{$ctx:assignedUserId}</assignedUserId> <taskType>{$ctx:taskType}</taskType> <comments>{$ctx:comments}</comments> <opportunity>{$ctx:opportunity}</opportunity> </clevertimcrm.createTask> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>