Reference Turnkey Applications Tutorials Visual Designer
    • REST API
      • Overview
      • API Endpoint
      • Authentication
      • Requests
      • Responses
      • Paging
      • Reason Codes Dictionary
    • Management APIs
      • Accounts
      • Identity Access Management Early Access
        • Identity Access Management Overview
        • Identity Access Management API
          • User Management
            • Create a User
            • Update a User
            • Retrieve a User
            • Delete a User
          • API Keys Management
            • Create an API Key
            • Update an API Key
            • Retrieve an API Key
            • Delete an API Key
      • Applications
      • Clients
        • Create a Client
        • Delete a Client
        • Change Client’s Password
        • Get a List of Available Clients
      • Incoming Phone Numbers
        • IncomingPhoneNumber Instance Resource
        • IncomingPhoneNumbers List Resource
        • Local IncomingPhoneNumber Factory Resource
        • Toll-Free IncomingPhoneNumber Factory Resource
        • Mobile IncomingPhoneNumber Factory Resource
        • Attach a phone number to an application
        • Delete a phone number
        • List of Phone Numbers
        • Incoming Phone Number Regex Support
      • Notifications
      • Usage Records
    • Voice
      • Calls
        • Call List Resource URI
        • Making a Call
        • Modifying Live Calls
        • Examples
        • List Filter
        • Paging Information
      • Conference Management
        • Supported Operations
        • Conference List Resource URI
      • Conference Participants Management
        • Participants List Resource URI
      • Gather DTMF
      • Gather Speech
      • Say
      • Play
      • Hold
      • Recordings
      • Refers
        • Resource Properties
        • Supported Operations
        • Paging Information
      • Resume
      • SIP Refer Support
    • SMS
      • Messages
        • Send SMS
        • Get SMS List
        • Get single SMS Information
        • SMS Attributes
      • Email
    • RCML
      • Overview
        • Interacting with Your Application
        • RCML Verbs
      • Dial
        • Client
        • Conference
        • Number
        • SIP
      • Email
      • Gather
      • Say
      • Play
      • SMS
      • Hold
      • Resume
      • Hangup
      • Pause
      • Redirect
      • Record
      • Reject
      • Refer
    • Visual Designer API
      • List Application Templates
      • :List a Specific Application Template
      • Create a Visual Designer Application
      • Get Application Details
      • Save Application Changes
      • Create Application Parameters
      • List Application Parameters
      • Delete Application Parameters
      • Upload Application Media Files
      • List Application Media Files
      • Play Application Media Files
      • Delete Application Media Files
      • Get Application Logs
      • Delete Application Logs
      • Get Application Settings
      • Modify Application Settings
      • Rename an Application
      • Delete an Application
      • Get Visual Designer Configuration
    • Turnkey Apps APIs
      • Smart 2FA
        • Sending One-Time Passwords
        • Verifying One-Time Passwords
        • Cancel One-Time Passwords
        • Session Detail Record (SDR)
        • Get list of One-Time Passwords
        • Get a Single One-Time Password
        • Usage Record One-Time Passwords
        • Common Response Error Code
        • Limit
          • Create Limit
          • Update Limit
          • Delete Limit
          • Get List of Limits
      • Call Queuing
      • Auto Attendant
        • Users
        • Announcement
        • Auto Attendant System
        • Menu
        • Schedule
        • Phone Number
        • Usage Records
        • Third Party Integration
      • Number Masking
        • Application
        • Mask Number Pool
        • Context
        • Participants
        • Interactions
        • Usage Records
      • Task Router
docs 1.0
  • docs
    • 1.0
  • docs
  • Making decisions with Control element

Making decisions with Control element

Control element performs basic tasks based on a set of conditions. It is the equivalent of a if-then control structure in developer terms. In consists of conditions and actions. If the conditions are met the actions are exetuted.

Conditions

A set of conditions defines all the prerequisites in order for the actions to be executed. Each condition can be valid or not (true/false). It supports common comparison operations equals, not equal, greater, greater or equal, less, less or equal for both numeric and string operands. In addition, regex match, a handy regular expression matching operation is supported too.

Operations

equals, not equal, greater, greater or equal, less, less or equal
equal_operation

Compares the two operands. The comparison can be numeric "123" or text based "ABCD". For numeric comparisons, the operands should be convertible to numbers (floats supported). For text based comparisons any operand will do.

Comparison type - Text & numbers

When comparing, treating operands as numbers or text will not always render the same result. For example, 4 is less than 05 but at the same time '4' is greater than '05'. Make sure you are always using the right comparison type. You can switch between comparison types using the ABCE/123 link right after the operands:

switch_comparison_type

regex match

regex_match_operation

Tries the to match the text parameter against the regular expression in the pattern parameter. If a match is found it evaluates to true. Note that no Visual Designer expression expansion takes place for the pattern parameter.

Handling many conditions

revaluate_conditions_with_AND

For a single control element more than one conditions can be evaluated. If many conditions are given, each one of them will be evaluated individually and all results will be combined to determine the status of the whole complex condition. This can be done in two ways. Either All conditions should stand (AND operation) or Any condition should stand (OR operation).

In the screenshot above, both $date should equal '20160101' and $core_From should start with '555' in order to have the whole control element evaluate to true.

No conditions present

In case there are no conditions present, the whole Control element will evaluate to true and proceed to the execution of the actions.

Actions

A number of tasks to be executed sequentially if the condition(s) evaluate to true.

Assign action

Introduces a new variable and assignes it the value of the expression on the right.

assign_action

The text box on the left with the → icon holds the name of the variable (note that no '$' character should be included here). A typical Visual Designer expression can be typed in the right side.

Variable scope

The scope of the variable (i.e. for how long it will last) can be selected by clicking on the blue link inside the text box.

assign_choose_variable_scope

In the screenshot above, tel variable is set to Application scope (i.e. last throughout the whole lifecycle of the application).

Continue-to action

Diverts the flow of the application to the specified module. All consequent actions are ignored.

continue-to_action

In the screenshot above, the flow of the application is dieverted to the Sales module when the action is executed.

Capture action

capture_action

Captures part of the Visual Designer expression in text according to pattern and assigns the captured value to a variable. Use a pair of parenthesis to designate the captured segment.

capture_year

In the screenshot above, the 'year' part is isolated out of a date literal and assigned to a year (application-scoped) variable.

The use of a single pair of parenthesis is obligatory inside the pattern parameter. Also, only literal regex patterns are supported in this parameter. No Visual Designer variable expansion will take place.

Ordering actions

The order of actions is significant. They will be executed one-by-one until the last action is complete, a Continue-to action is executed or an error occurs. The order of actions can be altered using the re-order buttons on the far right of the row:

action_reorder

Make sure to include only a single Continue-to action in a control element and always make it last.

Platform

Programmable Voice

Programmable SMS

Turnkey Applications

Smart 2FA

Call Queue

Auto Attendant

Number Masking

Task Router

Campaign Manager

Learn

Terms And Conditions

About

ABOUT

CONTACT US

© 2020, All rights reserved.