How to create a survey with many internal conditions (akin to if else conditions in Python)? | XM Community
Skip to main content

I am super new to qualtrics, and have been tasked with creating a survey for which I have no clue how to start. I would really appreciate some VISUAL help, since I am getting lost in the myriad of functions of qualtrics.

So my question is; 
 

Using Qualtrics, program a survey where a subject negotiates over the price of a product. The negotiation will begin with an initial offer (I_O) made by the computer which can take one of the four possible values from the Table below (column I_O). The subject will have one out of three options: 1. Accept the offer – In this case, the next screen displays the agreed upon price (I_O) and the negotiation terminates, survey ends. 2. Reject the offer - In this case, the next screen displays that an agreement could not be reached and the negotiation terminates, survey ends. 3. Counteroffer – Subjects makes a counteroffer. Allow subject to make an offer. The offer should be greater than 0 and less than I_O. In case of counteroffer: 1. If the subject’s offer is greater than the acceptable offer (A_O), then the seller accepts the offer and the next screen displays the agreed upon price (subject’s offer) and the negotiation terminates, survey ends. 2. If the subject’s offer is less than A_O, then compute the average of the subject’s offer and I_O. Let’s call this second offer (S_O). Show the subject the higher value between S_O and A_O as the second offer from the computer. The subject will have one out of two options: a. Accept the offer – In this case, the next screen displays the agreed upon price (maximum of S_O and A_O) and the negotiation terminates, survey ends. b. Reject the offer - In this case, the next screen displays that an agreement could not be reached and the negotiation terminates, survey ends.

Hi @terry_mcginnis ,

 

If you wish to, you can create the if-else conditions using branch logic in survey flow.

First, set randomizer to choose 1 of the 4 blocks of embedded data. set embedded data (I_O) to be 1 to 4 respectively.

Piped text the value (I_O) into a MCQ question with Accept, Reject and counteroffer as options.

Then, set up 3 branches (1).

1st branch (1), condition if Accept is selected, display a text/graphic with piped text (I_O), end of survey element.

2nd branch (1), condition if Reject is selected, display a text/graphic, end of survey element.

3rd branch (1), condition if counteroffer is selected, display a text entry question. 

Within the 3rd branch (1), create 2 branches (2).

1st branch (2), condition if countervalueoffer > (A_O), display a text/graphic, end of survey element.

2nd branch (2), condition if countervalueoffer < (A_O), use math operator to calculate (S_O).

Within this 2nd branch (2), create 2 branch (3).

1st branch (3), condition if (S_O) > (A_O), embedded date displayvalue = (S_O).

2nd branch (3), condition if (S_O) < (A_O), embedded date displayvalue = (A_O).

Piped text the displayvalue into a MCQ question with Accept and Reject as option.

Then, set up 2 branches (4) after the 2 branches (3), also within 2nd branch (2).

1st branch (4), condition if Accept is selected, display a text/graphic with piped text displayvalue, end of survey element.

2nd branch (4), condition if Reject is selected, display a text/graphic, end of survey element.

 

Feel free to look up the underline text here for more information.

 

 

 


@Chee Heng_SZ , I did reach somwhere but I am still stuck. Regardless of what the input value is for counteroffer, it says negotiation was successful even though I have applied branch logic and maths. 

 

Could you please take a look at where I am going wrong?? Attaching a couple of screenshots here

 


Hi @terry_mcginnis ,

I think your condition for the branches should be piped text A_O, I_O instead of typing A_O, I_O as a value.

For illustration.

 


@Chee Heng_SZ , thanks for the prompt reply mate really appreciate it. 

Why do mathematical operations dont work though? Like let's just say you wanted to take out the average of the counteroifer and initial offer, if I am doing addition then dividing  by 2 it's not working. 

 

Is there a syntax issue, or do mathematical operations take a different form? I am creating this equation in embedded value itself. 


Hi @terry_mcginnis ,

 

My mistake in the illustration earlier.

Amended the math operator for S_O, condition for A_O>=S_O and condition for A_O<S_O.​​​​

There may be various factors such as piped text issue, html spacing etc.

I usually just guess, test and retry.

But there is a support documentation on math operation which may be useful.


Leave a Reply