Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Script Dynamic Variable with OR

    Posted 04-15-2021 00:28
    No replies, thread closed.
    Hi,
    Is it possible to include an OR statement in a TRUE/FALSE dynamic variable, like:
    {{Sub-reason}}=="Cancellation" || {{Sub-reason}}=="Complaint"

    The above doesn't work and I've tried some variations, can't get it to work. Is it possible?
    The use case if to show a button on the script if the sub-reason selected by the agent is Cancellation or Complaint.

    Thanks!

    #ArchitectureandDesign

    ------------------------------
    Frank Gibson
    Probe Contact Solutions Australia P/L
    ------------------------------


  • 2.  RE: Script Dynamic Variable with OR

    Posted 04-15-2021 11:30
    No replies, thread closed.
    Have you tried using OR instead of ||?  Also, have you tried using Contains(Lower(Sub-reason), "cancellation") or Contains(Lower(Sub-reason), "complaint")

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Script Dynamic Variable with OR

    Posted 08-29-2021 19:01
    No replies, thread closed.
    I have tried OR and no, it doesn't appear to work. Happy to be corrected by anyone from Genesys. Would be a very useful feature.

    ------------------------------
    Angus Huckle
    Spark NZ Trading
    ------------------------------



  • 4.  RE: Script Dynamic Variable with OR

    Posted 08-30-2021 00:51
    No replies, thread closed.
    Seems to work for me
    Example

    Item1 is a normal String Variable

    And then I set a Stack's visibility to ApplesOrOranges
    When Item one is set to Apples or Oranges it displays the Stack, when its anything else it doesn't.


    ------------------------------
    Anton Vroon
    KiwiBank
    ------------------------------



  • 5.  RE: Script Dynamic Variable with OR

    Posted 08-30-2021 01:04
    No replies, thread closed.
    Actually my issue was two-fold which added to my assumption that logical operators didn't work.

    I had found another way to do what I wanted but in essence OR doesn't equal or as only or works. And as for and, that works too but not AND.

    :-)

    ------------------------------
    Angus Huckle
    Spark NZ Trading
    ------------------------------



  • 6.  RE: Script Dynamic Variable with OR

    Posted 08-30-2021 01:11
    No replies, thread closed.
    Yeah all the operands are lowercase

    https://help.mypurecloud.com/articles/expression-syntax-and-functions/
    eg:
    and
    or
    xor
    not

    and bitwise or in script is a single pipe | not double pipe ||

    ------------------------------
    Anton Vroon
    KiwiBank
    ------------------------------