1 · Pass the Samply IDs into the survey
custom1–custom255 (or ext_ref) are captured automatically from the URL — no in-survey field needed — and appear in the export.
- Build the start link so the collector receives %MESSAGE_ID% in a custom variable, e.g. ?custom1=%MESSAGE_ID%&custom2=%SAMPLY_ID%.
- Paste this as the Samply start link; QuestionPro captures custom1/custom2 automatically.
- Optionally label the variable under Custom Variables settings for readable data.
- Verify in Response Viewer and the Excel/CSV export that custom1 holds the value.
2 · Register completion
Finish Options → Advanced Options → Automatic Redirect → Website Address, piping the stored variable as ${custom1}.
- Ensure the message id arrived as a custom variable (e.g. custom1).
- Survey → Edit → Finish Options → Advanced Options → Automatic Redirect.
- In "Website Address" enter: https://samply.uni-konstanz.de/studies/<study-code>/done/${custom1}.
- Save; QuestionPro substitutes ${custom1} with the real message id at the end and redirects. Test end-to-end.
Or register completion silently with a POST
The redirect above navigates the participant's browser to Samply. The same completion can instead be registered server-to-server with an HTTP POST to /studies/<study-code>/done/<message-id> — no request body and no authentication (the message id in the path is the shared secret). Samply replies 200 on success or 400if the id matches no response, and it records the completion and cancels that send's pending reminders exactly like the redirect — just without redirecting. Whether QuestionPro can issue that POST itself varies:
- Requires a paid tier with Webhooks (Team or Research edition).
- Survey → Integrations → Webhooks → Add New Webhook; set Request Method = POST and the trigger to "after the survey is completed".
- Set the Request URL to https://samply.uni-konstanz.de/studies/<study-code>/done/${custom1} and fire a test to a capture endpoint (e.g. webhook.site) to see whether QuestionPro substitutes ${custom1} inside the URL.
- If it substitutes in the URL, you're done (Samply ignores the body). If it sends the literal ${custom1}, fall back to a relay: POST {"mid":"${custom1}"} to your relay (body substitution IS supported), and have the relay POST .../done/<mid> to Samply.
- Use the webhook Logs (payload, response, manual retry) to confirm Samply returned success.
POST sources: https://www.questionpro.com/help/webhook.html · https://www.questionpro.com/api/create-webhook.html
Full request and response details are in the API reference.
Reserved parameters & gotchas
Reserved names: customN, ext_ref, email. Values may not contain comma or hash. Prefer ${custom1} over ${ext_ref} in the redirect — only ${custom1}–${custom255} are documented piping tags.
Things to watch out for
- ext_ref capture works too, but using ${ext_ref} inside the redirect is undocumented — stick to ${custom1} for the round-trip.
Sources
These steps were verified against the platform's official documentation.