Alexa Inskill response not allowing "this.ask"

amazon-alexa

#1

Hi
I was using alexa in-skill purchase implementation for one of my skill. I have implemented it but here

if (product.entitled === 'ENTITLED') {
        this.tell('You have already bought this item.');
      } else {
        this.$alexaSkill.$inSkillPurchase.buy(product.productId, token);
        this.tell(`You have successfully bought ${productName.value}.`);
      }

this is working fine but “this.ask” is not working

if (product.entitled === 'ENTITLED') {
        this.ask('You have already bought this item.');
      } else {
        this.$alexaSkill.$inSkillPurchase.buy(product.productId, token);
        this.ask(`You have successfully bought ${productName.value}.`);
      }

its giving me the error
“reason”: “ERROR”,
“error”: {
“type”: “INVALID_RESPONSE”,
“message”: “ShouldEndSession cannot be false when ConnectionsSendRequestDirective is returned”
}


#2

Hey @sariga

Could you provide the request json?
What happens on tell? Does it close the session completely?

The official Alexa SDK example returns speak with a reprompt

So ask should work in my understanding. You could also try

this.$alexaSkill.shouldEndSession(true);
this.ask('...');

and

this.$alexaSkill!.deleteShouldEndSession();
this.ask('...');