Agora + Genesys Cloud: Forward Detected Language → speaker_locale
2026-03-20 ·
Agora + Genesys Cloud: Forward Detected Language → speaker_locale
Audience: Genesys Cloud administrator or developer building a multilingual contact center flow
Time to integrate: ~15 minutes
Date: 2026-03-20
What this does
Genesys Cloud Architect flows can detect a caller's language via the DetectLanguage or Set Language actions — setting it right at the start of the interaction. Agora's speaker_locale session parameter accepts BCP-47 natively. Forwarding what Genesys already knows unlocks precision temperature routing, improving confidence calibration by up to 13.5% ECE for native English speakers and up to 86% ECE for Germanic and high-T accent groups.
No extra language detection. No audio analysis. Just pass the signal Genesys already has.
Integration
The pattern: at the start of your Architect flow, read the detected language, then POST it to Agora via a Data Action webhook when creating the session.
Step 1: Capture language in your Architect flow
Use the DetectLanguage action (or Set Language if you set it manually) early in your inbound call flow. The result is stored as a conversation language attribute in BCP-47 format (e.g. en-US, de-DE, ar-SA).
If you're already routing callers to language-specific queues, the language is set. You don't need to re-detect it — just read it.
[Call Start]
→ DetectLanguage action (or Set Language from IVR selection)
→ language stored as conversation attribute: e.g. "en-US"
→ [Create Agora Session] ← Data Action webhook
Step 2: Create a Data Action to call Agora
In Genesys Admin → Integrations → Actions, create a new custom Data Action with the following configuration:
Request:
POST https://api.agora.ai/v1/sessions
Authorization: Bearer {{YOUR_AGORA_API_KEY}}
Content-Type: application/json
{
"speaker_locale": "${flow.detectedLanguage}",
"caller_phone": "${flow.ani}"
}
flow.detectedLanguage— the BCP-47 language set by DetectLanguage / Set Language in your Architect flowflow.ani— caller's phone number in E.164 format (optional; used as fallback if language is null)
Response mapping:
{
"session_id": "$.session_id",
"t_class": "$.t_class",
"optimal_T": "$.optimal_T"
}
Step 3: Call the Data Action from your flow
In your Architect flow, add a Call Data Action step after language detection:
[DetectLanguage]
→ [Call Data Action: Create Agora Session]
input: flow.detectedLanguage → speaker_locale
flow.ani → caller_phone
output: session_id stored as flow.agoraSessionId
Store the returned session_id as a flow variable — pass it in all subsequent Agora API calls for this interaction.
That's it.
What Agora does with it
| Language detected in Architect | Agora routes to | ECE vs baseline |
|-------------------------------|-----------------|-----------------|
| en-US, en-GB, en-AU, en-CA, en-NZ, en-IE | T=1.0 (Native EN) | −13.5% |
| de-DE, de-AT, nl-NL | T=2.0 (Germanic) | −86% |
| fa-IR | T=1.5 (Farsi) | — |
| ar-*, hi-IN, ur-PK | T=6.5 (High-T) | −84–85% |
| ta-IN, te-IN | T=3.25 + WER flag | — |
| anything else / null | T=4.0 (standard default) | baseline |
Unknown BCP-47 tags fall through to T=4.0 — no errors, no broken sessions.
Why not let Agora detect locale automatically?
Automated native EN detection via Whisper confidence signals tops out at 64% precision — not good enough for production routing. Explicit speaker_locale achieves ~95%+ precision with zero latency cost. Genesys already does the language detection work in your IVR; you just need to pass the signal downstream.
Notes
speaker_localeis session-level. Set it once at session creation; it applies to all requests in that session.- If
DetectLanguagereturns null (e.g. caller hung up early, detection inconclusive), Agora defaults to T=4.0 — safe, no action required. - If your flow doesn't use language detection today but does route callers to language-specific queues (e.g. "Press 2 for Spanish"), the queue assignment implies a locale. You can map queue name → BCP-47 and pass it via Set Language before calling the Data Action.
caller_phone(ANI) is optional. Ifspeaker_localeis null, Agora falls back to deriving a locale estimate from the E.164 country code (~80–85% precision for Native EN). This is a zero-effort fallback — Genesys exposes ANI on every inbound call.- For per-request locale overrides (multi-speaker sessions), see the Agora API spec — planned for v1.1.
Questions? → [agora docs] or reach out directly.