Advance "How Do I?"
1. How do I generate an OTP for call verification?
Not directly, but we can do the following:
$sys.time provides value like:
18:40:44.165
We can use the “Regex Extract” to extract the last 3 digits (milliseconds) using Regex
.([0-9]{3})
and the last digit of seconds([0-9])\.
, that is 4.165 and save it in $flow.key.otp_1 and otp_2Concatenate both to create a 4 digit OTP.
How to do it:
Operation Widget Overview(Kindly Ignore the Operand $sys.datetime in the snippet below → It’s $sys.time only.
2. Input
3. $flow.key.otp_1
4. $flow.key.otp_2
5. $flow.key.otp
2. How do I say an amount in Lakhs & Crores with Google TTS?
Google TTS does not play Lakhs and Crores in English language. It does play the same in regional languages like Hindi.
To get Google TTS to play Lakhs and Crores, we’ll have to divide the lakh part and thousand part, and then play them separately. This can be achieved by using the Operation Widget which has modulus, subtraction and division operators in Number Manipulation.
We also need to add a Decision Widget to check if the amount is > 1,00,000. If not, keep $flow.key.amount_text = $flow.key.amount only.
Final Flow:
Decision Widget
If ($flow.key.amount >= 100000)
Operation Widget
$flow.key.amount = 350000
$flow.key.thousands = $flow.key.amount % 100000 = 50000
$flow.key.lakhs = ( $flow.key.amount - $flow.key.thousands ) / 100000 = (350000 - 50000)/100000 = 3.5
$flow.key.amount_text = Play “$flow.key.lakhs Lakh and $flow.key.thousands” → “3 Lakhs and 50000”
Else
Operation Widget
$flow.key.amount_text = $flow.key.amount
Play Widget
Play “Your amount is $flow.key.amount_text”
For $flow.key.amount_text = 350000, it will play
“Your amount is 3 Lakhs and 50 thousands”
For $flow.key.amount_text = 90000
“Your amount is 90 thousands”.
Screenshots:
Decision Box:
Operation Widget:
This document has been developed by Phonon.io for the sole and exclusive use of the customer / prospective customer with whom this document is being shared. Further, this document has been provided by Phonon.io to the recipient in good faith and based on request from the recipient for the same. This document is a confidential document and contains confidential product technology, workflow and commercial details that are for the sole usage of the intended recipients of this document. Recipients are advised not to share this document with any third party that is not the intended recipient of this document and neither to bring this document in full or parts into the public domain. Any unauthorized access may be brought to Phonon.io’s notice immediately. Phonon.io is free to take any legal action it deems necessary against any person or entity that violates this confidentiality agreement. Phonon.io is bound and governed by the rules of the state of Gujarat in India. In case you are not in agreement with the terms set in this clause or are not an intended recipient of this document, please destroy the document and intimate us of the same at info@phonon.io.