Cloud Elements supports events via polling or webhooks depending on the endpoint. If you would like to see more information on our Events framework, please see the Event Management Guide.
Cloud Elements supports polling events for Microsoft Dynamics CRM. Polling can be set up for one specific resource (i.e. accounts
) or for multiple resources.
You can set up events for the following resources:
created
, updated
, and deleted
data. You can configure polling through the UI or in the JSON body of the /instances
API call.
To set up polling when creating an authenticated instance:
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 Microsoft Dynamics CRM and create an element instance with polling enabled.
{
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.poller.configuration": "<SEE_BELOW>"
}
objects
in the event.poller.configuration
are the default configurations we support. Feel free to remove any objects that do not fit your needs.Here is an example instance JSON with polling events enabled for Microsoft Dynamics 2016 and later:
{
"element": {
"key": "dynamicscrmadfs"
},
"configuration": {
"user.username": "<INSERT_DYNMAICS_CRM_USERNAME>",
"user.password": "<INSERT_DYNMAICS_CRM_PASSWORD>",
"dynamics.tenant": "yourcompanyname.crm.dynamics.com",
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.poller.configuration": {
"accounts": {
"url": "/hubs/crm/accounts?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"contacts": {
"url": "/hubs/crm/contacts?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"opportunities": {
"url": "/hubs/crm/opportunities?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"leads": {
"url": "/hubs/crm/leads?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"tasks": {
"url": "/hubs/crm/tasks?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"notes": {
"url": "/hubs/crm/notes?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"activities": {
"url": "/hubs/crm/activities?where=fetchChanges='true'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
}
}
},
"tags": [
"<INSERT_TAGS>"
],
"name": "<INSERT_INSTANCE_NAME>"
}
Here is an example instance JSON with polling events enabled for earlier versions of Microsoft Dynamics:
{
"element": {
"key": "dynamicscrmadfs"
},
"configuration": {
"user.username": "<INSERT_DYNMAICS_CRM_USERNAME>",
"user.password": "<INSERT_DYNMAICS_CRM_PASSWORD>",
"dynamics.tenant": "yourcompanyname.crm.dynamics.com",
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.poller.configuration": {
"accounts": {
"url": "/hubs/crm/accounts?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"contacts": {
"url": "/hubs/crm/contacts?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"opportunities": {
"url": "/hubs/crm/opportunities?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"leads": {
"url": "/hubs/crm/leads?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"tasks": {
"url": "/hubs/crm/tasks?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"notes": {
"url": "/hubs/crm/notes?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
},
"activities": {
"url": "/hubs/crm/activities?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'",
"idField": "id",
"datesConfiguration": {
"updatedDateField": "attributes.modifiedon",
"updatedDateFormat": "milliseconds",
"createdDateField": "attributes.createdon",
"createdDateFormat": "milliseconds"
}
}
}
},
"tags": [
"<INSERT_TAGS>"
],
"name": "<INSERT_INSTANCE_NAME>"
}
Please note that when creating an instance via the APIs with Polling configuration, the double quotes will need to be escaped and it should not contain any new line characters. The above examples have omitted this formatting for readability.