Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

external mail address forwarded to a mypurecloud.de email address within architect

  Thread closed by the administrator, not accepting new replies.
  • 1.  external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 07:38
    No replies, thread closed.

    Hi All,

    I managed to route email addresses using this expression  Lower(ToString(Email.Message.to[State.index]))

    This works when I directly email the purecloud address helpdesk@company.mypurecloud.de and its the only email address in the To: header.

    I learned that this below solution always picks the last email address in the collection email.message.to

    Now when I forward an email address helpdesk@company.com towards helpdesk@company.mypurecloud.de the above flow breaks.

    two questions here :

    1. how can manage to always grab al email addresses in the To: and route them to the relevant queues according to the data table lookup?
    2. why does the flow break when looking for helpdesk@company.mypurecloud.de email address?

    please, help is much appreciated !

    Best regards

    Jerry


    #DigitalChannels

    ------------------------------
    Jerry Sileon
    KPN B.V.
    ------------------------------


  • 2.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 08:00
    Edited by Jan Heinonen 07-12-2023 08:00
    No replies, thread closed.

    Hi Jerry,

    The To Address will remain the same even if you forward the e-mail to Genesys so you would need to look for helpdesk@company.com.

    Using the variable Email.Message.route.id should hold the address that is used for routing so that should be helpdesk@company.mypurecloud.de.

    If you wanna create a separate e-mail for each To address and route that in your flow you need to enable Route Email to Multiple Destinations, as discussed in Working With Email Headers for To Email addresses

    It would then run your flow once for each To address and you can skip the loop and only use Email.Message.route.id as lookup variable in your data table.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 3.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 10:10
    Edited by Paul Simpson 07-12-2023 10:11
    No replies, thread closed.

    Jerry,

    A couple of points that may, or may not, be helpful in this situation, but that you should consider:

    1. Collections use, I believe, a zero based index. A collection of strings of length three will have members StringCollection[0], StringCollection[1] and StringCollection[2]. Loop counters, however, start at 1, so when looping three times, the Index variable will take the values 1, 2 & 3. Therefore, your code as it appears to be written will miss the first value in the collection and the last iteration will actually be an index out of bounds. (This lines up with your observation of it only picking the last one when there are two....)
    2. You don't appear to be doing anything (other than the lookup) inside the loop. So with multiple iterations, only the final value will be stored. (Again, this lines up with you only seeing the last value captured.)
    3. I do not think you need the "Next Loop" action. Again, I may be wrong here, but I believe that is to allow you to exit the loop iteration "early" (say as the result of a condition). When execution reaches the bottom of the loop, it should return to the start automatically (if more iterations remain.)

    Not sure if either (probably the first or second!) of these observations will help you 😜



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 4.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 10:19
    No replies, thread closed.

    Regarding point 1. Loop counter will start at 0

    Current Index Data Name Use to track the current loop count, starting at 0 for the first loop and then by increments by 1 each time.

    https://help.mypurecloud.com/articles/loop-action/



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 5.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 10:37
    No replies, thread closed.

    Interesting. I looked for that very reference and couldn't find it! Your search-foo is better than mine 😉 I apologize for misleading anyone.

    Point 2 still applies, though, and is possibly the reason for the observed behavior? 



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 6.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 10:47
    No replies, thread closed.

    The 2nd point still applies, it will overwrite the variable with each loop why it will always be the last To address.

    Think the article just shows examples, all loops run until they reach max count or the index variable reaches 99, if it goes to 100 it crashes.

    The other examples requires you to have some logic to decide when it's time to exit the loop.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 7.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 11:28
    No replies, thread closed.

    I figured the other ones required "creativity". My point is that mentioning them in this way is misleading.



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 8.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 10:42
    No replies, thread closed.

    I just read that article again, and it is VERY misleading! At the top it implies that there are three different loop types to select from, equivalent to a traditional FOR loop, but also including a FOREACH and a DO WHILE (or DO UNTIL) construct. Unless I'm missing something obvious here, those latter two are not direct options. The former requires you to create code like that in this post, the latter requires some creative coding.

    Thoughts?



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 9.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 11:39
    No replies, thread closed.

    Thanks All,

    I get the Loop action now, running into another issue here , what is architect doing with alias address? I mean all addresses are routed (forwarded) mypurecloud.de but for some reason the flow doesnt always offers the interaction to the queue. And what if there are more addresses in the To: header that has to go to differents queues. I now one can do something with AddItem and GetAT. Anyone familiar with this expressions? 



    ------------------------------
    Jerry Sileon
    KPN B.V.
    ------------------------------



  • 10.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-12-2023 12:18
    No replies, thread closed.

    really confusing this , I know I am doing the rigt stuff but for some reason it doesnt get offered to the queue accordingly by the flow.

    What goes wrong , frustrated here :( please elobarate on this issue.



    ------------------------------
    Jerry Sileon
    KPN B.V.
    ------------------------------



  • 11.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-13-2023 07:51
    No replies, thread closed.

    You could save Participant Data for FindQueue(flow.queueName).id and/or FindQueue(flow.queueName).name to see if it actually finds the queue in the system or if there's a typo somewhere.

    I usually add a lot of "logging" while testing flows until they're done.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 12.  RE: external mail address forwarded to a mypurecloud.de email address within architect

    Posted 07-13-2023 07:56
    No replies, thread closed.

    Hi Jan,

    got it working now, it broke on acd skill...........if expression is selected then one should type findSkill(flow.skillName) then it works :-)

    thank you for helping me out here !!

    Best regards

    Jerry



    ------------------------------
    Jerry Sileon
    KPN B.V.
    ------------------------------