Delay between a web hook and API response returning correct data | Community
Skip to main content
Answered

Delay between a web hook and API response returning correct data

  • Jan 13, 2022 9:24 AM UTC
  • 3 replies
  • 336 views

We want to get different conversation stats when we receive a onAdminAssigned web hook. Since the statistics object is empty in the web hook payload itself, we have to make a REST request to api/conversations/{id} to get a full conversation payload.

 

We noticed that if we make this call immediately after getting a web hook, the statistics object will still be filled with zeroes. But if we wait for a couple of seconds before making that call, then we can get all the data we need.

 

Could you pls provide an estimation of the delay (average and upper boundary) between a web hook being sent and the data being accessible via RES API?

Is it possible to send conversation statistics in the web hook itself?

Best answer by Aparna

Hey @anton k11​ ! At the moment it is not possible to send the conversation statistics in the webhook notification. With regard to the delay, I would suggest waiting for at least 2 minutes.

View original

3 replies

Forum|alt.badge.img+5
  • Employee
  • Answer
  • Jan 17, 2022 3:10 PM UTC

Hey @anton k11​ ! At the moment it is not possible to send the conversation statistics in the webhook notification. With regard to the delay, I would suggest waiting for at least 2 minutes.


  • Author
  • New Participant
  • Jan 19, 2022 1:41 PM UTC

Hello @aparna​!

Thanks for the reply!

 

Could you please tell if this 2 minutes delay is going to be fixed anytime soon?

If not - could the REST API doc be updated to reflect this aspect of API?


Forum|alt.badge.img+5
  • Employee
  • Jan 20, 2022 12:57 PM UTC

I will flag it with the team.