Skip to content

Amazon Connect Journey – Check attributes block going to No Match even when Lambda returns correct

0

I’m using an Amazon Connect outbound journey with a Custom action (Lambda) followed by a Check attributes block.

The Lambda returns customer data, and I’m trying to branch the journey based on the value of a field called Prior.

{ "profileId": "037511e742549c369aeaa2ac6b26", "firstName": "Hima", "emailAddress": "himaxamplecom", "Prior": "High", "blah1": "somevalue", "blah2": "somevalue", "jwt": "tokenvalue", "jwt_used": "false"Enter image description here

} Enter image description here

Even though the Lambda response clearly contains:

"Prior": "High"

the journey always goes to the No Match branch.

What I have already verified

The Lambda is executing successfully.

CloudWatch logs confirm "Prior": "High".

The journey is saved and published.

The attribute path is set to Prior under Lambda invocation → Result data.

Question

How does Amazon Connect internally structure the Lambda response for journeys?

Specifically:

What is the correct attribute path for fields returned from a custom Lambda action?

Does the Lambda response need to be wrapped in a specific structure (for example, body or attributes) for the Check attributes block to read it correctly?

1 Answer
0
Accepted Answer

Got the solution

In Amazon Connect Journeys, the Check attributes block does not read attributes directly from a plain JSON Lambda response. Instead, the journey engine expects the Lambda to return data in a CustomerProfiles-style response envelope. https://docs.aws.amazon.com/connect/latest/adminguide/lambda-invoke-functions.html

If the response is not wrapped in this structure, the journey cannot map the attributes, and the flow will go to No Match even if the values exist in the raw Lambda output.

Required response structure

Your Lambda must return the attributes inside:

{ "Items": { "CustomerProfiles": [ { "Id": "string", "Result": "SUCCESS", "ResultData": {} } ] } }

Example working response

For this specific case:

{ "Items": { "CustomerProfiles": [ { "Id": "0375e7afe842549c369aeaa2ac6b26", "Result": "SUCCESS", "ResultData": { "profileId": "037511afe842549c369aeaa2ac6b26", "firstName": " Hima", "emailAddress": "himaom", "Prior": "High", "blah1": "dddddd4545dkhghddffd", "blah2": "12dggcsdjhjhfdfsfffjkldjddadsklsf", "jwt": "tokenvalue", "jwt_used": "false" }, "Message": null } ] } }

answered 9 months ago

EXPERT

reviewed 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.