Guide to Survey builder

A survey is a great way to engage with someone through a voice assistant like Amazon Echo or Google Home, or a chatbot for a mobile device, or website. Orbita makes creating surveys simple with additional features that can enhance the user experience. Some example surveys include:

  • Pain level assessment survey that gets the user’s pain status and transfers that to appropriate personnel.

  • Mental health assessment that provides feedback to address issues.

  • Prerequisite data gathering such as patient insurance information.

Click Orbita Surveys to watch an introductory video about surveys in Orbita.

 

Survey Builder

Start creating a new survey from the Global Shared Items menu and select Agent > Surveys. The Survey Builder page appears.

Click Add (+) to start a new survey. You can also click on an existing survey to edit it.

The Auto Generate Slots is enabled by default because this lets Orbita automatically generate utterance and intent slots from the items you enter into survey fields. For example, if you provide an option list of red, yellow, green, and blue, Orbita adds these options to the utterance database.

For more information, see How do I create and use slots?, How do I create an intent?, and How can I control the way text is spoken?

Survey Builder has the following function tabs at the top.

  • Survey Designer. It provides the control type elements (such as input, checkbox, and so on) to build a survey. See Survey Designer.

  • JSON Editor. Displays the underlying JSON code of the survey you build. You can modify the code directly. See JSON editor.

  • Test Survey. See and test how your survey will perform for an end-user. You can also designate someone else to test your survey. See Test Survey.

  • Extended schema. Add associated data to the survey. For example, record the IP address of a survey submitter.

  • Alerts. Add a note to the collected data based on a condition. For example, if the IP address was already used in a previously submitted survey.

  • Embed survey. It provides several ways to place your survey into a website. See Embedding a survey on your website.

Survey Designer

The left pane shows the control types you can use to create your survey. To use a control type, click on it, or drag and drop it in the main pane, and then edit it. You can reorder survey items using drag and drop also.

When you click on an existing survey control type in the main pane, the Edit button and context menu appears.

  • Edit. Modify the survey type.

  • Add to the toolbox. Adds the instance of this question type to the Control Type list in the left pane. This is useful if you have questions you use often such as name, address, and so on. Drag and drop the Type instance from the toolbox to the survey.

  • Copy. Copy the question.

  • Delete Question. Remove the question from the survey.

Control Types

  • Single Input. A field for the user to enter a brief textual content.

  • Checkbox. A list of options where the user can select one or more of the options.

  • Radiogroup. A list of options where the user can select only one of the options.

  • Dropdown. A list of options in a drop-down list where the user can select only one of the options.

  • Comment. A text box for the user to enter content.

  • Rating. A relative value for the user to choose such as pain level from 1 to 10 or movie enjoyment from 1 to 5 stars.

  • Description. Does not display in the survey. Enter notes in the survey for you or other editors of the survey.

  • Survey Reference. Choose an existing survey to import, which you can modify for another unique survey.

Each Control Type lets you add functionality to each question using the following tabs.

  • General. Each control type (except for Description and Survey Reference) employs a WYSIWYG editor to enhance the formatting of your survey question. The Control Type Field Descriptions section describes the attributes of the control types. The Orbita WYSIWYG Editor User Guide describes how to use the editor features.

  • Choices. Some control types have Choices tabs (or Rate Values tab) where you enter options.

  • Expressions. Create conditions in your survey. For example, if a user answers a question in a specific way, jump to another line of questions. See Expressions Tab.

  • Data. Not yet implemented.

Single Input

A Single Input control type seeks brief input as text or a number. For example, What is the weather like where you are? Is looking for answers like sunny, cloudy, rainy, snowing, and so on. Or, How many people are in your gardening club? can look for a number answer that can range considerably. See also Comment. See Control Type Field Descriptions for information about Single Input specifications.

Checkbox

The Checkbox control type seeks input for one or more items from a limited set of options. For example, a user can enjoy several types of music. See Control Type Field Descriptions for information about Checkbox specifications. Use the Choices tab to specify the options from which a user can choose.

Radiogroup

The Radiogroup control type seeks a single answer from a list of limited options, such as What is your favorite season? Use the Choices tab to specify the options. See Control Type Field Descriptions for information about Radiogroup specifications.

Radiogroup is similar to the Dropdown control type because they require a single choice from a list of options.

The Dropdown control type places a list of options in a dropdown field. Dropdown fields are compact and especially useful for long options lists that will not take up a lot of space in your survey. The following image shows a sample dropdown question and option choice. Use the Choices tab to specify the options. See Control Type Field Descriptions for information about Dropdown specifications.

Dropdown is similar to the Radiogroup control type because they require a single choice from a list of options.

Comment

