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

Delay between a web hook and API response returning correct data

  • January 13, 2022
  • 3 replies
  • 162 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.

3 replies

Forum|alt.badge.img+5
  • Employee
  • Answer
  • January 17, 2022

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
  • January 19, 2022

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
  • January 20, 2022

I will flag it with the team.