Cloud Elements currently supports events via polling or webhooks depending on the endpoint.
- Polling is a mechanism where Cloud Elements executes the configured query every
n
minutes and captures the changed information. - Webhooks are when the provider lets Cloud Elements know what information has changed. Note that additional endpoint setup may be required prior to creating your element instance.
If you would like to see more information on our Events framework, please see Events Overview.
Cloud Elements supports webhook events for Salesforce.
Webhooks
When implementing webhooks for Salesforce, Cloud Elements creates APEX classes and triggers in order to send webhooks. This can only be done in a Salesforce sandbox account. If you want to support webhooks in a production Salesforce account, you'll have to make some modifications and migrate those classes to production according to the Salesforce specification. View more information regarding the Salesforce specification.
Follow these steps to setup your Salesforce application with the endpoint.
In order to create a Salesforce element instance you must have the Enterprise edition or Professional edition with API support is required. Also, to set up a new application in Salesforce, you must have Administrator privileges. Please contact your system administrator if you do not have those privileges.
Via a web browser, login to your Salesforce account: https://login.salesforce.com/
Under "Administer" > "Security Controls" > select "Remote Site Settings"
Click “New Remote Site”
Create a remote site for the following URL:
https://api.cloud-elements.com
Click Save.
NOTE: Our current support for Salesforce Events include listening for the following: Creating, Updating, and Deleting of any object in Salesforce. For example, when a new account is created, your application will receive a notification regarding the creation of the account.
The following JSON may be used to create a Salesforce Instance with webhooks enabled:
{
"element": {
"key": "sfdcservicecloud"
},
"providerData": {
"code": "<Code_On_The_Return_URL>"
},
"configuration": {
"oauth.callback.url": "https://www.mycoolapp.com/auth",
"oauth.api.key": "<Insert_Client_ID>",
"oauth.api.secret": "<Insert_Client_Secret>",
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.vendor.type": "webhook",
"event.objects": "<INSERT_COMMA_SEPARATED_LIST_OF_OBJECTS_e.g_Account,Contact>"
},
"tags": [
"<Add_Your_Tag>"
],
"name": "<Insert_Instance_Name>"
}