The Comment control type is similar to the Single Input control type but accepts more verbose input from the survey taker. The Comment control type has a Row count field. If you specify 4 rows, for example, 4 blank rows appear in the comment box, but the user can enter text beyond the 4 rows. You can limit user input to text or numbers. See Control Type Field Descriptions for information about Comment specifications.

Rating

The Rating control type seeks relative value input, such as rating the pain level of a patient, or how well someone liked a movie, restaurant, or product. This control type has a Rate Values tab that is similar to the Choices tab to specify rating options. You can make the input numeric or text. See Control Type Field Descriptions for information about Rating specifications.

Description

Use the Description control type to add text to the survey, such as an introduction, explanation, and so on.

Survey Reference

Use Survey Reference to import an existing survey into the current survey. This lets you create variations of a survey quickly, or insert survey questions you use often in other surveys.

Control Type Field Descriptions

Many control type elements share the same fields. See this section for field descriptions.

  • Name. Enter the name of this instance type. If you choose Add to Toolbox, this name displays in the control type list.

  • Title. Use the WYSIWYG editor to enter the question you want to ask the survey-taker.

  • Visible. Enable to display the question; disable to hide the question from the survey.

  • Input type. Select Text or Number. Orbita has built-in validation to ensure that users provide the correct type of data, such as a number for telephone numbers or US Zip code, or letters for first and last names.

    • Text. Restrict input to text content. (Numbers will be considered as a text character.)

      • RegEx. Insert the regular expression (regex) value, such as {firstname}.

      • Message. Enter the message to be displayed if the wrong type of input is entered (including null).

    • Number. Restrict input to numeric content. (Letters and special characters are not allowed.)

      • maxValue. Enter the upper limit of the response.

      • minValue. Enter the lower limit of the response.

      • Message. Specify a message to display if the answer occurs outside of the maxValue and minValue range.

Choices Tab

If your control type offers choices (or rate values), the choices tab appears as follows.

  • Click Form Entry to enter choices one by one.

  • Click Fast Entry to type a list of choices.

Expressions tab

The Expressions tab lets you create conditions in your survey. For example, if the user answered “rainy” to a question about the weather, you can skip to the comment section in your survey. The following image shows how to set up that condition (Weather = rainy) and the Action to take if the condition is true (go to Comment section). You can have as many conditions as you want. In this case, "Weather" was the name of a question in the survey.

Expression from the msg object, from the drop-down select custom, in the text box, add something like {msg.payload.forExample} , note that you use a single mustache tag, not double, like everywhere else in the Orbita platform.

JSON Editor

The Orbita UI makes it easy to design a survey without needing to know the underlying code. However, if you can program with JSON, then you can modify the code directly to customize the survey. The JSON Editor shows what the survey looks like in code.

Test Survey

When you select Test Survey, the survey appears as it will for any other user, except that you also have the option to select another user to take the survey to get feedback from someone other than the survey designer.

After you (or your designee) complete and submit the survey, the results display in text format, as shown in the following image. You can click Test Survey Again to test for different results.

Extended Schema

Developers can customize how survey elements appear to survey authors, which survey authors use to affect how the survey behaves with survey takers. For example, you can make note of the IP address, language of the survey, give a title to the survey, and so on.

  1. Select your project in the Experience Manager and edit the URL to add the /survey

  2. Click on the vertical ellipses button against the survey you wanted to edit from the Survey listing page.

  3. Select the Extended Schema tab and add the properties and save it as shown below.

  4. You can see these properties listed under the msg.orbita.session.surveyInfo.survey.customExtendedSchema object in the payload.

See also: How do I create a schema definition? and How do I update a schema definition?

Alerts

A user’s response to a question can trigger an alert (if coded). For example, if the survey question asks a patient, “Are you feeling OK?” a “No” response can trigger a message that is added to the collected data when the survey is completed. A sample message may be “Follow up. User {{msg.orbita.user.fullname}} is not feeling well.”

Embedding a survey in your website

Orbita provides several ways to embed your survey in a skill, on a website, or mobile app. First, select the framework (Code version) that your code uses and choose Bootstrap and Display options. When you select an option, the code changes in the Scripts and styles, HTML, and JavaScript windows.

  • Code version.

    • Use Angular version.

    • Use Jquery version.

    • Use Knockout version.

    • Use React version.

  • Bootstrap

    • For Bootstrap framework.

    • No Bootstrap.

  • Display (Embed it here)

    • Show survey on a page.

    • Show survey in a window.

To embed your survey:

  1. Copy and paste the Scripts and styles code into the HTML page header section.

  2. Copy and paste the HTML code to where you want the survey to show on your page or window.

  3. Copy and paste the JavaScript code at the bottom of the page or window.

Survey Data List

The Survey Data List shows completed surveys. Click on a survey to inspect the survey results.

Related Articles