How to change UI element dynamically – and how it works under the hood

In C4C it is very convenient to define rule to dynamically control the visibility of a given UI element. This blog mainly focus on how it works under the hood, so that in case you meet with trouble or this dynamical mechanism does not work as you expected, you can first do trouble shooting by yourself before creating a ticket to SAP. For example I would like to enable FEED facet only in condition that the Priority equals to Immediate, and hide it for any other values: In order to achieve this we can simply create one rule as below, which means the visibility of FEED tab equals to the value of expression “Root.PriorityCode” evaluated in the runtime. When this rule is created, the rule detail is stored as a CalculationRule node in UI Model. You can find it by appending “debugMode=true” in url. Inside this CalculationRule node there is one important sub node:

With this setting, whenever I change the UI element bound to Model field /Root/PriorityCode, the rule will be evaluated. The rule represented in String format will be parsed into an Abstract Syntax Tree: And its value gets evaluated: The visibility of FEED tab is called as “DynamicProperty” as it is controlled dynamically by the rule I specified. The update on the visibility property will lead to the fact that the whole NavigationBar with internal ID ___bar1 is added to the invalidation queue whose elements will be invalidated later. The Navigation bar gets rerendered in line 623: The Navigation bar has its dedicated renderer NavigationBarRenderer which does the actual rendering work ( see my blog for detail about UI5 control render) This is the reason why finally you could not see FEED tab in UI as the corresponding DOM element is not rendered by NavigationBarRenderer due to the IF evaluation in line 78. http://bit.ly/2hs4v5W #SAP #SAPCloud #AI

Lessons from #INBOUND17: Here Comes the Bots Intelligence Beyond Human Abilities: AI and Bots

 

Luckily, I was able to attend the #INBOUND17 Conference in Boston, powered by HubSpot in September and I came away with ONE BIG revelation.

“80% of businesses want chat bots by 2020”

Why wait? By then, you’re late.

I was struck by the predominance of the following message:  that customers now seek interaction that is so instantaneous that chats, powered by smart bots educated by big data and AI – are quickly becoming the new normal for online customer engagement.

Web browsing, form completion, email – all are too slow to produce answers in this attention-deficit-driven world. Closely related is the evidence that putting data to use intelligently via AI and machine learning produces an unquestionably better result than pure human might alone.

From sales inquiries, to support requests, to the creation of videos – AI is powering smart proactive engagement and content which is far more informed than that which can be created by humans. Imagine a product inquiry going to an inside sales human vs an onsite chat bot – which do you think can scan a knowledge base of millions of records of historical data faster to review all the possible responses to a question, to provide the best answer? The BOT.

An exaggeration? Perhaps. But, let me share some wake-up-calls from this message and tangible implications for my work at SAP in Marketing.

What are the common use cases/capabilities today?

AI/Chat bots:

* Provide smart personal assistants on sites
* Respond to Google search results – “I saw you were searching for …”
* Educate without annoyance of premature sales contact
* Create written content – “machine assisted content”
* Create video content – convert raw video into smart content
* Compose smart email replies

What best of breed bots and bot builders were shown at the event? 

Motion.ai (bought by Hubspot)

 

“Technology has changed the way we communicate. Today, people expect to interact with businesses when, where, and how they want.

Bots allow us to do exactly that, helping growing businesses scale one-to-one communications.

With HubSpot’s Motion.ai acquisition, soon anyone will be able to build a chatbot to communicate with customers on their terms — no technical skills required.”

Microsoft has QnAMaker

And also…

* Microsoft Xiaoice (China) 40 million users https://www.youtube.com/watch?v=dg-x1WuGhuI
* Atomic AI – helps marketers write better https://techcrunch.com/2016/12/12/atomic-ai-helps-marketers-write-better/
* Growthbot – chatbot for marketing and sales ps://growthbot.org
* Pathmatics – tells you what competitors do; monitor any other brand – every ad they run; how they ran them; https://www.pathmatics.com/
* Kemvi – bought by Hubspot; deep graph; social signals; writes email for the rep based on unstructured data https://www.hubspot.com/company-news/hubspot-acquires-kemvi-to-bring-machine-learning-to-sales-and-marketing
* Creating videos using AI :Magisto: machine assisted content. “Make inspiring video in minutes with the power of Magistos’s AI driven video editor. In 2017 your first hire should be a videographer and not a blogger.” https://www.magisto.com/

Winner for Thought-Provoking Presentation: Andy McAfee Spotlight: “Business Advice I Don’t Believe Anymore” – Andrew McAfee, Principal Research Scientist, MIT

Andy’s premise was that we are in the SECOND machine age, with all new rules, powered by data and intelligence. FIRST machine age conventional wisdom is all wrong. Some key points:

* Machines make better decisions than humans. Conventional wisdom is the HIPPO (highest paid person in the room) gets to make decisions, based on their years of experience and seniority. But with current big data analytics technology, “geeks armed with data” make far better decisions (MIT has documented). Disorienting for the HIPPOs, for sure, but critical that they learn to defer to this wisdom.

* Similarly, crowdsourced solutions deliver better results than those developed in internal, traditional processes. Crowdsourced platforms have created marketplaces to gather and reward such work. The wisdom of the crowd is real.

* Example: Quantopian consistently outperforms the market

* “Leveling Wall Street’s Playing Field, Quantopian inspires talented people everywhere to write investment algorithms. Select authors may license their algorithms to us and get paid based on performance.”

* Platforms spawn limitless innovations; in contrast, fixed products by their nature are more limited in their ability to incorporate innovations.

* Uber, ClassPass, AirBnB are platforms that constantly learn and consistently incorporate knowledge into their offering; you buy access to the platform and its ever-evolving services and not a “product.” In contrast, a product by nature is fixed and requires a different, slower process to incorporate intelligence.

Winner for Exciting Moment at Event: Michelle Obama Keynote!

Michelle was inspiring, talking about the importance of working through challenges and staying focused on what matters – satisfaction in your chosen path.

A few implications for my work at SAP in Marketing

The #INBOUND17 outside – in exposure helped me see the possibilities in AI/Chat – related work already taking place and made me more eager to test, learn and implement quickly. Examples:

* How fast are our B2B prospects moving beyond web browsing and form completion to expect chat and other personalized forms engagement on sap.com?
* What can we do to use AI to help create content (copy and videos) that leverages intelligence inherent in what has succeeded before?
* How can we use the mountain of stored intelligence in the SAP Community to help answer inquiries about support and training that come to sap.com?

Learn more

Here is a link to the #INBOUND17 website and collection of presentations and videos (scroll to bottom). Enjoy!! Lots of wisdom here and a great conference to attend.

  http://bit.ly/2hs2vuB #SAP #SAPCloud #AI