How to use YaaS with Node-RED

As you’ve seen in our previous blog post the YaaS Client SDK for Node.js is already available and open sourced. If you haven’t read it yet and are setting up a YaaS project, I recommend to start with it first. It’s a good starting point to setup a new YaaS project, learn how to subscribe to the Product Content (Beta) package and tells you where you can find the Client Credentials. All the things we need for the following Node-RED examples.

Install Node-RED

After you’ve setup a YaaS project with the YaaS Builder you are ready to install Node-RED. You install it with npm, therefore you need Node.js installed. Yaas.js requires a Node.js version 4.0 or higher. For more information on how to install Node.js and Node-RED the Node-RED Installation page explains it very nicely.
For those who are familiar with Node.js and npm, this is what you need:
    sudo npm install -g --unsafe-perm node-red
Node-RED will be installed globally, so you only have to type node-red in a Terminal and the Node-RED server starts.
When Node-RED starts you can see the Node-RED version, Node.js version and also the User directory. The User directory is the path where you install node-red-contrib-yaas

Installing node-red-contrib-yaas

To install node-red-contrib-yaas, you stop Node-RED, change to the Node-RED User directory (see above) and install it with the following command and then start it again:
     cd ~/.node-red
     npm install node-red-contrib-yaas
This will create a node_modules directory (if it doesn’t exist) and install all necessary packages, including the YaaS Client SDK.
When you startup Node-RED again and open a browser at (or refresh the page) you will see the Node-RED application:
Node-RED overview with YaaS nodes

This is a Node-RED overview with a YaaS Node.

On the left side is a list of all installed Nodes, grouped by Input, Output, Function and also Yaas. In the middle of the window you define the flows and on the right you can see an Info and Debug tab. When you select a node (on the left side) the Info tab shows information about this node. The Debug tab allows you to show debugging information from the debug node.
Lets start.

Our first Node-RED flow – product by query

First we select the “products by query” node and drag & drop it in the flow. Then we add an inject node from the input group and a debug node from the output group.
When you double click on the node you can configure it: 
YaaS Credentials input

YaaS Credentials with Client Id, Client Secret and Application ID.

To configure the YaaS Node you need the YaaS Credentials and Application ID. You can find this information in your project. Open in the YaaS Builder your project and click on Client of the left side navigation. See also the YaaS Client SDK blog post to learn how to setup a YaaS project.
The Application ID (Identifier) is also at the Client section where Client ID and Secret is.
Change the inject node to String and the text to sku:"YOUR PRODUCT NUMBER" (e.g.sku:"8700810087"). You can find the Product Number at a defined Product (note: the quotation marks are required).
configuring inject node

Edit inject node to set the product number (sku).

