Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Request for some love for Idea "Ability to add multiple conditions to a single case."

    Posted 01-15-2024 13:23
    No replies, thread closed.

    Hi,

    I apologize in advance, but you will likely see a few messages like this from me in the next day or two. I want to keep each message thread separate!

    Many of you may not realize that Genesys has an Ideas website (Aha!) which, whilst not perfect (see various posts from me and others on THAT subject!) is the main method we have for requesting features / enhancements. If you don't frequent the site, you may miss some of the cool ideas that get proposed.

    In this post, I'd like to draw your attention to this idea. 

    The Switch operation in Architect operates in two ways. It can behave like the Selection Tool in PureConnect Handlers (basically, cascaded Conditions, where each Case is independent of the others) or it can behave like a traditional Switch / Case construct where an expression is compared to a series of values.

    There are times, however, where the latter case is desirable, but there are multiple values that lead to the same end result. In text languages, this would look like:

    Switch (Value){

    case "A":

    case "B":

    perform some action

    break

    case "C":

    case "D":

    perform some other action

    break

    default:

    a third something

    break

    }

    So values "A" and "B" have the same result, as do "C" and "D".

    This idea is therefore to allow multiple values to be added to a single case when operating in "Traditional Switch Case" mode. This can be achieved by configuring the operation in the first mode, and have

    Value=="A" or Value =="B"

    as the condition, but if only one or two cases of a larger Switch/Case require multiple values, then it's unnecessarily complex. The only way you have of seeing the whole condition is to open up the main expression editor.

    It also means that if you have a traditional Switch/Case operation, and then need to add a second condition, you have to convert the whole thing.

    Finally, it would behave like experienced programmers will expect.

    Thank you!


    #ArchitectureandDesign
    #Roadmap/NewFeatures
    #Routing(ACD/IVR)

    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------


  • 2.  RE: Request for some love for Idea "Ability to add multiple conditions to a single case."
    Best Answer

    Posted 02-17-2024 23:08
    No replies, thread closed.

    Paul, have you looked at velocity macros through a data action or JSON parsing for something like this?  Yes, that is a great idea and needs more votes and use cases, but essentially, you are looking for and If-Then-Else that looks at an array match.  I have not tried but does this work:  ( var1 == 5 ) or (var2= 4 )



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Request for some love for Idea "Ability to add multiple conditions to a single case."

    Posted 02-18-2024 14:02
    No replies, thread closed.

    Robert,

    Thank you for you response!

    Yes, your suggestion works and is how we have to do it ow, however it is far from optimal.

    Firstly, it requires you to use the Switch statement in the "Handlers Style" rather then the "Traditional Switch-Case Style".

    Secondly, when you look at the code, you have to go as far as using the expression editor to see the full statement, as there isn't enough room in the edit box that is displayed within the operation.

    Thirdly, this can lead to unnecessarily complex code. Say, for example, you have 5 DNIS's which you need to examine and switch based on their value, between 2 options (say two take the same path - perhaps a Local and a Toll-Free Number.) Now, with the current system, you would be required to have multiple Call.DNIS = "xxx" statements, just so one of the options can have the OR statement in it. With my idea, you could use the "Conventional" Switch and simply have two Case values for the same option. (I'm perhaps not explaining myself very clearly here!) That's how it works in most programming languages.

    Coupled with the ability to name Case statements, it has the possibility to drastically reduce code complexity as well as make the logic more transparent.



    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------



  • 4.  RE: Request for some love for Idea "Ability to add multiple conditions to a single case."

    Posted 02-18-2024 23:03
    No replies, thread closed.

    Totally agree.  I didn't say it was ideal, but a workaround is just that - something to work around the problem. 



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------