The reply Object

class Reply(alexaEvent[, message])

The reply object is used by the framework to render Alexa responses, it takes all of your statements, cards and directives and generates a proper json response for Alexa

Arguments:
  • alexaEvent (AlexaEvent) –
  • message – A message object
Reply.Reply.append(message)

Adds statements to the Reply

Arguments:
  • message – An object with keys ask, tell, say, reprompt, card, or directives keys. Or another reply object
Returns:

the Reply object

Reply.Reply.toJSON()
Returns:An object with the proper format to send back to Alexa, with statements wrapped in SSML tags, cards, reprompts and directives
Reply.Reply.fulfillIntent(canFulfill)
Arguments:
  • canFulfill – A string with possible values: YES | NO | MAYBE to fulfill request
Reply.Reply.fulfillSlot(slotName, canUnderstand, canFulfill)
Arguments:
  • slotName – A string with the slot to fulfill
  • canUnderstand – A string with possible values: YES | NO | MAYBE that indicates slot understanding
  • canFulfill – A string with possible values: YES | NO that indicates slot fulfillment