multiple events sent at once with webhook?

Hello,

The webhooks documentation (https://community.telligent.com/community/9/w/developer-training/52437/webhooks) includes this sample payload (sorry for strange formatting)

{
    "events": [ {
            "TypeId": "407ad3bc-8269-493e-ac56-9127656527df",
            "DateOccurred": "2015-12-04T16:31:55.5383926Z",
            "EventData": {
                "ActorUserId": 2100,
                "ContentId": "4c792b81-6f09-4a45-be8c-476198ba47be"
             }
        },
        {
            "TypeId": "3b75c5b9-4705-4a97-93f5-a4941dc69bc9",
            "DateOccurred": "2015-12-04T16:48:03.7343926Z",
            "EventData": {
                "ActorUserId": 2100,
                "ContentId": "4c792b81-6f09-4a45-be8c-476198ba47be"
            }
        } ]

}

In my programming ignorance I don't understand why two events are included in this example. If the webhook triggers per event, why would more than one event be sent per payload?

My integration is currently set up to turn 1 Telligent event into 1 action (on a 1:1 basis) when a webhook is triggered. However sometimes events are missed and I wonder if it is because more than one event is perhaps being sent per payload.

If that is true I will have to change the code -- thank you for any advice

Parents
  • The "Webhook Message Send" recurring job is what actually sends the data, and it is on a small delay (default every 5 minutes, adjustable), so any actions occurring within that delay period will be grouped together. Feel free to adjust the time delay lower, but operate on the assumption that there could always be more than one event sent at a time. However, the individual event data objects will always have the same properties (with Event Data varying based on the event), so it should not be too difficult to add looping around your parse block.

  • HI, Thanks in advance, As per mentioned reply, we can adjust webhook event time , so.. I need some help on this

    1. How to adjust webhook event adjust time by using API or using the administration tab in the community ?

    2. Up to how much time we can adjust (example: up to 1 min or 1 sec )

Reply Children