6

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.

Kanika Agarwal
  • 191
  • 1
  • 4
  • 9
  • If you new to Lex I have a full video on the same- https://youtu.be/bhBmiJVdATE . It will help you to setup – Vijayanath Viswanathan Feb 19 '18 at 13:08
  • in my case I simply made a typo in a "Confirmation" template string. My slot name was `contactDate`, but mistakenly I have typed within template `Thank you for providing us with date {contactDay}`. That cause this error for me. – Dimitry K May 01 '18 at 20:01
  • Thanks @Dimitry. I checked and there was a similar error for me too. Got resolved – Kanika Agarwal May 02 '18 at 08:06

3 Answers3

7

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.

Wilfredo Pomier
  • 1,091
  • 9
  • 12
1

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

Jay A. Little
  • 3,239
  • 2
  • 11
  • 32
  • Thank you for the help, but the error is persisting, even after defining response message. I am not using lambda functions fro validation or fulfillment. I am returning parameters to client for fulfillment.What could be the problem. – Kanika Agarwal Feb 19 '18 at 13:16
  • Hmmm, can you give more data about the set up of your intent? Such as Slots? Which slots are required? Please make sure you have elicit messages for every slot. That would be my next guess. – Jay A. Little Feb 19 '18 at 21:39
  • My understanding about Lex, Sequence matters while creating the BOT.Suppose you have created the intent and then you are working with the slots. First slot is created and then while working on the second slot I go back to the First slot and make changes. So, there is a possibility that you can face the same issues/challenges. – Dileephell Mar 07 '18 at 13:39
0

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.

Amaioka
  • 61
  • 3