4.2 Making a dynamic multiple choice question

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

4.1 Using Leading Spaces to create paragraphs

Adding a Leading space allows you to create a paragraph. Leading spaces can be added before Text nodes and Question nodes.

Adding a Text node Leading space

Step 1:

Go to the chat builder.

Click on a Text node in the Chat builder to open the contextual menu. Choose “Edit” to open up the edit form.

Step 2:

In the edit form, enable the “Add leading space” checkbox to generate a new paragraph in the text script. Click “Save“.

Example

Step 1:

In the chat below, there are 4 text nodes. (Please read The Types of Node to learn more)

(Q1) To add a Leading space to the 3rd text node, click on it to access the contextual menu.

(Q2) Choose “Edit” to open up the edit form.

Step 2:

This is the “Edit” form where you can modify the content of this node.

(Q1) Enable the “Add leading space” checkbox to generate a new paragraph in the text script.

(Q2) Click “Save”.

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

Step 3:

This is how Leading spaces show in the Chat HTML client.

>> In the left-hand chat (the original version):

(Q1) The first node always starts a paragraph in the text script.

>> In the right-hand chat (with the enabled leading space to the 3rd text node):

(Q1) The first node always starts a paragraph in the text script.

(Q2) It shows the 3rd text node has generated a new paragraph in the text script.

Adding a Question node Leading space

Step 1:

Go to the chat builder.

Click on a Question node in the Chat builder that you’d like to generate a new paragraph to access the contextual menu. Choose “Edit” to open up the edit form.

Step 2:

In the edit form, enable the “Add leading space” checkbox to generate a new paragraph in the text script.

Example

Step 1:

In the chat below, there are 2 text nodes and 1 multiple choice question node. (Please read The Types of Node to learn more)

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

(Q2) Choose “Edit” to open up the edit form.

Step 2:

This is the “Edit” form where you can modify the content of this node.

(Q1) Enable the “Add leading space” checkbox to generate a new paragraph in the text script.

(Q2) Click “Save”.

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

By default, a Question node always starts a paragraph in the text script.