Status: 502 Bad Gateway
Message: The request could not be processed.
Traceback:
at ArchitectRuntime.executeAction (internal:architect:124)
at flow.executeStep (flow:88)
We’ve been trying to standardize our IVR flow using the GetExternalContactAction to pull customer data from our legacy CRM. The idea is simple: pass the calling number into the action, get back a JSON blob with the account ID, and route based on that. I’ve got the HTTP request configured in the action to hit our internal endpoint https://crm.internal/api/v1/customers?phone=${trigger.callingNumber}. The endpoint works fine when I hit it directly from Postman or a curl command in my local terminal. It returns a 200 OK with the expected JSON payload.
But when the call hits the flow in Genesys, it consistently bombs with that 502 error. I’ve checked the outbound firewall rules on our CXone instance. We’ve whitelisted the IP range for Genesys Cloud outbound traffic, and our CRM team confirms they’re seeing the requests coming from Genesys IPs. The payload is tiny, just a few hundred bytes. It’s not a timeout issue because the error comes back almost instantly.
I’m wondering if there’s something weird happening with how Architect handles the variable interpolation or the HTTP headers. I’ve tried adding explicit Content-Type: application/json headers in the action config, but no luck. Also tried setting the method to POST with a body, same result.
Here’s the action config snippet:
{
"name": "lookupCustomer",
"type": "GetExternalContactAction",
"properties": {
"url": "https://crm.internal/api/v1/customers?phone=${trigger.callingNumber}",
"method": "GET",
"headers": {
"Authorization": "Bearer ${system.token}"
}
}
}
The ${system.token} is a static bearer token for now, just for testing. Our CRM API doesn’t actually validate it yet, so that shouldn’t be the issue. Is there a known limit on the URL length or special characters in the phone number that might trigger a 502? The phone number is formatted as +12025551234. No spaces, no dashes. Just a standard E.164 string.
We’ve been stuck on this for two days. Any ideas on why the action fails while direct HTTP calls work? The logs in Genesys don’t give much more detail than the 502 status. I’m starting to think it’s a proxy issue on the Genesys side, but I can’t find any documentation on that.
Also tried using the assign action to log the URL before calling the external contact action, and the URL looks correct. The interpolation is working. So it’s definitely something happening during the HTTP call itself.
If I switch to a simple http action instead of GetExternalContactAction, does that bypass whatever is causing this? I haven’t tried that yet because the GetExternalContactAction is supposed to handle the caching and retry logic automatically. But maybe we need to roll our own HTTP call for this.
Any thoughts?