The following diagram describes the user experience where the channel is our app :
After the service is created , Launch
Under "If assistant recognizes" , Put HR Intent & Enter Assistant responds text with its details .
I have put two contacts for example .
It's working as expected ,It answered with the HR contact .
Now We need to add this widget into our UI5 app , So we will need the widget credentials
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>Homepage</title>
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_belize"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"HomepageHomepage": ""}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted">
</script>
<script>
window.watsonAssistantChatOptions = {
integrationID: "c4969e38-901a-4c1b-a659-d054daf_____", // The ID of this integration.
region: "eu-gb", // The region your integration is hosted in.
serviceInstanceID: "9f76390e-b4b0-4b50-85d1-d22c61d_____", // The ID of your service instance.
onLoad: function(instance) {
instance.render(); // Renders the web chat widget on your page.
}
};
setTimeout(function(){
const t=document.createElement('script');
t.src="https://web-chat.global.assistant.watson.appdomain.cloud/loadWatsonAssistantChat.js";
document.head.appendChild(t);
});
</script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script>
sap.ui.getCore().attachInit(function() {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
height : "100%",
name : "HomepageHomepage"
})
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
<mvc:View controllerName="HomepageHomepage.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
displayBlock="true" xmlns="sap.m" xmlns:layout="sap.ui.layout" xmlns:microchart="sap.suite.ui.microchart">
<App>
<pages>
<Page title="{i18n>title}">
<layout:VerticalLayout class="sapUiResponsiveMargin">
<Title titleStyle="H2" text="{i18n>Apps}" class="sapUiTinyMarginBegin"/>
<layout:HorizontalLayout allowWrapping="true">
<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop tileLayout" header="Profit Margin" subheader="Expenses" press="onPress">
<TileContent unit="EGP" footer="Daily">
<NumericContent scale="M" value="1.2" valueColor="Error" indicator="Up" withMargin="false"/>
</TileContent>
</GenericTile>
<GenericTile class="sapUiTinyMarginBegin sapUiTinyMarginTop" header="Productivity" subheader="Progress">
<tileContent>
<TileContent>
<content>
<NumericContent scale="%" value="95" icon="sap-icon://s4hana"/>
</content>
</TileContent>
</tileContent>
</GenericTile>
<SlideTile class="sapUiTinyMarginBegin sapUiTinyMarginTop" transitionTime="250" displayTime="2500">
<GenericTile backgroundImage="https://raw.githubusercontent.com/SAP/ui5-tooling/master/docs/images/UI5_logo_wide.png" frameType="TwoByOne" press="onPress">
<TileContent footer="June 21, 2021">
<NewsContent contentText="SAP UI5 New Articles" subheader="News"/>
</TileContent>
</GenericTile>
<GenericTile backgroundImage="https://experience.sap.com/fiori-design-web/wp-content/uploads/sites/5/2016/06/composition_launchpad-homepage-V1.30-1.36-1100x554.png" frameType="TwoByOne" >
<TileContent footer="June 21, 2021">
<NewsContent contentText="SAP Fiori New Features" subheader="Today, SAP News"/>
</TileContent>
</GenericTile>
</SlideTile>
</layout:HorizontalLayout>
</layout:VerticalLayout>
</Page>
</pages>
</App>
</mvc:View>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |