Architect GetExternalContactAction: Phone number lookup failing with 404

Trying to wire up a GetExternalContactAction in Architect to pull customer data from our REST API based on the calling party’s phone number. The endpoint works fine in Postman, but the data action keeps returning a 404 inside the flow. I’ve verified the request body is correct. Here’s the configuration JSON I’m using for the action:

{
 "name": "Lookup Customer",
 "type": "GetExternalContactAction",
 "configuration": {
 "method": "GET",
 "uri": "https://api.internal.example.com/v1/customers/lookup?phone={{contact.phoneNumbers[0].phoneNumber}}",
 "headers": {
 "Authorization": "Bearer {{sys.environment.token}}"
 }
 }
}

The contact.phoneNumbers[0].phoneNumber resolves to +2348012345678 in the trace logs. The external service expects the phone query param. I’ve checked the network logs on the server side and the request never hits it, which suggests Architect is dropping it before sending or failing to resolve the template variable correctly.

Environment specs:

  • Genesys Cloud Org: Production
  • Architect Version: Latest
  • External API: Node.js Express running on AWS ECS
  • Action Type: GetExternalContactAction
  • Error: HTTP 404 Not Found (logged in Architect trace)

Any idea why the template variable isn’t resolving in the URI string?

You’re probably hitting the 404 because the URL isn’t fully resolved. Architect doesn’t just append the phone number to the base URL; it expects a complete path in the url field. If you’re using a variable for the phone number, make sure it’s formatted as a proper query parameter in the URL string.

Check your JSON config. It should look something like this:

{
 "name": "Lookup Customer",
 "type": "GetExternalContactAction",
 "configuration": {
 "method": "GET",
 "url": "https://your-api.com/customers?phone={{conversation.from.phoneNumber}}",
 "headers": {
 "Authorization": "Bearer {{externalContact.token}}"
 }
 }
}

The {{conversation.from.phoneNumber}} part is crucial. If you just put the variable in the URL without the query syntax, it might break the path. Also, double-check that your API actually accepts the phone number format Genesys sends (usually E.164). If your API expects +15551234567 but Genesys sends (555) 123-4567, you’ll get a 404 because the record doesn’t exist. Try logging the actual request URL in Architect to see what’s being sent.

The docs state: “The url field must be a fully qualified HTTPS URL.” You’re likely hitting that 404 because Architect is interpreting the path relative to the Genesys Cloud platform instead of your external host, or the variable isn’t resolving before the HTTP call is made.

I’ve seen this exact issue when the phoneNumber variable contains formatting characters like spaces or dashes. The external API expects a clean E.164 string, but Architect passes the raw display number from the inbound call. You need to strip it first.

Here’s how I structure the action to avoid this. Notice the path parameter usage instead of hardcoding the ID in the URL, and the explicit method.

{
 "name": "Lookup Customer",
 "type": "GetExternalContactAction",
 "configuration": {
 "method": "GET",
 "url": "https://api.yourdomain.com/v1/customers",
 "path": "/{phone}",
 "headers": {
 "Authorization": "Bearer ${secure_token_var}"
 },
 "queryParameters": [
 {
 "name": "phone",
 "value": "${clean_phone_number}"
 }
 ]
 }
}

Wait, the config above is slightly off for GetExternalContactAction. The correct field is url and you append the variable directly if using a static base, or use the path variable substitution. The critical part is the secure_token_var. If you are using Client Credentials, ensure the token hasn’t expired. The docs state: “OAuth tokens must be valid for the duration of the interaction.”

Also, check the responseMapping. If your API returns { "data": { ... } } but you map to customerName, it will fail silently or return null, which might look like a 404 in the logs if the action fails to parse.

Try logging the raw response from the action in a debug block. You’ll see if it’s a network 404 or a parsing error. The variable ${clean_phone_number} must be set in a previous action, ideally using the StringManipulationAction to remove non-digits.