Cloud Elements 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
Cloud Elements supports polling events for Concur. After receiving an event, Cloud Elements standardizes the payload and sends an event to the configured callback URL of your authenticated element 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.
Configure Polling Through the UI
To configure polling through the UI, follow the same steps to authenticate an element instance, and then turn on events. Select the resources to poll, and then click Create Instance. For more information, see Authenticate an Element Instance with Events (UI) or the element-specific authentication topic.
Configure Polling Through API
To add polling when authenticating through the /instances
API call, add the following to the configuration
object in the JSON body.
{
"event.notification.enabled": "true",
"event.vendor.type": "polling",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.notification.signature.key": "<INSERT_SIGNATURE_KEY>",
"event.poller.configuration": "{}"
}
event.notification.signature.key
is optional.Example JSON with Polling
{
"element": {
"key": "concur"
},
"configuration": {
"oauth.api.key":"UPjRvqOyYz9hDdWLLLLuQV",
"oauth.api.secret":"GNnU6D7uvWMjOyOEsU7uL1Xc4iaEdEOa",
"oauth.callback.url":"https://httpbin.org/get",
"event.vendor.type": "polling",
"event.notification.callback.url": "http://mycoolstore.com",
"event.notification.signature.key": "123456",
"event.poller.configuration": {
"reports": {
"url": "/hubs/expense/reports?where=modifiedDateAfter='${date:yyyy-MM-dd'T'HH:mm:ss.SSS}'",
"idField": "ID",
"datesConfiguration": {
"updatedDateField": "LastModifiedDate",
"updatedDateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS",
"createdDateField": "CreateDate",
"createdDateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS"
}
}
}
},
"tags": [
"Docs"
],
"name": "ConcurForDocs"
}