B1 Assistant – Retire your keyboard with SAP Busin...
Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Thank you for your interest in the B1 Assistant. The original prototype has been modified a lot since its inception. The goal was to make it simpler to deploy so more and more partners could use it. The result, is the B1 Assistant Lite which can be deployed in minutes. It has a smaller functionality scope but completely serves its purpose: to enable you in how the integration works and how to work with Alexa. The whole deployment, together with a conceptual presentation can be found in the video below.
If you still want to deploy the first released version, please continue to the original below:
ORIGINAL POST - 10/10/2016
You’ve probably heard about a prototype we demo at the ASUG Summit in Miami. The proposal was to present how easy companies can embrace the digital economy transforming their business on daily tasks (if you haven’t seen that before, you are probably not following the right people on twitter).
A bit different from what some of you asked me, this is not a core feature of SAP Business One, it’s a prototype developed by the Solution Architects team, just like many others we shared before.
Good news the code is open for you to use and implement your own version. And here is a tutorial of how to install the B1 Assistant and "retire" your keyboard for some B1 tasks.
Alexa (Amazon Echo's persona) has several capabilities (Skills). Those are divided between Native (time, weather, traffic, news...) or 3rd Party (Uber, Spotify, Business One…)
To activate the 3rd party skill, we use Invocation Names. Those are nothing more than the name of the skill we want to call. For example: “Alexa, ask Uber for a ride” or “Alexa, open Spotify”. Once it hears your command, it will identify the skill to be triggered and call a specific Web Service that can be hosted on a Private Cloud or on AWS. Like this:
In our case, working the with B1 Assistant Skill the architecture is:
It's not my intention to get into details about skill. I strongly suggest you take a look at Alexa's documentation. It's highly informative
Skills details
Beside the Invocation Names, the skills have 2 other attributes, the intent, which is the specific action to be activated and the slots that works as parameters of the first one.
Implementing the B1 Assistant
Enough with definitions and small talk, let’s go for the funny part. So you can have your own B1 Assistant.
Prerequisites
A SAP Business One on HANA 9.2 PL04 environment.
PL03 will also work, with limited features (No Prediction)
SBODEMOUS schema
To work with different schema, please adapt all models and procedures
We've seen that whenever a user asks Alexa , it will trigger a Skill, this skill will call a function and this function will interact with an application (SAP Business One)
So let's build our stack, starting by the end. The B1 Assistant App on HANA.
Note: Alexa will use this user to retrieve data and access the services.
You can also access http://hanaserver:8000/b1Assistant to test your app back-end
note: B1 user/pass is set on services/b1call.xsjs file
Sample output when the app is successfully deployed on SAP Cloud Platform
4 - Link the function to your Alexa Skill and Test.
Last step!
Whatever option you choose before, at the end you should have an enpoint for your function. I.e, an ARN if you are using Amazon Lambda, or an URL if you pushed the app to SAP Cloud Plaftorm.
Back to the Amazon Developer Console (the same as step 2). Choose the right the menu Endpoint and set the right option for your case.
Your B1 Assistant is ready to work! You can use the Test Console, the Echo Simulator or with a real Amazon Echo by enabling the Skill on your Alexa app. Which is much cooler ?
Spit it out!
Do you like it? Or maybe you hate it? Have any questions? Feel free to ask and let your comments below. Your feedback it much appreciated.
Special Thanks to the SAP Business One dev team in Shanghai that helped us with the predictive analysis feature! You rock!
B1 Assisant got smarter!!
There is a very cool enchament on this prototype made by Yatsea Li, integrating it with the Twitter Sentiment App. If you want to give your B1 Assistant more powers, once you fisished this tutorial, follow the instructions in his blog