DDD Sydney Outcome – Episerver CMS Headless

DDD is a great conference which is an inclusive non-profit conference ran by the community. I was so lucky this year to be part of this awesome conference and present our lovely Episerver which most of the developers there never heard of it! Means we need to create a better community out there. I presented Episerver CMS Headless and to spice it up added Microsoft Cognitive Services. My aim for the talk to build a website that can serve user as a Bot as well. To achieve this I used Episerver CMS as backend and Headless part to expose CMS data:

 

 

And used LUISE to interpret users request and Microsoft Cognitive Service to route the request as the picture below:

 

Santa is the user by the way!!!

 

To recap how this is working is Microsoft Web Bot is part of Cognitive Service and allow the user to interact with your application using different channels. So you don’t need to worry about exposing your app to different channels (e.g. Cortana, Microsoft Teams, Skype, Online Web Chat, ..). How? As below:

 

You just need to implement one function to get the data from user:

 

 

And Bot Service will send you all you need as an Activity if you want to read more detail about it read here. And what we do is get what user asked and process it.

First Step would understand user’s intent, so we need AI and as I’m lazy and love online services I would use LUIS which is Language Understanding online tool from Microsoft. The way it works is quite simple:

Input: String

Output:

  • Intent -> User goal
  • Entities -> Keywords that our application cares

Sample:

Input: Book me a flight to Cairo

Output:

  • Intent -> “BookFlight”
  • Entities
    • “cairo” – “location”

 

So you may ask how the hell LUIS knows what is “BookFligh” and how to it knows the entities. In a short-term, you need to teach LUIS! How? Read here.

Now we know what user wants and knows all related keywords, so the next step is using Episerver Headless CMS API to fetch what user wants:

 

 

if you like to read more detail about it you can reference Episerver documentation or a series of my blog posts. Bellow is how it looks like:

 

 

And rest is easy! Just interpret the data and return it back to the client. You can get the whole source code using links below:

 

Episerver CMS: https://github.com/zanganeh/SydMeetup.PlacesDirectory

Cognitive Service: https://github.com/zanganeh/SydMeetup.PlacesDirectory.Bot

 

And if you are interested in the presentation please find it here

Wrap Up – Third Sydney Episerver Meetup

First I want to say thanks @Nicola and 1990 Digital and Episerver for hosting this session. I learned a lot and I’m started starving for the next meetup!

 

Nicola spoke about her new tool ‘EpiserverCmsAudit’. This tool is really awesome and can help you to find the usage of your content type. Very nice dashboard and very easy to install and it is FREE! So if you to give it a go to her post to read more about it and you can take a look at the source code or just install the Nuget package This is quite a bit awesome while website moving to DXC as they can build many websites and many contents! So with this tool, you as a dev, tester or content editor can make sure your change impact on all aspect of your app! GREAT JOB!

 

I spoke about Episerver Headless CMS, eCommerce and how you can integrate that with Microsoft Web Bot. This would be important as Bots are more human-friendly – having said that the concept is still at a very early stage. The concept is quite simple, Web Bot gets the query from user pass to Luis.ai and passes the action to Episerver to get the data back and pass it back to Bot! If you feel like you need more info, you can download the presentation and the source code of the bot can be found here and the bot source code can be found here. If you are interested and still have a question just comment here!

I’m going to speak about this in more detail in DDD, so if you keen to learn more you just need to get the ticket!