Genesys Cloud WebRTC Softphone 503 Service Unavailable on Initial Handshake via CLI Deployment

Encountering a persistent 503 Service Unavailable error when the WebRTC softphone attempts to establish the initial WebSocket connection after a fresh environment promotion. The issue is isolated to the genesyscloud_user resource configuration where the softphone_enabled attribute is toggled.

Environment details:

  • Genesys Cloud Region: AU (Sydney)
  • Terraform Provider: v2.13.1
  • Genesys Cloud CLI: v1.10.0
  • Browser: Chrome 115 (latest stable)
  • Architect Flow: Standard IVR routing, no custom WebRTC logic

The problem manifests immediately after the Terraform apply completes. The user account is correctly provisioned with softphone_enabled = true. However, when the agent logs into the Genesys Cloud Desktop or Web UI, the softphone icon remains grayed out, and the browser console logs show a 503 error on the /api/v2/users/:id/webphone endpoint.

Relevant HCL snippet:

resource "genesyscloud_user" "agent_user" {
 first_name = "Test"
 last_name = "Agent"
 email = "[email protected]"
 division_id = var.division_id
 
 softphone_enabled = true
 
 role_ids = [
 var.agent_role_id
 ]
}

Manual verification via the CLI shows the user record is correct:
genesys cloud users get --id <user_id> returns softphoneEnabled: true.

However, the WebRTC signaling server seems to reject the handshake. Restarting the Genesys Cloud Desktop client does not resolve the issue. Only a manual toggle of the softphone setting in the Admin UI (off then on) fixes it temporarily, suggesting a state synchronization lag or a missing dependency in the API call sequence during automated provisioning.

Has anyone observed this 503 specifically on initial provisioning via IaC? Is there a required delay or a specific API call order to ensure the WebRTC license pool is correctly associated before the softphone flag is set? Looking for a programmatic fix rather than manual UI intervention.