Hi,
I read this article Work with expressions article but still don't understand the basics of expressions.
What should I start learning? Coding? If so which language?
Is an expression coding instructions?
Hi,
I read this article Work with expressions article but still don't understand the basics of expressions.
What should I start learning? Coding? If so which language?
Is an expression coding instructions?
Expressions are just how you write "if statements" to make decisions in an Architect flow. What condition are you having trouble writing an expression for?
This IS another example of where an expression editor sandbox or basic testing facility would alleviate a lot of the expression editor work pain points.
However, you do need to read the material and examples (again though, examples are EXTREMELY poor and not real world most of the time)
I feel the expression editor help, specially all of the functions needs an overall with much better examples of usage.
I would encourage you to share that feedback as a suggestion on the ideas portal; it's unlikely the product manager for the feature will see it here. https://genesyscloud.ideas.aha.io/
One idea for expression editor is here
I encourage the OP to vote, and any others who regularly despair at the expression editor short comings.
As for documentation updates, that seems to get little if any traction in Aha.
I could create dozens of Aha items on enhancements and short comings but when I see long running, heavily voted items left to rot you begin to think that the system does not work that well.
Hi Tim,
here's an example of a expression I'm trying to understand. The following experssion
Count(Find(Task.blockedNumbers, ToPhoneNumber(Call.Ani))) > 0
This is from [Block incoming calls from specific numbers - Genesys Cloud Resource Center](https://Blocking incoming calls)
I don't understand the logic when reading expressions, the closest thing that is familiar to me is writing HTML.
ToPhoneNumber: Converts a value to a PhoneNumber
Find: Finds all occurrences of an item in a collection and returns an Integer collection of indices where that item was found. If the item is not found, an empty Integer collection is returned.
Count: Gets the number of items in a collection.
So Task.blockedNumbers must be a collection of phone numbers (see Phone number data type - Genesys Cloud Resource Center to understand the phone number data type) and this expression is checking to see if the value of Call.Ani (see Architect built-in variables - Genesys Cloud Resource Center) is one of them.
Melissa I think you lit up a light bulb in my head!
Breaking this expression apart makes more sense!
Count(Find(Task.blockedNumbers, ToPhoneNumber(Call.Ani))) > 0
Why is the Count before the find? What is the purpose of the parentheses? (Find(Task.blockedNumbers, ToPhoneNumber(Call.Ani))) <-- why are there 3 here?
Thank you.
Basic functions pass parameters in parenthesis. So Count, Find and ToPhoneNumber are all functions. Find and ToPhoneNumber are each passed in as parameters, hence the 3 closing parenthesis.
It is basic coding so probably worth reading linked material and any basic coding site to understand fundamentals. It's straightforward when you get it, and breaking it down, spacing it out helps.
Ty. What coding language should I be looking at? Python?
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.