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