-
Notifications
You must be signed in to change notification settings - Fork 6
Request handing
Sri Vishnu Totakura edited this page Apr 14, 2018
·
1 revision
To handle an intent, you will have to create an intent handler class.
For example, if your intent is named PlaceOrder
, you will have to create
the following file under you app/lib/alexa/intent_handlers
directory.
module Alexa
module IntentHandlers
class PlaceOrder < Alexa::IntentHandlers::Base
def handle
...
response # intent handlers should always return the +response+ object
end
end
end
end
All intent handlers should contain a #handle
method that has required logic
as to how to handle the intent request. For example, adding session variables,
setting response to elicit slots, delegate etc.
Note: #handle
method should always return the response
object.
response
object in available in the scope of #handle
.