Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Scripter – Trigger custom action after transfer to another agent

    Posted 5 hours ago

    Hi everyone,

    I'm looking for a supported way to trigger a custom action in a Genesys Cloud Agent Script when an existing voice interaction is transferred to another agent.

    Our current setup works like this:

    • Agent A receives the interaction.

    • The assigned script opens correctly.

    • A Page Load Action performs some initialization and pushes one or more URLs.

    • We store flags such as URL1_Pushed = true to prevent the same URL from being pushed again if the script is reloaded.

    • The interaction is then transferred to another queue and Agent B receives it.

    The issue is that Agent B does not receive the URL push.

    During testing we found that:

    • Scripter.Agent Participant ID correctly changes from Agent A's participant ID to Agent B's participant ID.

    • The existing script and its conversation input/output variables are retained, which is exactly what we want.

    • However, the Script Page Load Action is not triggered again for Agent B.

    • Therefore our initialization logic is never executed for the new agent.

    We already have logic that could detect the agent change:

    lastAgentParticipantId != Scripter.Agent Participant ID

    If this logic runs, we can reset the URL push flags and execute the URL push once for the new agent while still preventing duplicate pushes after a script reload.

    What we are missing is the actual trigger.

    Is there a supported Scripter event or mechanism that can invoke a custom action when an existing interaction is assigned to a new agent after a transfer?

    For example, something equivalent to:

    • OnInteractionAssigned

    • OnTransfer

    • OnAgentParticipantChanged

    The important requirement is that we want to keep the originally assigned script and the existing conversation/script variables. We do not want to replace or reassign the script through Architect just to trigger the initialization again.

    Has anyone implemented something similar, or is there a supported Scripter mechanism for this scenario?

    Thanks in advance!


    #ArchitectandDesign
    #Omni-ChannelDesktop/UserInterface
    #System/PlatformAdministration
    #Other

    ------------------------------
    Yassin Alla
    ------------------------------


  • 2.  RE: Scripter – Trigger custom action after transfer to another agent

    Posted 3 hours ago

    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
    ------------------------------



  • 3.  RE: Scripter – Trigger custom action after transfer to another agent

    Posted an hour ago
    Edited by Yassin Alla an hour ago

    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
    ------------------------------