Designing the Factly Skill

We hope that the discussion in the last section should have given you a fair idea of the motivation behind the Factly Alexa Skill. Now, we shall level up and design the actual Factly Skill. It is always better to design before coding anything because it gives us a clarity about the end goals of the software and the finer details, which we may otherwise miss when we actually code the software.

The Factly Alexa Skill is a simple quiz skill. At the code level, the Factly Skill/Lambda will contain a bank of questions that will be presented to the user one by one. The skill will further perform depending on the user's reply.

Factly will work via the following steps:

  1. The user will launch the Factly Skill via a standard Alexa Skill launch utterance.
  2. Alexa will confirm the launch and provide a brief introduction to the skill and play method:
Figure 4.7: Step 1 – Factly, launch

The skill that we will design will consist of three trivia questions and each question will have four answer choices, with only a single choice being the correct one.

  1. Alexa will begin the quiz by asking the first question:
Figure 4.8: Step 2 – Factly, questionnaire
  1. The user can provide the answer by just saying the number of the correct answer, for example: "The answer is 3" or just "3":
Figure 4.9: Step 3 – Factly, answer acknowledgment

Depending on the user's answer, the skill will provide a response that the answer is correct or incorrect.

  1. The user can also end the session:
Figure 4.10: Step 4 – Factly, conclusion
  1. Steps 4, 5, and 6 will be repeated until all the quiz questions have been exhausted or the user decides to end the session.

The interaction flow can be expressed in terms of a VUI diagram:

Figure 4.11: Factly, VUI flow

Also, the overall information flow of a typical quiz session can be mapped out as follows:

Figure 4.12: Factly, data flow

Also, we can map out the flow of data in the skill as per the following diagram:

Figure 4.13: Factly, information flow

With our data flow in place, now it is time to code the actual Factly Skill.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.77.149