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 SLA Policies in FreshDesk
Overview
The following operations allow you to work with SLA policies. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with SLA policies, see Sample configuration.
Operation | Description |
---|---|
Lists SLA Policies. | |
updateSLAPolicy | Updates an SLA Policy. |
Operation details
This section provides further details on the operations related to SLA policies.
List SLA Policies
The listSLAPolicies operation retrieves a SLA policies from freshdesk.
<freshdesk.listSLAPolicies/>
Sample request
Following is a sample REST/JSON request that can be handled by the listSLAPolicies operation.
{ "apiUrl": "https://wso2yasho.freshdesk.com", "apiKey": "SODsQllHr0NicsiRpRWw", "apiVersion": "v2" }
Update the specific SLA policy
The updateSLAPolicy operation updates particular SLA policy.
<freshdesk.updateSLAPolicy> <applicableTo>{$ctx:applicableTo}</applicableTo> <policyId>{$ctx:policyId}</policyId> </freshdesk.updateSLAPolicy>
Properties
applicableTo: Key value pair containing the object and the array of object IDs denoting the conditions based on which the SLA policy is to be applied.
policyId: Unique ID of the SLA policy.
Sample request
Following is a sample REST/JSON request that can be handled by the updateSLAPolicy operation.
{ "apiUrl": "https://wso2yasho.freshdesk.com", "apiKey": "SODsQllHr0NicsiRpRWw", "apiVersion": "v2", "applicableTo": { "company_ids": [ 19000007803 ] }, "policyId": "19000008183" }
Sample configuration
Following is a sample proxy service that illustrates how to connect to FreshDesk with the init
operation and use the listSLAPolicies operation. The sample request for this proxy can be found in the listSLAPolicies sample request.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="freshdesk_listSLAPolicies" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="apiVersion" expression="json-eval($.apiVersion)"/> <freshdesk.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <apiVersion>{$ctx:apiVersion}</apiVersion> </freshdesk.init> <freshdesk.listSLAPolicies/> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>