Response ID Merge Code: How Can I Show Response ID in the Survey?

Looking to use or display the response ID within the survey response? We're asked this question quite a bit in Support. We don't have a way to pull in the response ID number as these are assigned when the response is processed. Because the time it takes for a response to process varies based on server load, this means we don't reliably have the response ID available within a given survey response for use with logic, redirects, etc.

But I Need a Unique ID! Is There Something I Can Use Instead?

There are two options available if you are looking to create and use a unique ID in your survey responses.

Survey Counter Merge Code*

[survey("counter")]

*This feature uses a server technology called MemCache to store the IDs and guarantee they are unique. 99% of the time, your counters will reliably keep track of survey respondents, but your counter *may* get reset if a server has to reboot.

This merge code inserts a unique number for the survey that will increment once per response if used only once within the survey:

Example: [survey("counter")], which will output 1, 2, 3...


Parameter: safer

You can make this unique number safer to use in a long-running survey by adding the parameter safer, which automatically adds in the numeric day of the year:

Example: [survey("counter"), safer="true"], which will output 441, 442, 443... because today is the 44th day of the year.


Parameter: startat

If you'd like control over the starting value, you can add the parameter startat to set a custom starting value for the counter:

Example: [survey("counter"), startat="1000"], which will output 1001, 1002, 1003...


Parameter: name=secondCounter

Finally, if you need to use more than one counter in a survey, you can add the parameter name=secondCounter, which creates a second counter which is unique from the first and referred to by the name "secondCounter". Make sure the name is unique, like "Counter2x", that you haven't used in a previous survey.

Example: [survey("counter"), name="secondCounter"]

Session ID Merge Code

[survey("session id")]

This Merge Code will display the session id of the current survey response, which is a unique response number, but is quite long.

If you're looking for a unique identifier to pass to incentive rewards programs for your survey participant, this unique ID would be an excellent choice as it will ALWAYS be unique to that particular respondent.

 Best Practice Tip: Using the Survey Counter Merge Code in Email Actions

If you want to reference the unique value that was generated using one of the survey counter merge code options within an Email Action, follow these Best Practice Tips:

Add a Hidden Value Action to one of your survey pages and use the desired counter merge code in the "Populate with the following" field.
Survey Counter in Hidden Value

In your Send Email Action, reference the merge code for the Hidden Value to pull in the unique number generated by the survey counter merge code.
Insert Merge Code for Hidden Value

This will ensure that the value that was generated by the survey counter on the survey page, matches exactly with the value that is emailed via the Send Email Action.

Compatibility

The survey counter merge code is not compatible with embedded surveys.

Basic Standard Market Research HR Professional Full Access Reporting
Free Individual Team & Enterprise
Feature Included In