Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dialogflow using external api's DEADLINE_EXCEEDED

Hello, @xavidop 

Could you help me with this one?

I'm using Dialogflow ES and have integrated a cloud function as webhook fulfillment. This cloud function calls an API that takes around 35 seconds to return. I understand that this is too long for a conversation, but reducing this time is beyond my control.

What types of workarounds are there so I can send the API response to the chat?

Thank you!

0 6 486
6 REPLIES 6

Unfortunately, there is a hard limit for that that cannot be increased: https://cloud.google.com/knowledge/kb/dialogflow-essentials-webhook-times-out-with-deadline-exceeded...

CX has 30 seconds timeout, right? I might use it!
30 secs should do the job for most cases. In case one request takes a little longer, lets say, 5 more seconds, is there a solution with Events or something? 

nope, those limits cannot be increased. Remember that this solution is for conversation. Anything above 5secs could not make sense from the end user's perspective.

Understood!
One followup question. Once it might take some time for the webhook response I wanted to leave the user with a message while waiting, something like "We´re checking, one moment please".
I thought I could enable Agent Response - Agent Says "We´re checking, one moment please".
Will this "Agent Says" message be sent to the user before the webhook response? In case not, is there an other way?

thanks a lot for your time, Xavi

Hi Mateus!

For that you can use partial responses: https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response

 

Great, thank you Xavi!