Requirements for Adding Webhook Support

When adding support for events to a custom element, an event hook is typically used to format the incoming event (webhook) into the format Cloud Elements expects.

A single event object should contain:

"event_date": <date in ISO format>,
"event_object_id": <ID that can be used to look up the object>,
"event_type": <One of 'CREATED', 'UPDATED', 'DELETED', or 'UNKNOWN'>,
"event_object_type": <the name of the object, e.g. users or accounts>

In the event hook, pass an array of event objects to the done function like so:

done({ "events": <array of event objects> });