Kanika Agarwal
Kanika Agarwal

Reputation: 201

error: No usable messages given the current slot and sessionAttribute set

I made a chatbot in lex and for one particular intent, Lex is throwing the error,

An error has occurred: Invalid Bot Configuration: No usable messages 
given the current slot and sessionAttribute set.

This error comes regardless of the input in case of that intent. I am not using any lambda functions at this point for this intent. Can someone guide me what this means? I am new to lex and I did not find references to what this error is about.

Upvotes: 7

Views: 6748

Answers (3)

Wilfredo Pomier
Wilfredo Pomier

Reputation: 1121

Recently I got the same error with the test of my bot after saving some changes. After a while, finally, I found out that it was because my confirmation message was using some slots not defined at that point.

Example:

Let's assume we have:

  • one required slot {name}
  • one optional slot {age}
  • and the confirmation message is "Your name is {name} and your age is {age}, is that right?"

If Lex reaches the point to ask for the user confirmation and {age} was never assigned whether in any utterance or a lambda function, then Lex will return this error.

You must ensure that all slots used in messages are defined.

Upvotes: 10

Amaioka
Amaioka

Reputation: 61

when I had the error it was because my response was attempting to use a slot that I had deleted {reward}, check your response to make sure you are not attempting to add an inactive slot. Also, Make sure your intent is set to the Latest version.

Upvotes: 0

Jay A. Little
Jay A. Little

Reputation: 3287

I believe this error occurs because you have not configured Lex to have a response message set for that particular intent's CodeHook or Fulfillment.

If you are not using a Lambda Function for Fulfillment, be sure to select 'Return Parameters to Client' in the 'Fulfillment' section, then also supply a response message below that in 'Response' section.
Here's where to find that in the Lex Console:

Lex Console Return Fulfillment Response

Upvotes: 1

Related Questions