Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.17 KB

Session-Persistent-Storage.md

File metadata and controls

22 lines (17 loc) · 1.17 KB

Manage the Skill Session and Session Attributes

const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
const favoriteColor = getSlotValue(
  handlerInput.requestEnvelope,
  "favoriteColor"
);
sessionAttributes.favoriteColor = favoriteColor;
handlerInput.attributesManager.setSessionAttributes(sessionAttributes);

const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
if (sessionAttributes.favoriteColor) {
  //do something
}

Managing Attributes

How to Use Session Attributes in Your Alexa Skill to Enhance the Voice Experience

Alexa Skill Recipe: Using Session Attributes to Enable Repeat Responses