Genesys Cloud (formerly PureCloud)

Discussion Thread View
Expand all | Collapse all

Can we use Regular expression Wild chracter under Architeture function contains

  • 1.  Can we use Regular expression Wild chracter under Architeture function contains

    Top 25 Contributor
    Posted 6 days ago
    Hello Everyone,

     I am new to this world. Can we use Regular expression Wild characters </b, *, [0-9]{4}> under function Contains in architecture/Flow design? If not, If we wish to search some Specific number series in body of email, and put them into a Queue How can we achieve this in Genesys pure cloud?

    Additionally, Can we also Find out Which Keyword has matched in with contains Expression. If So, we can read that matched String and Print as Set Participant Data. This would make troubleshooting little easy.

    Contains(Email.Message.subject, "\BXXX\B", true)


    Rajnish Roy
    Thermo Fisher Scientific Inc
    #AskMeAnything(AMA)
    #ArchitectureandDesign
    #Integrations

    ------------------------------
    Rajnish Roy
    Thermo Fisher Scientific Inc
    ------------------------------


  • 2.  RE: Can we use Regular expression Wild chracter under Architeture function contains

    GENESYS
    Posted 6 days ago
    Can we use Regular expression Wild characters </b, *, [0-9]{4}> under function Contains in architecture/Flow design?
    No, the Contains function does not do regex.  It looks for the exact characters you specify.

    If not, If we wish to search some Specific number series in body of email, and put them into a Queue How can we achieve this in Genesys pure cloud?
    I'm not sure I understand what you want.  Use a Decision action to search for the 1st number.  If it matches (i.e. takes the Yes path), transfer to your 1st queue.  If not (i.e. the No path), use another Decision action to search for the 2nd number.  Continue for the other numbers.
    On the other hand, if you want to transfer the interaction to the same queue but want to indicate to the agent which serial number was matched, use a Screen Pop Script with an input value for the serial number that was matched.

    Can we also Find out Which Keyword has matched in with contains Expression
    No.  The Contains function simply return true or false whether the match was found.  You could use the FindString function instead to find the occurrence of the word in the string, then use the SubString function to pull it out.  Remember that FindString will return -1 if the string was not found.  Also this doesn't really gain you anything over using the Contains function.  Contains("alpha beta delta", "beta") = true so you know beta was there.  Doing string manipulation instead to pull out the actual word beta from the original string is more complicated, but still you end up knowing that beta was there.
    If on the other hand the string looks like "hello: world, good: bye" and you want to pull out the "world" without knowing what it is, you can use string manipulation to get to it, assuming you know the exact format the string is in.  For that example, Trim(Split(Split("hello: world, good: bye", ",")[0], ":")[1]).  Be careful, if the string doesn't match the format, you can end up causing an error.  If the string was instead "hello: world; good: bye" that code would have returned "world; good" instead of just "world".
    Open expression help in Architect to see all the text functions you can use for string manipulation.  https://help.mypurecloud.com/articles/function-operator-help/

    If So, we can read that matched String and Print as Set Participant Data.
    You can write any string variable to participant data that you want.


    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------