Hi Reginald,
- Option 1: I was thinking about using Data Action on a Page Load Action but unfortunately Data Actions can not manipulate conversations such as Transfer, Hold, Mute... since they rely on OAuth Client Credentials. Conversations resources require a user context.
- Option 2: When using Consult Transfer built-in scripter action, you should be connected to the active voice conversation first, otherwise it won't work
Since you are triggering the Consult Transfer on Page Load Action, the script will execute this action even before the call gets connected to the agent.
That is why you are running into the failure "Failure to consult transfer interaction"
By the way, I reproduced this issue on my end, and below the error message I got:

As you can see, the script pop up when the call arrives, then directly executes the Consult Transfer even before I accepted the incoming interaction, that is why I was not a connected participant on the call
yet.
What I can suggest is 2 workarounds that I tested on my side and it is working fine.
First workaroundIf you activate the
Auto Answer on the agents profiles, the call will be directly answered as soon as the script loads and it works fine.
Second workaroundif for some reason, you don't want to activate the Auto Answer, you can try the below:
Instead of executing the Consult Transfer on Page Load Action, you can create and execute a custom action.
Inside this Custom Action, you need to check first if the call is connected to the agent or not (to avoid executing the transfer during the alerting time)
When the call is connected to the agent, then you can make your transfer, otherwise just add a delay and then re-check again (kind of creating a loop)
Below a screenshot of the custom action mentioned above:
Note:
- I was using a delay of 1 sec in order to avoid any blocking task or loop infinitely
-
Connected is a value of a built-in scripter variable called
Scripter.Interaction State. It returns
Connecting, Connected or
DisconnectedThis value depends on the language set on the agent profile preferences (in my case it is English). it won't work if an agent has his profile in french for example, since the value of the state variable will be translated to
Connecté.
I hope someone in the community can add more comments/remarks :)
Let me know if you have more questions !
Kind Regards,
Charaf
------------------------------
Charaf Eddine Chemlal
NTT France SASU
------------------------------
Original Message:
Sent: 02-04-2022 12:48
From: Reginald Sheraton
Subject: Consult Transfer via Script
Hi all,
not sure if this is available or what i am not doing correct, any assistance will be appreciated.
i have a requirement to build a Agent Script and require any of the below:
- Option 1: Don't think this is available but customer requested and needed to make sure. On Page Load Action, customer require the caller to be placed on Hold while the agent performs either a consult or blind transfer
- Option 2: On Page Load Action, a consult transfer should be initiated and caller will be placed on hold. i am able to configure a consult transfer on Page load to an external number but i am getting and error when script loads, "Failed to consult transfer interaction"
any advise\suggestions?
#Implementation
------------------------------
Reginald
------------------------------