Handling Purchases

There’re two paths through which a user may buy the Magnificent Moons package. They can either buy it directly by saying, “Buy the Magnificent Moons pack” or as a side effect of attempting to plan a trip to one of the moons. We’ll start by defining an intent to handle the direct approach. Later we’ll see how to create an upsell directive to offer the package if the user tries to plan a trip to a premium destination.

Defining a Buy Intent

A user of our skill could potentially decide to purchase the Magnificent Moons package at any time after launching the skill. To enable them to do so, we should define an intent that is triggered whenever they say something like, “buy the Magnificent Moons pack.” The following definition of ...

Get Build Talking Apps for Alexa now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.