You can use a Script Action that starts on Page Load, in that action you check if the status is "connected", if not you delay for 1-3 seconds and call the script again.
Once you have the correct status you can execute for example a Data Action, and end the loop.
Now, I would suspect that this API call requires User Context as most API calls that alter ongoing conversations does.
In that case, a solution would be to have an embedded webpage, that executes the API call.
Simple way to get it to execute on connected would be to have {{Scripter.Raw Interaction State}} in the URL, and the script does nothing until you have the right status, as the page will reload on status change.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
------------------------------
Original Message:
Sent: 11-22-2023 14:42
From: Art Tumanik
Subject: Automatically play back a DTMF tone when Agent accepts an ACD call (presses 'Answer' button)
We have used {{Scripter.Raw Interaction State}} – it doesn't do the trigger at the right time.
The agent script gets loaded automatically as soon as the ACD call is OFFERED to an available agent, NOT when the agent clicks on "Answer" button.
Using the Agent Script (with the delay), DTMF will play either prematurely or too late causing the external IVR caller to be connected to the Genesys Agent when they are not ready to talk. This is simply because it is impossible to precisely predict how long a particular agent takes to accept the call (press the 'Answer' button).
Outside of the Agent Script, how would we utilize this POST API (/api/v2/conversations/{conversationId}/participants/{participantId}/digits) to trigger only when the agent ACCEPTS the call by pressing the 'Answer' button?
------------------------------
Art Tumanik
Cerium Networks
Original Message:
Sent: 11-17-2023 16:54
From: Jan Heinonen
Subject: Automatically play back a DTMF tone when Agent accepts an ACD call (presses 'Answer' button)
Hello Art,
You can use the script variable {{Scripter.Raw Interaction State}} to trigger something when the call is connected.
Instead of going through a Secure Flow you might be able to use the API to send DTMF to the other party, look at
POST
/api/v2/conversations/{conversationId}/participants/{participantId}/digits
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 11-17-2023 14:36
From: Art Tumanik
Subject: Automatically play back a DTMF tone when Agent accepts an ACD call (presses 'Answer' button)
Customer use-case: When a Genesys agent answers the ACD Call (clicks the "Answer" button), we need to play back a DTMF to the external IVR that sent us this call to the Genesys Cloud Queue.<o:p></o:p>
We have explored the Agent Script transferring to a Secure Flow that plays the WAV file, however, the Agent Script starts loading immediately when the ACD call is offered to the On-Queue agent. Different agents answer calls with different delays, making it impossible to hard-code the exact delay before transferring to Secure Flow.
<o:p></o:p>
In Genesys Cloud, is there another way to have an automatic DTMF playback as soon as an On-Queue Agent clicks on the "Answer" button? <o:p></o:p>
Is there an API that can be 'permanently listening' to the call state of all agents on the queue and run in the background the Genesys Org? <o:p></o:p>
Is there anything else that can be done outside of the Agent Script that plays a specific tone upon the call being answered?<o:p></o:p>
<o:p> </o:p>
I appreciate any thoughts or suggestions!<o:p></o:p>
#Unsure/Other
------------------------------
Art
------------------------------