SAP Open Connectors

Freshdesk V2 Events

On this page

SAP Open Connectors supports events via polling or webhooks depending on the API provider. For more information about our Events framework, see Events Overview.

Supported Events and Resources

SAP Open Connectors supports polling events for Freshdesk. After receiving an event, SAP Open Connectors standardizes the payload and sends an event to the configured callback URL of your authenticated connector instance.

You can set up polling for the events resource. You can also copy the events configuration to poll other resources. See Configure Polling Through API for more information.

Note: Unless configured for a specific time zone, polling occurs in UTC.

Configure Polling Through the UI

To configure polling through the UI, follow the same steps to authenticate a connector instance, and then turn on events. Select the resources to poll, and then click Create Instance. For more information, see Authenticate an Connector Instance with Events (UI) or the connector-specific authentication topic.

Configure Polling Through API

Use the /instances endpoint to authenticate with Freshdesk V2 and create a connector instance with polling enabled.

Note: The endpoint returns a connector instance token and id upon successful completion. Retain the token and id for all subsequent requests involving this connector instance.

To authenticate a connector instance with polling:

  1. Construct a JSON body as shown below (see Parameters):

    {
      "element": {
        "key": "freshdeskv2"
      },
      "configuration": {
         "subdomain": "<YOUR_SUBDOMAIN>",
         "username": "<YOUR_API_KEY>",
       "event.notification.callback.url": "http://mycoolapp.com",
       "event.poller.refresh_interval": "<minutes>",
       "event.poller.configuration":{
          "incidents":{
            "url":"/hubs/helpdesk/incidents?where=updated_since='${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
            "idField":"id",
            "datesConfiguration":{
              "updatedDateField":"updated_at",
              "updatedDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX",
              "createdDateField":"created_at",
              "createdDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX"
            }
          },
          "contacts":{
            "createdCheckTolerance": 5,
            "url":"/hubs/helpdesk/contacts?where=updated_since='${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
            "idField":"id",
            "datesConfiguration":{
              "updatedDateField":"updated_at",
              "updatedDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX",
              "createdDateField":"created_at",
              "createdDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX"
            }
          }
        }
      },
      "tags":[
        "<Add_Your_Tag>"
      ],
      "name":"<INSTANCE_NAME>"
    }
    
  2. Call the following, including the JSON body you constructed in the previous step:

    POST /instances
    
    Note: Make sure that you include the User and Organization keys in the header. For more information, see Authorization Headers, Organization Secret, and User Secret.
  3. Locate the token and id in the response and save them for all future requests using the connector instance.

Example JSON with Polling

instance JSON with polling events enabled:

{
  "element":{
    "key":"freshdeskv2"
  },
  "configuration":{
    "subdomain": "cloudelements",
    "username": "xxxxxxxxxxxxxxxxxxxxx",
    "event.notification.callback.url": "http://mycoolapp.com",
    "event.poller.refresh_interval": "15",
    "event.poller.configuration":{
       "incidents":{
         "url":"/hubs/helpdesk/incidents?where=updated_since='${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
         "idField":"id",
         "datesConfiguration":{
           "updatedDateField":"updated_at",
           "updatedDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX",
           "createdDateField":"created_at",
           "createdDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX"
         }
       },
       "contacts":{
         "createdCheckTolerance": 5,
         "url":"/hubs/helpdesk/contacts?where=updated_since='${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
         "idField":"id",
         "datesConfiguration":{
           "updatedDateField":"updated_at",
           "updatedDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX",
           "createdDateField":"created_at",
           "createdDateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX"
         }
       }
     }
  },
  "tags":[
    "Test"
  ],
  "name":"API_Polling"
}

Parameters

API parameters not shown in SAP Open Connectors are in code formatting.

ParameterDescriptionData Type
keyThe connector key.
freshdeskv2
string
Name
name
The name for the connector instance created during authentication.string
Subdomain
subdomain
Your domain name when logging in to Freshdesk. For example, in https://cloudelements.freshdesk.com the subdomain is cloudelements.string
API Key
username
The Freshdesk API Key that you noted in the API Provider Setup section.string
Events Enabled
event.notification.enabled
Optional. Identifies that events are enabled for the connector instance.
Default: false.
boolean
Event Notification Callback URL
event.notification.callback.url
The URL where you want SAP Open Connectors to send the events.string
Event poller refresh interval (mins)
event.poller.refresh_interval
A number in minutes to identify how often the poller should check for changes.number
Configure Polling
event.poller.configuration
Optional*. Configuration parameters for polling.JSON object
contacts/incidentsThe polling event configuration of the contacts and incidents resources.JSON object
URL
url
The url to query for updates to the resource.String
ID Field
idField
The field in the resource that is used to uniquely identify it.String
Advanced Filtering
datesConfiguration
Configuration parameters for dates in pollingJSON Object
Updated Date Field
updatedDateField
The field that identifies an updated object.String
Updated Date Format
updatedDateFormat
The date format of the field that identifies an updated object.String
Created Date Field
createdDateField
The field that identifies a created object.String
Created Date Format
createdDateFormat
The date format of the field that identifies a created object.String
tagsOptional. User-defined tags to further identify the instance.string