Leveraging Alexa for an eCommerce Photo Storefront

The introduction of language-based systems like smart speakers and chat bots brings with it some opportunities for ecommerce storefronts.

I’ve created a proof-of-concept skill for Alexa that leverages one of our ecommerce platform’s RESTful API’s.  Lifepics is one of Taylor Digital’s software platforms that is a complete omnichannel B2B2C solution for photo dealers.  It is used by hundreds of retail stores to sell photo products (including prints) online and through brick and mortar storefronts.  The Lifepics RESTful API covers everything from authentication, cart management, order information, photo/album management and submitting orders.

Building a skill for a storefront that deals with personalized product, let alone photo products, makes completing orders a little more challenging and somewhat limiting.

In this post, I cover four ecommerce use cases (which equate to four user intents) I built out in my skill.  They could be adapted to other e-commerce systems if you have a capable API.  You can watch the video below for a demonstration of the skill and the four use cases.  If you are interested in some the the technical approaches and challenges with Alexa development, see my article “Creating an Alexa Skill for Astronomical Observations“.  I go into more detail on some of the development and intent decisions that go into developing for Alexa.

Completing an Abandoned Cart

Because an omni-channel cart allows you to complete an order on a different device than it was placed, we can let a user complete an abandoned cart and submit the order.  When we send an abandoned cart email, we could automatically apply a discount and tell them they can complete their order on Alexa very quickly.  There are some things to keep in mind when implementing this.

  • Defaulting Shipment Information.  If a user is completing an order with Alexa, we do not want to ask for things like where they want it shipped or ship method if at all possible.  We just want to utilize their default shipping address and standard shipping.
  • Use Stored Payment.  Your e-commerce or payment system will need to store their payment options so they can be used to order without prompting the user.  We should never be asking the user to provide credit card information through Alexa.
  • Review What They Ordered.  You will want to give the user a list of what they ordered and the total cost of course.  This is a bit more challenging with a photo site, since we can only tell them how many of each print size.  For static products, this is simple enough to review.
  • Use Alexa Cards to Your Advantage.  Alexa cards let you provide one image and some basic text that can include a picture of the product ordered as well as order detail information.

Even though Alexa only allows you to display one image, you could build your own image handler to render a single image with what you want.  For example, it could be a pile of photos that are rendered with all their images, or a combination of an image and text.

Creating a New Order

Starting an order from scratch using only voice is not as practical for a photo site, but we can let a customer order prints from an existing album they have been building out.  This could be a new order or a reorder.  I might want to upload my photos over several months into an album and then quickly print all these images or reprint them.  This is all possible with our API.  For purposes of this demo, I made the skill as simple as possible.  I check if they have albums with images and if so, I get all the details on the latest album with activity.  This could be expanded to ask them if they want to use this album or a different one.  Once they agree to an album, I ask them for the print size and finish of the prints.  At this point, we have all the information we need to complete the order.

 

The same recommendations for completing an abandoned order apply.  We want to make some assumptions about who it is being shipped to and what ship method to use.

For a normal e-commerce site that sells static products, there are going to be some limitations in making your entire product catalog available.  Slots, which are words passed in through a spoken phrase you can key off of, have to be defined in the Alexa portal and cannot be done programatically.  This means things like re-ordering or buying a standard product from a limited catalog are more likely use cases.

Where Is My Order?

When developing any kind of skill that ties an Alexa user to a customer profile in your ecommerce system, you will need to build an account linking page.  When the user installs the skill, they will need to login to your ecommerce system before they can start using it.  Once they do this, Alexa stores the unique token returned by your platform and makes this available to you everytime the user requests something.  This is critical for ordering products and looking up order status.  For my working skill, I built a site in Azure (changing things up a little) which utilizes the Lifepics API to authenticate a customer, get a token and provide that to the Alexa service.

For this intent, I have the user’s token for Lifepics available, so I can easily place secure API calls to get the status of their orders.  Some things to keep in mind:

  • Keep The Spoken Information Concise.  The user does not need to know the tracking number, order totals, etc.  They just want to know which order, what state it is in and when it will be delivered.  You can always use an Alexa card to provide more details.
  • Make Account Linking Simple.  Users can install skills without even using the Alexa app by simply saying “Alexa, enable the {skill name} skill”.  This is great, but if your skill requires account linking they will have to go into the Alexa app to complete the linking process. Make this as easy on them as possible by deploying an Alexa “LinkAccount” card in this situation.  As soon as they go into the app, they will see your card with a quick link to register as soon as they open the app.

A sample “LinkAccount” card

Looking Up Store Locations

This might seem straightforward, and it can be depending on a number of factors.  Alexa does not offer the ability for regular third-party developers to obtain the physical location of the Alexa user for security reasons.  As a result, you will have to either:

  • Ask the User for Location.  There are ways to pass a city name using a pre-defined Amazon slot for US Cities, and for an Address.  In my experience though, the most reliable way is to simply ask for a zip code using a NUMBER slot.
  • Use a Profile Address.  This is ideal for a skill that is linking to an account.  You may already have the user’s location / default shipping address and can simply use that without prompting the user for anything.

Development Notes

Your skill code, which is essentially handling everything behind the scenes, is hosted in a Lambda on AWS (Amazon Web Services).  You could also create your own skill handler at your own endpoint.  You have a few choices of environments to run your lambda function in AWS (including node.js and Java), but I recommend node.js.  The primary reason is that many of the other technologies like Alexa including Google Home, Facebook Messenger, all use node.js.  It is quickly becoming a staple in software development.  This will allow some potential reuse of code across these different form factors.  Node.js is really just server-side Javascript, so if you have a handle on JS you are good to go.

Amazon and others have put together some great guides on design which are worth reading.  My other article where I summarize the development of an Alexa skill for astronomical observations provides more details on some of the design “gotchyas” you need to be aware of with Alexa in particular.

Summary

There are definitely some opportunities to use Alexa as an additional channel for your e-commerce storefront, but understand the limitations before going in.  Offering the ability to quickly reorder products, or offering a subset of your catalog of popular products people might want to buy more frequently are the most practical.  It can also be handy for WISMO and lookups for your brick and mortar shops.  Chat bots, which offer more capabilities for visual interactions with the user, are probably better suited to making larger portions of your catalog available.  Combining all of these together is certainly another possibility, including services like Twilio (SMS programming) or Facebook messenger.  I will cover some of this in a future article.

 

Gus

I am Software Engineering Director who still loves to code :)

 

Leave a Reply

Your email address will not be published. Required fields are marked *