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 )

  • Hey,

    You can edit this in the Administration area:

    1. Go to the Administration area
    2. Select "Jobs" from the left hand menu
    3. Click on "Jobs" in the second left hand menu to expand the job list
    4. Select the "Webhook Message Send" Job (probably at the end of the list)
    5. Click the schedule tab
    6. Here you can alter how often the job is run

    You can run the job at pretty much any interval you want from 1 second up to once a week, Running the job more often will put more load on your database and job server, and potentially mean more web hook events are sent which may put increased load on the service receiving them, so be careful about running too often (I'd advise against every few seconds in general unless specific reasons and performance is being monitored and managed closely)

    Hope this helps,
    Rhys

Reply
  • Hey,

    You can edit this in the Administration area:

    1. Go to the Administration area
    2. Select "Jobs" from the left hand menu
    3. Click on "Jobs" in the second left hand menu to expand the job list
    4. Select the "Webhook Message Send" Job (probably at the end of the list)
    5. Click the schedule tab
    6. Here you can alter how often the job is run

    You can run the job at pretty much any interval you want from 1 second up to once a week, Running the job more often will put more load on your database and job server, and potentially mean more web hook events are sent which may put increased load on the service receiving them, so be careful about running too often (I'd advise against every few seconds in general unless specific reasons and performance is being monitored and managed closely)

    Hope this helps,
    Rhys

Children