Cloud Elements currently supports events via polling or webhooks depending on the endpoint.
n
minutes and captures the changed information.If you would like to see more information on our Events framework, please see the Event Management Guide.
Cloud Elements supports polling events for the following SAP Hybris Cloud for Customer Helpdesk resources:
Use Cloud Elements to authenticate with SAP Hybris Cloud for Customer and create an element instance with polling enabled.
To authenticate an element instance with polling:
After successfully authenticating, we give you several options for next steps. Make requests using the API docs associated with the instance, map the instance to a virtual data resource, or use it in a formula template.
Use the /instances
endpoint to authenticate with SAP Hybris Cloud for Customer and create an element instance with polling enabled.
To authenticate an element instance with polling:
Construct a JSON body as shown below (see Parameters):
{
"element": {
"key": "sapc4chd"
},
"configuration": {
"subdomain": "<domain>.crm.ondemand.com",
"username": "<YOUR_SAP_Hybris Cloud for Customer_USERNAME>",
"password": "<YOUR_SAP_Hybris Cloud for Customer_PASSWORD>",
"event.notification.enabled": true,
"event.notification.callback.url": "http://mycoolapp.com",
"event.poller.refresh_interval": "15",
"accounts": {
"url": "/hubs/helpdesk/accounts?where=ChangedOn>='${date:yyyy-MM-dd'T'HH:mm:ss'Z'}",
"idField": "ObjectID",
"datesConfiguration": {
"updatedDateField": "ChangedOn",
"updatedDateFormat": "milliseconds",
"createdDateField": "CreatedOn",
"createdDateFormat": "milliseconds"
},
"contacts": {
"url": "/hubs/helpdesk/contacts?where=ChangedOn>='${date:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "ObjectID",
"datesConfiguration": {
"updatedDateField": "ChangedOn",
"updatedDateFormat": "milliseconds",
"createdDateField": "CreatedOn",
"createdDateFormat": "milliseconds"
}
},
"incidents": {
"url": "/hubs/helpdesk/incidents?where=ChangedOn>='${date:yyyy-MM-dd'T'HH:mm:ss'Z'}",
"idField": "ObjectID",
"datesConfiguration": {
"updatedDateField": "ChangedOn",
"updatedDateFormat": "milliseconds",
"createdDateField": "CreatedOn",
"createdDateFormat": "milliseconds"
}
},
"incidents-statuses": {
"url": "/hubs/helpdesk/incidents-statuses?where=ChangedOn>='${date:yyyy-MM-dd'T'HH:mm:ss'Z'}",
"idField": "ObjectID",
"datesConfiguration": {
"updatedDateField": "ChangedOn",
"updatedDateFormat": "milliseconds",
"createdDateField": "CreatedOn",
"createdDateFormat": "milliseconds"
}
}
},
},
"tags": [
"ElementDocs"
],
"name": "<AUTHENTICATED_INSTANCE_NAME>"
}
Call the following, including the JSON body you constructed in the previous step:
POST /instances
Locate the token
and id
in the response and save them for all future requests using the element instance.
API parameters not shown in Cloud Elements are in code formatting
.
Parameter | Description | Data Type |
---|---|---|
'key' | The element key. sapc4chd |
string |
Namename |
The name for the element instance created during authentication. | string |
Subdomain subdomain |
The url of your SAP Hybris Cloud for Customer Helpdesk site. Replace |
|
Username | Your user name for SAP Hybris Cloud for Customer Helpdesk. | String |
Password | Your password for SAP Hybris Cloud for Customer Helpdesk. | String |
Events Enabled event.notification.enabled |
Optional. Identifies that events are enabled for the element instance.Default: false . |
boolean |
Event Notification Callback URLevent.notification.callback.url |
The URL where you want Cloud Elements 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" |
Resource to poll along with its configuration. | JSON Object |
accounts"event.poller.configuration": "{\"accounts\"...}" |
OptionalThe SAP Hybris Cloud for Customer Helpdesk accounts resource available for polling. |
JSON object |
contacts"event.poller.configuration": "{\"contacts\"...}" |
OptionalThe SAP Hybris Cloud for Customer Helpdesk contacts resource available for polling. |
JSON object |
leads"event.poller.configuration": "{\"leads\"...}" |
OptionalThe SAP Hybris Cloud for Customer Helpdesk incidents resource available for polling. |
JSON object |
opportunities"event.poller.configuration": "{\"opportunities\"...}" |
OptionalThe SAP Hybris Cloud for Customer Helpdesk incidents-statuses resource available for polling. |
JSON object |
tags | Optional. User-defined tags to further identify the instance. | string |
curl -X POST \
https://staging.cloud-elements.com/elements/api-v2/instances \
-H 'Authorization: User <INSERT>, Organization <INSERT>' \
-H 'content-type: application/json' \
-d '{
"element": {
"key": "sapc4chd"
},
"configuration": {
"subdomain": "<domain>.crm.ondemand.com",
"username": "<USERNAME>",
"password": "<YOUR_SAP_Hybris Cloud for Customer_PASSWORD>",
"event.notification.enabled": true,
"event.notification.callback.url": "http://mycoolapp.com",
"event.poller.refresh_interval": "15",
"incidents": {
"url": "/hubs/helpdesk/incidents?where=ChangedOn>='\''${date:yyyy-MM-dd'\''T'\''HH:mm:ss'\''Z'\''}",
"idField": "ObjectID",
"datesConfiguration": {
"updatedDateField": "ChangedOn",
"updatedDateFormat": "milliseconds",
"createdDateField": "CreatedOn",
"createdDateFormat": "milliseconds"
}
}
},
"tags": [
"ElementDocs"
],
"name": "<AUTHENTICATED_INSTANCE_NAME>"
}
'
{
"id": 50753,
"name": "SAPHybris Cloud for CustomerAPI1",
"createdDate": "2017-05-19T14:00:59Z",
"token": "4RFxtlivv2BW9oAoO64wCnLvwwps4SPCf6LyCUq8Ihg=",
"element": {
"id": 5354,
"name": "SAP Hybris Cloud for Customer Helpdesk",
"key": "sapc4chd",
"description": "Add a SAP Cloud for Customer (Hybris Cloud for Customer) Instance to connect your existing SAP Cloud for Customer (Hybris Cloud for Customer) account to the Helpdesk Hub, allowing you to manage accounts, contacts, incidents, etc. across multiple Helpdesk Elements. You will need your SAP Cloud for Customer (Hybris Cloud for Customer) account information to add an instance.",
"image": "elements/provider_sapc4c.png",
"active": true,
"deleted": false,
"typeOauth": false,
"trialAccount": false,
"resources": [],
"transformationsEnabled": true,
"bulkDownloadEnabled": true,
"bulkUploadEnabled": true,
"cloneable": true,
"extendable": false,
"beta": false,
"authentication": {
"type": "basic"
},
"extended": false,
"hub": "Helpdesk",
"protocolType": "odata",
"parameters": [
{
"id": 3990,
"createdDate": "2017-05-17T09:37:05Z",
"name": "subdomain",
"vendorName": "siteUrl",
"type": "configuration",
"vendorType": "path",
"source": "request",
"elementId": 5353,
"required": false
}
],
"private": false
},
"elementId": 5353,
"provisionInteractions": [],
"valid": true,
"disabled": false,
"maxCacheSize": 0,
"cacheTimeToLive": 0,
"configuration": { },
"eventsEnabled": true,
"eventsNotificationCallbackUrl": "http://mycoolapp.com",
"subscriptionId": 1157990,
"traceLoggingEnabled": false,
"cachingEnabled": false,
"externalAuthentication": "none",
"user": { }
}