Hello everyone,
We're currently working on controlling Genesys Cloud with APIs and ran into a weird issue when assigning multiple inbound calls to the same agent.
Here's what we're doing:
• When an inbound call comes in, we queue it with unique skills attached.
• No agent has these skills initially, so the call sits in the queue until we manually assign it using the Assign API.
• For regular inbound calls, this works perfectly fine.
However, when two or more calls are assigned to the same agent, we see strange behavior.
Here's the API sequence:
1. First call comes in - we assign it with the Assign API:
```
curl --location 'https://api.usw2.pure.cloud/api/v2/conversations/{conversationId}/assign' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
"id": "{agentId}"
}'
```
All agents have auto_accept enabled, so the call is connected immediately.
2. Second call comes in - before assigning it, we place the first call on hold:
```
curl --location --request PATCH 'https://api.usw2.pure.cloud/api/v2/conversations/{conversationId}/participants/{participantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
"held": true
}'
```
3. Assign the second call to the same agent:
```
curl --location 'https://api.usw2.pure.cloud/api/v2/conversations/{conversationId}/assign' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
"id": "{agentId}"
}'
```
4. Patch the agent participant to change their state to connected:
```
curl --location --request PATCH 'https://api.usw2.pure.cloud/api/v2/conversations/{conversationId}/participants/{participantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
"state": "connected"
}'
```
The issue:
We expect the second call to connect automatically, but the last PATCH request seems to be ignored. The call just sits in the UI, and the agent has to manually click the Answer button. If the agent doesn't click, they are eventually moved to the Non-Responding status.
Interestingly:
• If the agent manually clicks Answer once, all subsequent calls connect properly via API without needing manual intervention - until the agent hangs up their last call.
• After hanging up, the problem reappears for the next new call.
We're using Genesys Cloud APIs + Genesys Cloud UI.
Has anyone else faced this? Any advice or insights?
Thanks in advance!#PlatformAPI------------------------------
Brent Creager
Unknown
------------------------------