Hi Marcello, thanks for your reply!
Yes, that was actually my first approach.
I added the lastAgentParticipantId != Scripter.Agent Participant ID check directly at the beginning of the Page Load Action.
The logic itself works correctly. I can also see that Scripter.Agent Participant ID changes from Agent A to Agent B after the transfer.
The problem is that the Page Load Action is not executed again for Agent B.
I verified this by adding a simple Scripter.Alert as the very first step of the Page Load Action:
- Agent A receives the call → Alert is shown
- Agent A transfers the interaction to another queue
- Agent B receives the same interaction → no Alert is shown
So after the transfer the script is still available and the built-in Agent Participant ID reflects Agent B, but the Page Load Action itself does not run again.
That is basically the part I am trying to solve: I need some event/trigger on the receiving agent side that allows me to execute the lastAgent != currentAgent logic after the transfer, without replacing or reassigning the existing script.
If there is another way to trigger a custom action when the interaction is assigned to Agent B, that would be exactly what I am looking for.
Thanks!
------------------------------
Yassin Alla
------------------------------
Original Message:
Sent: 08-17-2026 14:12
From: Marcello Jabur
Subject: Scripter – Trigger custom action after transfer to another agent
Hi Yassin, how are you?
I'm not sure if I missed something on the whole scenario that would invalidate my suggestion, but can't you simply change the "Page Load" action that you mentioned at the beggining?
Just add the logic that checks for "lastAgent != currentAgent" in there, and if the logic is returned as true you can reset all the flags, otherwise it just follows the current logic that is already in there.
------------------------------
Marcello Jabur
------------------------------