Try our conversational search powered by Generative AI!

Aniket
Mar 5, 2019
  1868
(1 votes)

Alexa skill integration with Episerver - Part 1

We all know Episerver is a very powerful Enterprise CMS. The content authors and marketers have complete control over content, personalization, analytics as well as access to user data at their finget tips. 

With that said, the technological landscape is changing and so is user interaction with new innovative devices. In my opinion, websites (including responsive mobile websites) will always be the most popular way for presenting information, but as developers & marketers we should be prepared for this giant wave of new trend heading our way. Example: "50% of all searches will be voice searches by 2020". Episerver is prepared with it's Headless API to allow developers and marketers to ride the wave with ease. Episerver headless API allows serving same content to various devices including voice devices, mobile apps and others.  

I recently implemented an Alexa skill that queries Episerver CMS and returns meaningful data to Alexa device. Though this is a very basic version/proof-of-concept for an Alexa skill it opens up a whole lot of possibilites depending on your user's interaction with the website. The Alexa skill I implemented reads out the two latest news or events from a website. This can very well be extended to "Give me the store locations for XYZ near Boston", "Are there any new promotions for ABC?", "Company's profit summary for this quarter". You get the point :) 

As an end user, if you can get quick information from your favorite brand without having to spend time searching for it on a website, it's a huge value add in terms of convienience and saved time. No more booting up a device, navigating to a website, typing in a search box, enduring frustrating UI and performance issues. Simply ask "Alexa" what you need and listen to it while getting ready to go to work or during commercials on TV. If you are a technology (or tech savvy) organization it's even more important to display innovation to let your users know that you always "keep up" with new trends in technology.

Alexa Skill:

The core Alexa concept is pretty simple. It consists of:

  1. Alexa skill kit (Front-end code) - https://developer.amazon.com/alexa/console/ask 
  2. Lambda function (Back-end code) - https://aws.amazon.com/lambda/ 

You will need to setup 2 accounts:

  1. Amazon Developer account (to configure front end interactions using Amazon provided UI)
  2. AWS account (to host the back end code called lambda function)

NOTE: Amazon Developer Account has a BETA feature that allows you to host the skill and the code in the same interface which is a super convinient and easy to understand. This is highly recommed if you want to get your Alexa skill up and running in minutes. When you create a new skill select the option "Alexa Hosted (Beta)" and you should be able to host and update the code in the same Amazon developer account.  

Definitions:

Skill Name: The name of the skill that will be used when you publish your skill to Amazon.

Invocation Name: The term user will call out to invoke/start interaction with your skill. For ex: If the invocation name is "Fun Demo" the user can say Alexa open "Fun Demo" or Alexa start "Fun Demo"

IntentIntents allow you to specify what a user will say to invoke the skill. For ex: Get me the latest news or find me the closest stores in Boston area. You can create a custom intent as well as update the out-of-the-box Amazon provided Intents (such as CancelIntent or HelpIntent).

Slots: Slots are nothing but parameters you can pass to the Intent to allow dynamic terms. For example: Order me {number} {size} pizza. The terms number and size are two dymamic parameters passed to the Intent.

Endpoint: Endpoint is to connect your front end code (Invocation, Intents) to the backend code. If you are using Alexa hosted beta feaure, then no configuration is necessary. If the back end code is self-hosted (or a rest end point) these values need to be configured. The end point can be a REST endpoint which returns valid data or a lambda function that hosts your backend code. 

To get started, as a first step I recommend setting up a simple Web API REST endpoint in Episerver that returns a JSON object. Ideally you would want to setup Episerver Headless API but for a quick demo a simple REST endpoint should be enough.

I will get into the details of Alexa skill implementation and integrating it with Episerver in my next blog post.


Stay tuned!

Mar 05, 2019

Comments

Bien Nguyen
Bien Nguyen Mar 6, 2019 04:31 AM

Interesting topic! Waiting for next parts :)

Peter Bennington
Peter Bennington Mar 6, 2019 09:31 AM

I'm also looking forward to the rest of this series. This is something I am interested in creating a POC for, although I believe I will do it with the nuget package https://github.com/joseftw/JOS.Epi.ContentApi , which seems like it might be quicker. Unsure about performance and security though.

David Knipe
David Knipe Mar 6, 2019 10:53 AM

Interesting post and thanks for sharing! If you wanted to take some inspiration on using the Content Delivery API in an Alexa skill then I wrote about it here (search for Alexa in the page): https://www.david-tec.com/2018/06/episerver-as-headless-episerver-ascend-2018-presentation/ 

Please login to comment.
Latest blogs
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog