got it working now, it broke on acd skill...........if expression is selected then one should type findSkill(flow.skillName) then it works :-)
KPN B.V.
Original Message:
Sent: 07-13-2023 07:51
From: Jan Heinonen
Subject: external mail address forwarded to a mypurecloud.de email address within architect
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
Original Message:
Sent: 07-12-2023 12:17
From: Jerry Sileon
Subject: external mail address forwarded to a mypurecloud.de email address within architect
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.
Original Message:
Sent: 07-12-2023 11:38
From: Jerry Sileon
Subject: external mail address forwarded to a mypurecloud.de email address within architect
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.
Original Message:
Sent: 07-12-2023 10:42
From: Paul Simpson
Subject: external mail address forwarded to a mypurecloud.de email address within architect
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
Original Message:
Sent: 07-12-2023 10:18
From: Jan Heinonen
Subject: external mail address forwarded to a mypurecloud.de email address within architect
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
Original Message:
Sent: 07-12-2023 10:09
From: Paul Simpson
Subject: external mail address forwarded to a mypurecloud.de email address within architect
Jerry,
A couple of points that may, or may not, be helpful in this situation, but that you should consider:
- 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....)
- 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.)
- 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
Original Message:
Sent: 07-12-2023 07:38
From: Jerry Sileon
Subject: external mail address forwarded to a mypurecloud.de email address within architect
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 :
- 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?
- 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.
------------------------------