0

I'm interested in logging the entirety of the conversation between my users and the Lex bot.

Currently, I can capture the user's responses using the validation/fulfillment lambda, but how can I capture the prompts that Lex gives to the user?

Abid A
  • 7,588
  • 4
  • 32
  • 32

1 Answers1

1

You either need to:

(A) set up a proxy between Lex and the output channels to capture what Lex delivers to the user. Use Amazon Lex PostText API in the proxy to send and receive with Lex, then build your own channel connections with the proxy too.

Or

(B) build all of your response messages in Lambda and force Lex to use them, but this means you don't use Delegate nor the Lex Console prompts (even though you'll need prompts written in the console).

Jay A. Little
  • 3,239
  • 2
  • 11
  • 32
  • 1
    Interesting. It would be so much easier if they'd just pass along the previous Lex prompt in the request object! – Abid A Oct 30 '18 at 17:58
  • I agree. I've had to create tracking of these things in sessionAttributes, including `last_elicit_slot` and `last_intent` and `last_prompt` myself. Would be nice if those were built in. – Jay A. Little Oct 30 '18 at 19:06