Can a webhook on the final page of a survey return a redirect?

0

Good morning,

After my respondents complete a one-page survey they go to a brief “thank you” page, which triggers an HTTPConnect action that sends all the parameters / values that they entered to a webhook on my web server.

My web server then assigns a unique id to that data, and I would then like to redirect those visitors to a new URL, for example:

https://www.mydomain.com/script?unique_id=765833

I see that my webhook can return a value — it just isn’t clear to me that I can return a redirect.

I also see that I can set a delay, and then redirect the user — but, I’m not sure how to pass the unique_id back to SurveyGizmo and have you use it in the redirect.  (And, it seems non-ideal because if I set the delay too short, I might not have enough time to return the unique_id, and if I set it too long the user might navigate away from SurveyGizmo.

Does that make sense?

Thanks,

Chris

cbrooks answered
    1

    Thank you Dominic, that solved my problem.  I just needed to think about this as a redirect to my webhook, rather than as a sub-request using HTTPConnect.

    As an aside, for anyone else in this situation: I’m not sure why SurveyGizmo won’t let you do a redirect after a 1-page form (survey) — but, you can work around this by creating a 2nd page that just displays a “Please wait a moment while we process your information” message, and then do a 0 second redirect to your website.

    Thanks!

    Chris

    cbrooks commented
      • Thanks, Chris!

        I think the reason that a redirect can’t be placed on a one page survey, might be due to ensuring that the first page is submitted (for data collection)…

        Thanks for your tip!

      • >might be due to ensuring that the first page is submitted

        I don’t think that’s it — the survey respondent could simply submit the form once they had completed it, then SG could process it in whatever way was appropriate (such as saving all the values to the database), then return your redirect. This could even be done in addition to an HTTPConnect sub-request.

        I’ve been scratching my head on why SG doesn’t allow HTTPConnects or URL redirects after the first page of a survey. It sort of feels to me like an old design decision that people know was a bad decision, but fixing it means having to rewrite a bunch of code that nobody wants to touch.

      1

      You can definitely send values from SurveyGizmo via a URL redirect:

      https://help.surveygizmo.com/help/article/link/url-redirect-send-values

      It’s a matter of passing a value into SurveyGizmo (typically via URL variable). The value can be captured on the survey in a Hidden Value action:

      https://help.surveygizmo.com/help/article/link/url-merge-codes

      I’m not sure how this all plays into your web-hook but perhaps this information is helpful..

      Dominic Sharpe answered
        ×

        Login

        Question stats

        • Active
        • Views383 times
        • Answers2 answers
        • Followers1 follower