- Newest
- Most votes
- Most comments
The list of attributes that Lex returns to back to contact flow are listed in the URL here: https://docs.aws.amazon.com/connect/latest/adminguide/connect-attrib-list.html#attribs-lex-table
The captured utterance is not one of them. I can suggest some methods but I can only think about some Lambda based integration.
Might as well ask, what's the use case you trying to achieve?
Hi Ricky,
To capture the user's initial spoken input in Lex, you can retrieve it like this:
first_input = event.get("inputTranscript", "").strip().upper() or event.get("rawInputTranscript", "").strip().upper()
This captures the first utterance regardless of the intent — even if it's handled as a FallbackIntent, the input is still available.
Once the user provides input, you can handle that initial interaction directly. For example, asking for a full name like "Juan Perez Martinez" using multiple slots can be tricky. With first_input, you already have the raw transcription ready for processing.
I recommend storing this value in session attributes, for example: session_attributes["captured"] = "200"
This way, you can mark that the initial input was captured and ensure first_input is not reused later in the flow.
Relevant content
- asked 2 years ago
