Alexa integrating with SAP Mobile Cards through ABAP
Earlier in June, I had the opportunity to get a detailed demo from Mark Wright on SAP Mobile Cards and was impressed at how easy it is to mobilize content from SAP or any source to the SAP Mobile Cards application.
Mark has also previously written a blog integrating Alexa with SAP Mobile Cards and it inspired me to also try it out myself using what I know and have available (namely my trusty #ABAPTrial server) and I try to never miss an opportunity to explore more features and functionality that’s on the SAP Cloud Platform.
Here’s the video of the final result.
*** WARNING *** You might want to turn down your volume when Alexa responds. Somehow my recording captured a louder Alexa response than my voice – Sorry!
I’m not going to go into details on all the integration points and code but here’s a high-level solution diagram of the end-to-end integration starting from triggering Alexa on my phone to the backend ABAP server.
Alexa Custom Skill
The Alexa custom skills call an endpoint that’s deployed on the SAP Cloud Platform – API Management which is then connected to my backed ABAP server through the Cloud Connector. The ABAP server then receives the custom skills intent and saves the product information into a custom database table.
I created two simple intents on the custom skill – one to add a part number to the mobile card and another to delete all cards to keep things simple.
Then, to ‘send’ that saved product information to the Mobile Cards application, I created a CDS View and publish the data saved on the custom database table as an OData service and configure that to the Mobile Card application.
The card template I used is ‘Automatic Instance Generation’ and the OData service from the CDS view is configured as the query. For the card design, I used an existing card and adapt it to just the data that I’m sending from the OData service.
That’s it! Now, every time that I launch the SAP Mobile Cards application, it’ll query the OData service and retrieve the product information to be saved and displayed on my phone.
This is obviously NOT in any way meant as a production design but it’ll do as a single use case proof-of-concept development.
The SAP Mobile Cards application is not meant to replace any of your Fiori mobile apps but it can sure get pretty close if you only have some very basic Fiori apps. The setup is simple and there are very good interactive tutorials available to learn how to create new mobile cards and explore different functionality.
* Oh, and I really wished that there’s an option to disable the passcode when launching the Mobile Cards app. ~pretty please?
UPDATE: Thanks Mark for showing me how to disable the passcode from the iPhone Settings.
Here’s a screenshot below on where that option is.
The links below are what Mark left me with after his demo and I find them exceptionally useful – hope you liked the video!
Thanks Alban great blog and awesome demo.
Hi Alban, Mark Wright
In past I have also developed an Alexa skill which Talks to ABAP system and give Voice response and same response is also shown on Fiori Application.
Any Idea how can we integrate this with Analytics Cloud or with SAP Business Objects.
I'm guessing your question on integration with Analytics Cloud or SAP Business Objects is on the technical nature of the integration? That, however, would still depend on your use case or what you're trying to achieve ultimately. It could be very simple or a complicated integration and what actions/automation that you would expect Alexa to perform.
Great demo, i'm glad to see users innovating with our solutions. You mention the passcode. There are two options. When you first register you are asked if you would like to skip setting up the passcode. if you select Setup Later you won't be prompted for the passcode. You can also go into Settings->Mobile Cards and there is a Disable Passcode that you can toggle on in order to disable that passcode.
LOL - I feel kindda silly now. Why didn't I think of checking the Settings on the iPhone? Anyway, thanks for the reply and yes, I am now able to disable the passcode! Woo hoo!
Thank you for your earlier inspiring blogs and this one too. Pretty much interesting and compelling after seeing all your innovative experiments with Alexa. One thing always intrigues me that your previous blog's with Alexa including this one displays a interesting aspect of Voice to speech scenario and how it could be beneficial for Business and having said that do you foresee or have a thought plan to experiment a SAP Transnational scenario using Alexa? Can it be done with the current Echo dot in hand?
Hi Sujin Appukuttan, glad you like the post.
As for your question - yes, I've seen a few demos from SAP and also internally at my company where a transaction is initiated through different voice platforms such as CoPilot, Alexa, Google Assistant, etc. Definitely a lot of interesting development in this space and your imagination is the only limitation at this point.
Here's a link to a session on SAP Co-Pilot that was presented during last year's TechEd and I find it very interesting and excited at the coming innovations. https://events.sap.com/teched/en/session/33634