GetExternalContactAction failing with 400 when phone number is a string

I’m hitting a wall with the GetExternalContactAction in Architect. The goal is simple: look up a customer record in our external CRM using the caller’s phone number. I’ve got the Data Action configured to call our internal REST endpoint, but it keeps returning a 400 Bad Request.

The weird part is that the phone number comes through fine from the inbound flow. I can see it in the debug logs as +442071234567. But when I pass that into the Data Action, the external service complains about an invalid format. I suspect the issue is how Architect is handling the data type for the lookup key.

Here’s the JSON configuration I’m using for the Data Action:

{
 "id": "ext-contact-lookup",
 "type": "GetExternalContactAction",
 "key": "phone_number",
 "mapping": {
 "key": "{{contact.phone}}"
 }
}

The endpoint expects a string, but I’m wondering if Architect is sending it as a number or if there’s some weird encoding happening with the + sign. I tried wrapping it in quotes manually in the mapping like "'+{{contact.phone}}'", but that just breaks the JSON structure entirely.

I’ve checked the external API logs, and the request body looks like this:

{
 "key": 442071234567
}

Notice it’s a number, not a string. The leading + and 00 are gone. That’s why the CRM returns a 400. It can’t parse the integer as a phone string.

Is there a way to force the GetExternalContactAction to treat the key as a string? I’ve looked through the Architect documentation, but it’s vague on data type coercion. I’ve tried using a SetDataAction beforehand to convert it, but that seems to just overwrite the value without fixing the type.

Any ideas on how to ensure the phone number is sent as a string with the full international format? This is blocking our entire routing logic for inbound calls.