Object (JSON Object) change events

Triggers when objects (like JSON document objects) of certain types in Kazoo are changed.

Info

  • Event name: object
  • Friendly name: Object

Modifiers

To restrict the kind of document or the action or both, you can set the custom data to:

  • type: A list of object types to handle:
    • account
    • call_recording
    • callflow
    • device
    • fax
    • faxbox
    • mailbox_message
    • media
    • user
    • vmbox
  • action: A list of object actions to handle:
    • doc_created
    • doc_deleted
    • doc_edited

Samples

type and action fields reflect the selected modifiers above:

{
    "id": "c4c0ad092e57bc1d28e69bbd20dad932",
    "account_id": "0e10f9365fb2383d0fa65e907bfe4cb3",
    "action": "doc_created",
    "type": "user"
}

Include document data

It is possible to include data from the document on the webhook via system_config.

In the webhooks.object document, set include_fields.{DOC_TYPE} to the list of JSON keys to read from the document.

For instance, if you want to include a user’s first/last name, set "include_fields.user":["first_name", "last_name"].

The webhook payload received will then look something like:

id={USER_ID}&account_id={ACCOUNT_ID}&action=doc_created&type=user&last_name={LAST_NAME}&first_name={FIRST_NAME}&cluster_id={CLUSTER_ID}