Create Variable to Count Multiple Completes | XM Community
Question

Create Variable to Count Multiple Completes

  • 26 February 2021
  • 1 reply
  • 47 views

I'm setting up a survey with authentication and it allows respondents to complete the survey multiple times. Every time the respondent complete the survey, they will be redirected to the survey again for a second round, then a third around. They will collect a badge for every completion. After they collect three badges, they will be eligible for rewards. So we would like to count how many times a respondent has completed the survey (the number of badges collected).
I tried embed variables (e.g., recipient response count) in the metadata but none of them worked. What will be the best solution to count the number of multiple completes? What will be the custom code for calculating the distinct count?


1 reply

Userlevel 3
Badge +8

You would have to use a contact list trigger to update the embedded data of the respondent in the contact list. Every time someone logs in set embedded data in the survey flow. When they complete, make the calculation then use the contact trigger to update the contact with the new completion number.

Leave a Reply