Skip to content

Lex v2. Invalid conditional expression for AMAZON.Duration comparison

0

I'm trying to compare AMAZON.Duration slot value as described here https://docs.aws.amazon.com/lexv2/latest/dg/paths-branching.html In my example I use expression {logic_if_yes} < P1M and got "Invalid conditional expression in slot 'logic_if_yes' of intent 'logic_example'. Invalid expression: {logic_if_yes} < P1M" on build. I've tryed to quote duration like this - {logic_if_yes} < "P1M" and bot builds, but it this case comparison alwasy returns true. what is the correct way to compare duration type slot?

asked a year ago227 views
1 Answer
0

Hello,

Greetings! Hope you are doing good!

Thank you for reaching out!

I would like to inform you that I tried replicating the scenario from my end using "AMAZON.Duration" slot type, {logic_if_yes} < "P1M" and conditional branching and I was able to successfully replicate it.

So, I would request you to check the conditional branching, how you are defining it, also the expression that you are providing is correct as per your use case. As I won't be able to share my bot here however if you could reach out to us via a support case then any engineer will be there to assist you and share the bot as well.

Going ahead, in order to fetch more information regarding this issue and to assist you as per your use case and to look into the conditions that you are defining, I would suggest you to please raise a case with the AWS support engineering and provide the following information on the case:

  1. Please share your bot .zip export so that we can replicate this issue on our end. please follow the link below to know more about exporting your bot [ https://docs.aws.amazon.com/lex/latest/dg/export-to-lex.html#export-console ]
  2. Region where your resources are present.
AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.