diff --git a/lex-web-ui/src/store/actions.js b/lex-web-ui/src/store/actions.js index ac4f2c93..4eee5941 100644 --- a/lex-web-ui/src/store/actions.js +++ b/lex-web-ui/src/store/actions.js @@ -572,6 +572,14 @@ export default { .then((response) => { if (context.state.chatMode === chatMode.BOT && context.state.liveChat.status != liveChatStatus.REQUEST_USERNAME) { + context.dispatch('setSessionAttribute', { + key: 'previousUtterance', + value: message.text + }); + context.dispatch('setSessionAttribute', { + key: 'previousLexResponse', + value: response.message + }); // check for an array of messages if (response.sessionState || (response.message && response.message.includes('{"messages":'))) { if (response.message && response.message.includes('{"messages":')) {