Loop and Merge with Quotas | XM Community
Skip to main content
Solved

Loop and Merge with Quotas


Forum|alt.badge.img+2

How can we implement quotas in Qualtrics to ensure that a specific loop and merge item, such as "Red," is fully utilized in the survey 100 times?

For example:

  • We ask participants to choose their favorite colors in the rainbow (multi-choice).
  • A follow-up looping question is presented based on the selected colors, such as:
    "What is your favorite shape for [COLOR]?"
    Options: Circle, Triangle, Rectangle, Hexagon, Heptagon.

If we set a quota for "Red" at 100:

  • 100 participants select Red, but 63 of them also select another color.
  • Due to the randomization of the loop, only 30 of those 63 are asked about "Red" in the looping question.
  • In total, only 67 participants are asked about "Red," leaving a gap of 33 from the quota, even though the quota for Red is marked as "full."

How can we structure the survey or quotas to ensure that Red gets fully processed 100 times through the loop and merge, rather than just being selected as part of the multi-choice question?

Best answer by SPGold at Work

What I ended up doing was creating a second question of…

 

We are going to ask you questions about [pipe] are you ready?

  1. Yes
  2. No

And did my quota based off of this. So my quota logic was

  1. Select color is selected from Question 1
  2. Select color is selected, select yes 
View original

5 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5919 replies
  • January 22, 2025

It sounds like you are limiting the number of loops in loop randomization. You should remove the limit and turn off loop randomization completely. Randomize the colors in the question on which the loop is based. This will do two things:

  • Display the loop question for all colors selected (i.e., if red is selected 100 times it will be display 100 times in the loop).
  • Present the colors in the in loop in the same randomized order they were displayed in the color question

Forum|alt.badge.img+2

Thank you for responding so quickly.

 

I am having them displayed in a random order each time, but the respondent can choose multiple colors (if they want). But I want Qualtrics to pick a random color from the ones they chose, but if a person said more than one color, I do not want them to be counted against the quota


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5919 replies
  • January 22, 2025
SPGold at Work wrote:

Thank you for responding so quickly.

 

I am having them displayed in a random order each time, but the respondent can choose multiple colors (if they want). But I want Qualtrics to pick a random color from the ones they chose, but if a person said more than one color, I do not want them to be counted against the quota

Now I understand.  Add JS to the first question in your loop that copies loop and merge field 1 into an embedded data field then base your quota logic on the embedded data field value.

First define the embedded data field in the survey flow:

Set embedded data: __js_quotaColor (do not assign value)

Set its value in the loop:

Qualtrics.SurveyEngine.addOnload(function() {
  Qualtrics.SurveyEngine.setJSEmbeddedData("quotaColor","${lm://Field/1}");
});

 


  • Level 4 ●●●●
  • 203 replies
  • January 23, 2025
SPGold at Work wrote:

Thank you for responding so quickly.

 

I am having them displayed in a random order each time, but the respondent can choose multiple colors (if they want). But I want Qualtrics to pick a random color from the ones they chose, but if a person said more than one color, I do not want them to be counted against the quota

See if this works for you. 

Respondent can chose all 7 colors at once. But since you want qualtrics to get random image of it. you can set the embedded data to capture the color. 

Then, lets assume Quota already has 7 reds, 5 blues.

 

Based on quotas, you set condition based on which has least filled. You can get completes for that least filled color

 


Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • 3 replies
  • Answer
  • February 2, 2025

What I ended up doing was creating a second question of…

 

We are going to ask you questions about [pipe] are you ready?

  1. Yes
  2. No

And did my quota based off of this. So my quota logic was

  1. Select color is selected from Question 1
  2. Select color is selected, select yes