hellocustomer / HC.WebsiteSDK

0 stars 3 forks source link

Showing a survey that is not activated, will display an error #21

Open thany opened 2 years ago

thany commented 2 years ago

If you do showInlineSurvey on a survey that is not activated, it will inject an iframe showing a generic error. THis is a horrible user experience. The function doesn't return any useful information for determining that something went wrong. It "just" loads an erroneous iframe and that's that.

This makes it impossible to ever turn off a survey without also deploying new code to the website, to no longer call upon the survey that is about to become deactivated. It should be possible to just turn off a survey, and have the implementation respond to that fact appropriately.

Please make the showInlineSurvey return something to indicate the status (Error / OK, at the very least) of the survey that was meant to displayed.

Also the HTTP response of that error is HTTP 200. Please make it return an appropriate HTTP 503 Service Unavailable.

PS: yes I refuse to call it a touchpoint. It's not a touchpoint. It's a bloody survey is what it is.

thany commented 2 years ago

Any update yet? Just checking...

It's pretty nasty to have to disable a survey in HC, and then also in the website trying to display it.