Now you connect the inject Node with the “product by query” Node and the end of it with the debug Node. At the end you hit the red Deploy button (top right) and then you press the inject Node. If everything went fine, you should see a JSON output on the debug tab:
[ { "product": { "id": "569fa69c924e1f2bc1724d7b", "sku": "8700810087", "name": "Wizard Queen", "description": "Fight mystic wars on the chessboard! Let the White Witch’s powers guide you to victory!", "published": true, ...
The JSON output contains the product id, the sku (Product Number), name, description, and so one. We need the product id for our next example.

Product by ID Node example

The product id can be used for the “product by ID” node. Therefore Drag & drop the “product by ID” node in the flow and configure it with a double click. In this case the Credentials should already be filled and you only need to hit the Done button.
Now add another inject Node with the String of the product Id (e.g. 569fa69c924e1f2bc1724d7b). Connect these nodes and also with the debug node (or add a new debug node). Deploy, clean the debug tab and then press the new inject Node. You should see the same result as before.
YaaS nodes

YaaS nodes ‘product by query’ and ‘product by ID’.

We have two different ways to find a product and we are ready to add this product to a shopping cart.

Lets go shopping – add to cart example

Drag & drop the “add to cart” node and configure it. Therefore you need a customer, which you can register on your YaaS shop in a browser window ( . Credentials and the other options are the same as before.
Now connect the end of “product by ID” with the “add to cart“, deploy it and hit the inject node.
YaaS node add to cart

Add to cart node connected.

When you open your shop and login with the customer account, you will see the product in the shopping cart. Just hit a few more times the inject Node, refresh the shop page and you’ll see how the shopping cart is filled up.
These are the basics to start and play further with:
  • instead of only one product use other products
  • use name instead of sku as search query at product by query
  • and more advanced: take the product id from the product by ID result, change the msg.payload (hint: payload[0] with a change node and use the result for product by query
Next time I’ll show how a trigger can be used to add a product and to do a checkout.
Further information:

That would make it one on each continent…

…Smart Wine Shelves, that is. It looks like the guys from SAP South Africa are planning to build one. Well, since the Smart Wine Shelf will no longer be supported by the end of this year, it’ll be Bullseye in the wine shelf version. But that count’s!

“‘The benefits for both retailers and consumers are enormous,'” commented Brett Parker, Managing Director, SAP Africa. “‘With so much online competition, in-store experiences now need to be fun and engaging. Not only do concepts such as SAP’s Smart Wine Shelf provide for this, upping the customer experience and ultimately customer satisfaction, but smart technology also provides the retailer with access to valuable analytics.'”


The Future is upon us 2

… Hopefully this won’t be a sequel that’s worse than the original.

So I showed you what AR is and how it works yesterday, and since the team is also working on some VR stuff (it’s still pretty early in development so don’t expect it any time soon) I decided today I’d discuss VR and its main use in Commerce

Now “what is VR?” you’re probably asking, if you’re not… well don’t worry I’ll just pretend you are. VR stands for virtual reality. This is different from AR in the sense that it doesn’t just add computer generated information to our physical world but instead goes a step further and completely immerses you in a virtual CGI world (Not a single trace of reality, you know unless it’s a gritty realistic FPS you’re simulating)

To put it in an extremely simple way VR is simply tracking the movements of your body and transferring that data into your character’s movements in a virtual world created by the headset (which part of the body it tracks may differ a bit depending on hardware but it’s mostly just head tracking, hence why we mainly have VR headsets). The headset is designed to give you a full first person experience (no screens in the way to break your immersion), so that you feel like you’re actually there in this virtual world.

For an in depth look into how a VR headset actually works check out this link:

VR unlike AR hasn’t been used much in commerce. While VR has its uses there hasn’t been any  real products made or any companies that are actually using it currently, although some big companies are making pushes towards a V(irtual)Commerce platform and they are likely making prototypes as we speak (yea, like what we do. Crazy huh?)

Despite VR’s lack of use in Commerce currently, it still has many potential uses that haven’t been put into practice just yet. The main one is creating a virtual store, where you can wander around the place looking at items as if you were there, except you’ve actually skipped the 40 tedious minutes spent trying to get to that store and then not finding what you want and having to walk to another store that’s on the other side of the shopping mall.

Right now VR shopping poses the potential to be the best of both online and traditional shopping (for example being able to buy from home, able to switch stores at will and able to wander around and find something cool that you weren’t originally looking for).

Well that rounds up this article on VR, I apologise for not going into how the headsets work more myself but honestly that’d make for one insanely long post. Well I hope you enjoyed this and all my other articles, as this is my last one.

Anyways thanks for taking your time to read these and thanks to the Hybris Labs team for taking care of me this past week.

The Future is upon us

So we here at Hybris Labs have been working on a new AR prototype (well it’s under wraps for now, so pretend to be surprised when we actually unveil it); so I figured it’d be a good time to give a quick rundown on what AR is and how it works, as well as some of its uses in Commerce (just in case we decide to give you a pop quiz). I’ll also give one of my own ideas.

AR, in case you didn’t know, stands for augmented reality and what it does is enhance the real world by supplying computer generated data (augment it, if you will. You never would’ve guessed huh?) – this is often done by superimposing computer generated images (CGI) onto our view of reality but something like using sound to augment reality can also be done.

(Remember that one scene in Iron Man where Tony interacts with the holograms in his lab? You know how that made you think “that’s so cool! I wish we had that in real life”? Yea well that might be our reality soon, although you may have to be as rich as ol’ billionaire Stark to buy one when Microsoft’s HoloLens initially comes out)

Now onto how AR works (in a simplified way). For the most part all forms of AR work in a similar way (on a basic level anyways) with a few differences depending on what hardware is used (Head mounted displays, Spatial AR, smartphones etc.) In essence it takes information from the real world through GPS, compass, camera etc. (and if a server is required sends it to the server first) then processes and returns the data as media (text, video, image, 3D models etc.) and through an output displays the media (outputs such as: a screen, speakers, and… you know what? I’m pretty sick of how long all of these lists are).

There are several ways AR could be used in Commerce, one way is by displaying product information with AR through our smartphones. Just imagine pointing your phone’s camera at an item and having all its details floating around the object in question (well you don’t have to imagine, I do have a picture of it below after all). With this you could easily find out, say an article of clothing’s price, available colours and sizes as well as how the prices compare to other retailers.(Of course food works too, just don’t walk into a clothes store to look for a $2 chocolate bar, and then blame us when you can’t find it)

We could also use AR to visualise what an item of furniture would look like in your house. Say you’re unsure if you have enough space for that comfy leather sofa you want, or say you want to test what colour of a table would look best in your dining room; well this is where AR comes in. By simply pointing a smartphone’s camera at a spot where you’d like to place the table (and opening an app I suppose), you would be able to see a 3D life-size model of that table appear on your smartphone’s screen- thus allowing you to see what the furniture would look like in your home before you commit to buying it.

Finally my idea for a use of AR is to have a sort of virtual changing room. Honestly for me the worst part about shopping is how long the act of trying on clothes is. So I thought it’d be a cool idea if there was a changing room where you could have the clothes superimposed on you (as a virtual 3D model), so you can check its size and if it looks good on you without ever having to take off your clothes, as well as allowing you to easily change the colour and size of your clothes in the changing room(assuming they have said colours and sizes in stock).

There you have it, a quick rundown on AR and how it can be used; now you’re set to go out and do as you please with this new found knowledge you’ve acquired.

So it seems we’re not just working on prototypes…

… are you suprised yet? Well recently Hybris Labs has been making some contributions to a Hybris Commerce product that’s pretty awesome (don’t worry though, our main focus will still be our prototypes).

So basically what’s been happening is that Georg has been helping out the people working on the Assisted Service Module, by bringing in some of the technologies from the Changing Room to use in their product.

What's new pic

Now it uses RFID, iBeacons + an App etc. to detect when a customer enters the store to pick up their order (we wouldn’t want to be unprepared after all). Also, using the Assisted Service Module, store assistants have direct access to the customer data; so they can help the customer in the physical location, greatly improving the customer’s shopping experience.

Man remember the days when you had to walk around for hours to find that one jacket you really wanted in your size…no? Well I’d hope not because then we wouldn’t be doing our jobs. More seriously though, I honestly can’t wait for this to be in every store so I no longer have to dread going shopping for clothes.

Bullseye Replica

A perfect replica of Bullseye was built by our colleagues from Digitalwerkstatt – SAP Digital Studio in Ratingen. We supported them a bit, but they did all the hard work by themselves. It looks brilliant!


They already showed it to customers during  SAP Services ‘S/4 HANA Workshops Roadshow’ and the SAP Services ‘Let’s Think Future’ workshop. Bullseye_Ratingen so far has been on a tour to Frankfurt, Düsseldorf, Hamburg and Heidelberg. There’s also some talk of customer events at the SAP headquarters in Walldorf. It doesn’t sound as if that’s the end of it. We’ll keep you posted!

Thanks for effort, guys! Excellent work!

A week with Hybris Labs

At Hybris Labs we sometimes try to nurture the next breed of potential mad scientists. Here’s a report by Marko Cvijic:

“Last week, I was lucky enough to spend my internship with some of the nicest, most bright-minded people I’ve met. It has really been an amazing experience for me – I had fun but I also learned a lot about working with different new technology such as Arduino and the Internet of Things. I also got a first hand look at the team’s most recent projects, and I was also able to do some of my own projects. More specifically with the Arduino Leonardo and the Wio Link, an IoT product from the startup Seeed. The Wio link is a very capable little Wi-Fi solution that allows anyone with an Internet connection to interact with its modules like an LCD screen. Furthermore, it is able to collect information from websites such as twitter and trigger certain actions based on the activity on the site. It is programmable through an API, which, in turn, can be accessed through Node-RED, Terminal or even a regular Internet browser.

20160708_103852 1

All in all, it was an awesome week at SAP Hybris! Thanks to everyone who made this possible, especially Mr. Lars Gregori from the Labs team!”

Good job, Marko! Was a pleasure having you here! ‘Mr. Lars’…does anyone else think that sounds weird?

Revised Bullseye Architecture

I just wanted to share our latest, beautified arch diagram with you. Have a look below – all major components of the bullseye prototype are part of it. One new addition is the sytem configurator view, which is represented via the builder module. I’ll try to write another post soon about more tech changes.


Bullseye Technical Architecture

Welcome to the candy shop

The hybris labs team’s new year’s resolution is to reduce its alcohol misuse…in prototypes. We are now hooked on sweets.

IMG_3623 1

We also thought about quitting on LEDs but simply weren’t strong enough to face a world without flashing labs prototypes. And with the Wine Shelf no longer in our tour repertoire, we need something new to make people happy at events. Although you may see some similarities, this prototype will neither be called Smart, nor Funky Platforms.

‘Bullseye’, that’s the name of our new prototype which will be a centerpiece of the SAP Hybris Summit 2016. It’s true, we’re once again working on in-store enhancements, and there are indeed a few similarities to previous prototypes, but this time everything is built in YaaS. If you’d like to learn more about the technology, please read this article: Bullseye – in-store targeting and analytics – an update.

SNK (SCHOENE NEUE KINDER) is once again helping us with some lovely designs to bring this prototype to life:


That’s all the info we’re giving out at this point. You’ll just have to visit us at the Summit…

Screen Shot 2016-01-18 at 13.53.56