Skip to main content
Answered

Why fetch_active_survey API is called after a delay of a few seconds when startSurvey is triggered from the code?


We are using the startSurvey method in the intercom/messenger-js-sdk@0.0.6 package to trigger surveys in the app. After calling this method, it takes a delay of 5-7 seconds to call fetch_active_survey. Is there a way to reduce this delay and make it faster so that the survey is visible within 1-2 seconds in our app?

Best answer by mateusz.leszkiewicz

Hi Lakshya Bhardwajz It’s Mat from the Support Engineering Team 😀

If you are referring to this package 👇 there is a newer version of it 0.0.13, can you try to use it and let me know if that does the trick?


https://www.jsdelivr.com/package/npm/@intercom/messenger-js-sdk

View original
Did this topic help you find an answer to your question?

3 replies

mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Lakshya Bhardwajz It’s Mat from the Support Engineering Team 😀

If you are referring to this package 👇 there is a newer version of it 0.0.13, can you try to use it and let me know if that does the trick?


https://www.jsdelivr.com/package/npm/@intercom/messenger-js-sdk


Hello Mat,
It’s still taking a few seconds to trigger fetch_active_survey after updating it to 0.0.13. Moreover, I observed that there is a call to this endpoint: https://api-iam.intercom.io/messenger/web/surveys/39045717/fetch which turns out to be a 404. Later, it is called https://api-iam.intercom.io/messenger/web/surveys/fetch_active_survey which gives the data in some milliseconds. It’s the time between these calls that is creating the delay in rendering the surveys in our app.


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Lakshya,

I’ve created a conversation in Intercom for you. There might be couple of different reasons behind the delay, let our engineers investigate what is the actual reason behind it.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings