Creating web chat with assigned Agent (Feature similar like callback but without phone number)

Hi Dev Forum,

I try to create flow
Agent using interaction widget with external app schedule there a future call for specific Genesys agent. What I want to archive is that at a specific time in future when client connect to an external app I want my Genesys agent to receive new conversation. Currently, I try to do it by create a conversation with POST /api/v2/webchat/guest/conversations, but I can't assign a specific agent there so I create new queue where no agents are assigned and by using endpoint /api/v2/conversations/{conversationId}/assign I assign conversation for my agent. I believe there is a better solution for that problem. This one create problems when agent is off queue. Any suggestions how to handle it? I know callbacks would be great for that, but from what I see there is required for phone number. Also, there is any way to schedule conversation for agent? That I can get info about his schedule and know when he is busy?

I would not suggest that you try to assign interactions to agents using the API because, as you've found out, there are going to be too many edge cases for your deal with.

Instead I would be using Preferred Agent routing to attempt to target the agent that should handle the conversation: Advanced routing overview - Genesys Cloud Resource Center. With preferred agent routing you can build logic around whether to wait indefinitely for the preferred agent or whether you route the interaction to another agent if the preferred agent won't be available for some threshold of time.