Is there a way to get the actual Alexa utterance (the actual question or phrase user has asked) using JOVO? I need to alter the speech output based on that. Here is a use case scenario:
Variations:
Utterance: How many active coupons
Alexa: At present, you have 2 active coupons. Do you want more details?
Utterance: Yes
Alexa: Currently you have 2 active coupons running. WINTER20 with a 10 per cent discount, which expires on February 20, 2020. SPRING20 with a flat INR 250 discount on all products above INR 1000. Expires on April 30, 2020.
Utterance: Get my coupon details
Alexa: Currently you have 2 active coupons running. WINTER20 with a 10 per cent discount, which expires on February 20, 2020. SPRING20 with a flat INR 250 discount on all products above INR 1000. Expires on April 30, 2020.
You can't get the exact text or question that a user asked from Alexa. Your skill will only receive the intent name and any associated slot values (if filled).
However, you could adapt your interaction model to fit your use-cases. For example, you could create an
GetActiveCouponIntentandGetCouponDetailsIntentwith different sample utterances. Then, if the user triggers theGetActiveCouponIntentintent, you can set a session attribute indicating the state. If the user then triggers theAMAZON.YesIntentyou can evaluate the state attribute and change the output accordingly.