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/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »



Overview

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

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

OperationDescription

createCase

Creates a case.

updateCaseUpdates a case.
listCasesRetrieves all cases.

Operation details

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

Creating a case

The createCase operation adds a new case.

createCase
<clevertimcrm.createCase>
	<tags>{$ctx:tags}</tags> 
    <customFields>{$ctx:customFields}</customFields> 
    <description>{$ctx:description}</description> 
    <name>{$ctx:name}</name> 
    <leadUser>{$ctx:leadUser}</leadUser> 
    <customer>{$ctx:customer}</customer> 
</clevertimcrm.createCase> 
Properties
  • tags: The tags associated with the case.
  • customFields: The custom fields associated with the case.
  • description: The description of the case.
  • name: The name of the case.
  • leadUser: The lead user of the case.
  • customer: The customer belonging to the case.
Sample request

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

Sample Request for createCase
{ 
	"apiUrl":"https://www.clevertim.com", 
	"apiKey":"7hRfxQ3mXxLrnAmiIYxSIsFTlGdCYNfnqjY4pXtaAhYEe04HP3Z11751", 
	"name":"testSOAPCase7", 
	"description":"first description", 
	"tags": ["case", "support", "open"], 
	"customFields": {"460": "user1", "461": "user2"}, 
	"leadUser": 11752, 
	"customer": 117010 
} 
Related Clevertim CRM documentation

https://github.com/clevertim/clevertim-crm-api/blob/master/resources/case.md#add-a-new-case

Updating a case

The updateCase operation updates the specified case.

updateCases
<clevertimcrm.updateCase> 
	<tags>{$ctx:tags}</tags> 
    <id>{$ctx:id}</id> 
    <customFields>{$ctx:customFields}</customFields> 
    <description>{$ctx:description}</description> 
    <name>{$ctx:name}</name> 
    <leadUser>{$ctx:leadUser}</leadUser> 
    <customer>{$ctx:customer}</customer> 
</clevertimcrm.updateCase> 
Properties
  • tags: The tags associated with the case.
  • id: The ID of the case.
  • customFields: The custom fields associated with the case.
  • description: The description of the case.
  • name: The name of the case.
  • leadUser: The lead user of the case.
  • customer: The customer who belongs to the case.
Sample request

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

updateCase
{ 
	"apiUrl":"https://www.clevertim.com", 
	"apiKey":"tPnLGkETTPFbxfu0oIJtchPDxzBWzXaTSOStS4B6aGHIszKFrCZ11557", 
	"id":"22019", 
	"description":"Second description" 
} 
Related Clevertim CRM documentation

https://github.com/clevertim/clevertim-crm-api/blob/master/resources/case.md#update-an-existing-case

Listing cases

The listCases operation retrieves all cases.

listCases
<clevertimcrm.listCases/> 
Sample request

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

listCases
{ 
	"apiUrl":"https://www.clevertim.com", 
	"apiKey":"tPnLGkETTPFbxfu0oIJtchPDxzBWzXaTSOStS4B6aGHIszKFrCZ11557" 
} 
Related Clevertim CRM documentation

https://github.com/clevertim/clevertim-crm-api/blob/master/resources/case.md#get-all-cases

Sample configuration

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

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse" name="ClevertimCRM_createCase" 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="description" expression="json-eval($.description)"/> 
      <property name="tags" expression="json-eval($.tags)"/> 
      <property name="leadUser" expression="json-eval($.leadUser)"/> 
      <property name="customFields" expression="json-eval($.customFields)"/> 
      <property name="customer" expression="json-eval($.customer)"/> 
      <clevertimcrm.init> 
      	<apiUrl>{$ctx:apiUrl}</apiUrl> 
        <apiKey>{$ctx:apiKey}</apiKey> 
      </clevertimcrm.init> 
      <clevertimcrm.createCase> 
        <tags>{$ctx:tags}</tags> 
        <customFields>{$ctx:customFields}</customFields> 
        <description>{$ctx:description}</description> 
        <name>{$ctx:name}</name> 
        <leadUser>{$ctx:leadUser}</leadUser> 
        <customer>{$ctx:customer}</customer> 
      </clevertimcrm.createCase> 
      <respond/> 
      </inSequence> 
      <outSequence> 
        <send/> 
      </outSequence> 
  </target> 
</proxy>
  • No labels