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 Business Hour in FreshDesk
Overview
The following operations allow you to work with business hour. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with business hour, see Sample configuration.
Operation | Description |
---|---|
Retrieves a business hour. | |
listBusinessHours | Retrieves the list of business hours. |
Operation details
This section provides further details on the operations related to business hour.
Get Business Hour
The getBusinessHour operation retrieves a business hour from freshdesk.
<freshdesk.getBusinessHour> <businessHourId>{$ctx:businessHourId}</businessHourId> </freshdesk.getBusinessHour>
Properties
businessHourId: The unique identifier of the BusinessHour.
Sample request
Following is a sample REST/JSON request that can be handled by the getBusinessHour operation.
{ "apiUrl": "https://wso2yasho.freshdesk.com", "apiKey": "SODsQllHr0NicsiRpRWw", "apiVersion": "v2", "businessHourId": "19000007456" }
Retrieves the list of business hours
The listBusinessHours
operation retrieves list of business hour.
<freshdesk.listBusinessHours/>
Sample request
Following is a sample REST/JSON request that can be handled by the listBusinessHours
operation.
{ "apiUrl": "https://wso2yasho.freshdesk.com", "apiKey": "SODsQllHr0NicsiRpRWw", "apiVersion": "v2" }
Sample configuration
Following is a sample proxy service that illustrates how to connect to FreshDesk with the init
operation and use the getBusinessHour operation. The sample request for this proxy can be found in the getBusinessHour sample request.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="freshdesk_getBusinessHour" 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)"/> <property name="businessHourId" expression="json-eval($.businessHourId)"/> <freshdesk.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <apiVersion>{$ctx:apiVersion}</apiVersion> </freshdesk.init> <freshdesk.getBusinessHour> <businessHourId>{$ctx:businessHourId}</businessHourId> </freshdesk.getBusinessHour> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>