VOGO Voice – Knowledge Base

If/Else

Estimated reading time: 2 min

Components are the key elemental building blocks that form the crux of the interaction builder platform. The right selection of components is a major requisite for building voice responses capable of delivering a personalized experience for the user throughout a conversation. If/Else is one of the many components when used in combination with other counterpart cards can aid in structuring the desired interaction flow. It mimics the functionality of the Check Variable component that makes use of the condition, ‘then’ or ‘otherwise’ which emulates the principle controlling a program flow driven by the If/else JavaScript conditional statement. The yellow color assigned to the If/Else card suggests that it is a condition or decision-making component.

This user-centric guide delineates the anatomy and progresses towards outlining its configuration in a flow. To help you get started, the comprehensive guide, on the whole, presents when to employ the component in addition to its relevance within a session.

Prerequisites 

  • VOGO Voice account: https://www.vogovoice.com/
  • Access rights to the Interaction builder platform.
  • Knowledge in relational operations.

How to access the ‘If/Else’ component

Navigate to the interaction builder platform of VOGO Voice to access the If/Else under the Components section. Click on the component, then drag and drop it onto the flow canvas.

Click the Edit symbol on the top right-hand side of the component card to configure it with the required number of conditions and set each of those conditions with an appropriate relational operator. 

Purpose and Relevance of the ‘If/Else’ Component

If/Else, one of the decision-making components on the interaction builder platform when implemented helps to execute the decision-making process crucial to the interaction flow. Its function is rendered with the aid of multiple conditions by selecting from among the different relational operators set within this component. 

The Configuration window offers the ability to input values in the right and left-hand side fields with a suitable relational operator to test the set condition in addition to selecting from its respective drop-down list the relevant data type of the chosen values as shown below. To know more about data types, click here.

👍 Note: To add a new condition click on the plus button. Also, one can create any number of conditions using a single If/Else component.

👍Note: If Condition 1 is satisfied, then the remaining conditions will remain unchecked and the pathing will proceed from the first alone. But, if Condition 1 upon being tested returns false then it will continue to Condition 2 and carry on likewise if more conditions are added until one of the set conditions is satisfied. Therefore, based on satisfying the conditions, the subsequent flow will proceed. Yet, if all the conditions remain unsatisfied, then the successive pathing will route from Default.

An If/Else component is often made use of to replace multiple Check Variable cards and thus reduce the number of components within an interaction flow. With the usage of a Check Variable component, only two pathing can be attained, whereas by using If/Else multiple pathing is made possible. The flexibility of setting numerous conditional statements within this card allows competent multi-branching of an interaction flow, thereby enabling the delivery of tailored voice responses specific to the choice-based actions made by the end-user while interacting with the custom skill.

Tags:
Was this article helpful?
Dislike 0
Previous: Switch Interaction
Next: Speech Synthesis Markup Language (SSML)