0

Is there a way to call an Intent in without saying the utterance to begin said intent in the aws-lambda function and also to call a specific slot and get a user's input to update said slots value.

Example code:

https://i.stack.imgur.com/5Q2mh.jpg

Currently, I manage to get to the SocialType slot by using slot confirmation. However, I am trying to get to the QuestionA slot and gaining a value based on this slot through the lambda function as the prompt will be a randomly generated one based on the users previous response.

Additionally, is it possible to get to the IntellectualState intent via the SocialIntent.

Jay
  • 53
  • 1
  • 2
  • 7
  • did you try `this.emit('YourIntentName')` – bgsuello Apr 27 '18 at 13:23
  • @bgsuello Yes, I tried that and it didn't work. Which is why I was wondering if there was a special way of doing it (e.g. this.emit('PhysicalState')) – Jay Apr 29 '18 at 22:36
  • how about the `this.emitWithState('PhysicalState')`? this will also pass the attributes in the current state to the `PhysicalState` – bgsuello Apr 30 '18 at 00:02
  • @bgsuello That didn't work either :/ I got an error message saying "There was a problem with the requested skills response" – Jay May 01 '18 at 16:23
  • I am still confused with what you are trying to do ? Do you want to maintain slot values through session? – Guru May 02 '18 at 17:46
  • @Guru I am trying to call an intent from another intent without explicitly saying the utterance of the intent. For instance, if a yes or no question is posed at the end of an intent it would allow the user to go to any chosen intent. – Jay May 03 '18 at 07:27

1 Answers1

0

Each intent will be triggered by their own utterances and their slot values and I don't think there is a way to call one intent from the other.

Depending on what the user says the particular intent will be triggered and the request would be sent with that particular intent name.

However the best logic to handle this would be on your backend API (lambda) and using session variables which are maintained in the session. By using those you will be able to determine the state and also handle which intent (logic of code in your API) you need to handle at the end of the intent.

More on session object

Guru
  • 1,653
  • 1
  • 7
  • 14