Making A Dynamic Multiple Choice Question

Ellyn / November 8, 2021

Source Variable is available in Multiple Choice Question nodes. This node type can be made dynamic by assigning it a source variable which contains a properly structured data source at runtime.

Locating the Source Variable field #

Add a Question node by clicking on the last node to access the contextual menu and choose “New Question” to open up the Edit form.

(Q1) Choose “Multiple Choice” for this question node.

(Q2) Source Variable.

Example – Test Datasource URL for dynamic Questions #

https://www.querlo.com/tests/get_dynamicQuestion

The result of this call should contain a JSON structure like in the above screenshot where s:1 means the call was completed successfully and questionData contains a string-encoded version of the JSON structure contained in the screenshot below: 

Example – Making a dynamic multiple choice question #

Step 1: #

Add a Get from remote command node by filling the form as per the screenshot below and click save.

The GET from Remote Command node has automatically generated 2 answer nodes: [Failure], [Success] that begin 2 new branches in the flow.

Step 2: #

Under the [Failure] branch, add a text node.

Under the [Success] branch, add a Multiple Choice Question node by filling the form as per the screenshot below and click save.

Step 3: #

The Multiple Choice Question node that we have just created provides the action “New Answer” for you to create multiple answer nodes via the contextual menu.

(Q1) Click on the Question node to access the contextual menu.

(Q2) Choose “New Answer” to create an answer node.

Step 4: #

Create two branches “a” and “b” as per the screenshot below.

Step 5: #

Click the “Preview” button to open the chat HTML client which shows you how your chat is presented to the viewers.

>> Case 1: First answer, branch A

>> Case 2: Second Answer, branch A

>> Case 3: Third Answer, branch B

Powered by BetterDocs