Experience Management – Collect Feedback from with...
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.
Experience Management is a trending topic today. There is great potential and value in doing things right and replace guessing with knowing when it comes to human behavior within today’s Experience Economy. To be able to do that properly in a business context its crucial to combine the context – which is known already pretty often in the SAP Systems – with the experience information in the Experience Management Platform from Qualtrics. Having those two types of information combined you can get all necessary insights to improve and react properly on every touch point to drive your business even better.
In advance it is important to do that as seamless as possible for your Users. This is what we focus on this time.
With this blog post I want to give a hands-on introduction how easy it is to collect feedback within your SAP Fiori Launchpad for example from a SAP S/4HANA System.
Target Process Overview
After running through the steps of this tutorial you have a running exemplary integration of Qualtrics within your SAP Fiori Launchpad to Listen to feedback on apps and processes.
Source: Own Graphic
We can react to specific situations happening while using the apps and collect context during the listening process.
That could be:
Feedback Frequency
Target Groups
User Segmentation
App Context
and many more
Now we can build an integrated "Listen", "Understand" and "Act" process for this touchpoint.
Source: Screenshots from SAP Fiori Launchpad Sandbox
Source: Screenshot from SAP Fiori Launchpad Sandbox
The scenario just showcases an example on how to combine the SAP Fiori Launchpad and the Qualtrics XM Platform.
Have a look what you could get out of this:
This is only setting the foundation for applying all the powerful insight, analytics and follow-up functionalities which the platforms provide. If you want to learn more about it, feel free to reach out to us and have a first look here:
You should be aware of how to design an proper Experience Management Process and already have some experience with building SAP Fiori Apps as well as how to setup an feedback process in Qualtrics. Maybe you team up with a colleague to combine that?
Needed Accounts
Qualtrics Account with activated Website and App Feedback.
registerWebsiteFeedbackLoadedEvent: function () {
//Make sure to be notified once intercept API has been loaded
/* eslint-disable sap-forbidden-window-property*/
window.addEventListener(
"qsi_js_loaded",
function () {
if (QSI.API) {
this.hasInterceptLoaded = true;
QSI.API.load().then(QSI.API.run());
} else {
this.hasInterceptLoaded = false;
}
}.bind(this),
false
);
/* eslint-enable sap-forbidden-window-property*/
},
Initialize our new methods
Now we initialize our application by adding the following to the end of the existing "init" method:
Lets first adopt the feedback button which has been created already but we did not yet use.
Change the layout and position of the button and send an event to Qualtrics by changing the code in our "init" function like this
init: function () {
var rendererPromise = this._getRenderer();
/**
* Add item to the header
*/
rendererPromise.then(function (oRenderer) {
oRenderer.addHeaderEndItem({
id: "qualtrics-feedback-button",
icon: "sap-icon://feedback",
tooltip: "Give Feedback",
press: function () {
/* eslint-disable sap-no-global-define*/
// gets the window._qsie variable or sets it to an array
window._qsie = window._qsie || [];
// count how often the feedbackbutton has been pressed
window._qsie.push("feedbackrequest"); }
/* eslint-enable sap-no-global-define*/
}, true, false);
});
this.hasInterceptLoaded = false;
this.registerWebsiteFeedbackLoadedEvent();
this.embedWebsiteFeedbackStarter();
},
},
Now we can react to a click on this element id in our intercept in Qualtrics.
Add an Creative like a "ResponsiveDialog" to our "Website and App Feedback Project".
Add a new "Intercept" reacting to it.
Select "Options" -> "Advanced Options" for the "Action Set" and react to the click like this:
Source: Screenshots from Qualtrics
In addition we can react to the event "feedbackrequest" which is counting our clicks on the button.
With this we can also simulate the click whenever needed like this:
As soon as you hit the button, the Responsive Dialog shows up.
Capture and transfer the context (3/3)
Now we want to collect user and application context and send it to Qualtrics.
That way
we can control better when to show an feedback request
understand feedback with context
and act properly on the feedback.
Collect SAP Fiori Launchpad Application context
As we need want to react to context of the user we will leverage the Unified Shell Services to collect the needed information. To make it accessible for Qualtrics we will store the information in a global variable.
Create a new method which collects the relevant context:
getAppContextData: function () {
return new Promise(function (fnResolve, fnReject) {
var contextData = {};
// Current Application
contextData.app = {};
var oCurrentApp = sap.ushell.Container.getService("AppLifeCycle").getCurrentApplication();
if(oCurrentApp){
if(oCurrentApp.homePage){
contextData.app.id = "HOME";
}
contextData.app.type = oCurrentApp.applicationType;
var oComponentInstance = oCurrentApp.componentInstance;
if(oComponentInstance){
// Only for UI5 APP
contextData.app.componentId = oComponentInstance.getId();
var appData = oComponentInstance.getManifestEntry("sap.app");
for (var attrname in appData) { contextData.app[attrname] = appData[attrname]; }
}
}
// User Information
contextData.user = {};
var userInfo = sap.ushell.Container.getService("UserInfo");
var userData = userInfo.getUser();
contextData.user.id = userData.getId();
contextData.user.email = userData.getEmail();
//resolve data
fnResolve(contextData);
});
},
Call this method before triggering the intercept and store the result into a global variable. Therefore replace the following method like this:
registerWebsiteFeedbackLoadedEvent: function () {
//Make sure to be notified once intercept API has been loaded
/* eslint-disable sap-forbidden-window-property*/
/* eslint-disable no-undef*/
window.addEventListener(
"qsi_js_loaded",
function () {
if (QSI.API) {
this.getAppContextData().then(function (oContextData) {
// global variable accessable by qualtrics:
qualtricscontext = oContextData;
this.hasInterceptLoaded = true;
QSI.API.load().then(QSI.API.run());
}.bind(this));
} else {
this.hasInterceptLoaded = false;
}
}.bind(this),
false
);
/* eslint-enable sap-forbidden-window-property*/
/* eslint-enable no-undef*/
},
Enrich this method with whatever context you might find relevant and react to it through Qualtrics.
Reload Context and Rules on navigation changes
To trigger the logic of the Website and App Feedback properly we have to react to launchpad navigation and update the context accordingly.
Create a new Event Handler method
onAppLoaded: function (evt, oData) {
//Attach current context to global variable to be able to collect in Qualtrics Website Feedback as embeded data
this.getAppContextData().then(function (oContextData) {
/* eslint-disable sap-forbidden-window-property*/
/* eslint-disable no-undef*/
qualtricscontext = oContextData;
//Validate that intercept has loaded before accessing intercept API's
if (this.hasInterceptLoaded === true) {
// https://www.qualtrics.com/support/website-app-feedback/common-use-cases/single-page-application/
QSI.API.unload();
QSI.API.load().then(QSI.API.run());
}
/* eslint-enable sap-forbidden-window-property*/
/* eslint-enable no-undef*/
}.bind(this));
},
Register the new Event Handler after the Qualtrics JavaScript has loaded. Therefore adopt our method like this:
registerWebsiteFeedbackLoadedEvent: function () {
//Make sure to be notified once intercept API has been loaded
/* eslint-disable sap-forbidden-window-property*/
/* eslint-disable no-undef*/
window.addEventListener(
"qsi_js_loaded",
function () {
if (QSI.API) {
this.getAppContextData().then(function (oContextData) {
// global variable accessable by qualtrics:
qualtricscontext = oContextData;
this.hasInterceptLoaded = true;
// Listen to the "AppLoaded" Event
sap.ushell.Container.getService("AppLifeCycle").attachAppLoaded({},
this.onAppLoaded,
this
);
// If you need to react to navigation within an app add the listener to "hashchange" here.
// load and run the intercept
QSI.API.load().then(QSI.API.run());
}).bind(this);
} else {
this.hasInterceptLoaded = false;
}
}.bind(this),
false
);
/* eslint-enable sap-forbidden-window-property*/
/* eslint-enable no-undef*/
},
(Optional) If you need to react also to navigations within a single app - like from overview to detail screen.
You have to listen to the hash change in addition to the SAP Fiori Launchpad navigation.
Therefore just add the following after attaching to the "onAppLoaded" event
var oHashChanger = sap.ui.core.routing.HashChanger.getInstance();
oHashChanger.attachEvent("hashChanged", function(oEvent) {
this.onAppLoaded();
}.bind(this));
Optional: Enable XM Directory Contact Frequency Rules
Therefore we add the following code at the beginning of our method "registerWebsiteFeedbackLoadedEvent" which maps our User field to the "externalReference" Identifier of the XM Directory.
You can now deploy your extension to whatever Fiori Launchpad Environment you are running on. If you don't know how, have a look at one of the referenced Blog Posts or SAP Help.
You made it!
Congratulations! You have embedded a nice feedback channel into your SAP world!
Now build a proper feedback process around:
Listen
Understand
Act
Let me know your experience and feedback around this!
What context was relevant? What did you learn from it?
How do your users react?
This blog post is just out of my personal experience and learning of the topic. It does not represent any official statements for SAP’s product directions or functionalities.
About Me
I am working as Innovation Lead and Architect within a team in the Customer Advisory which is focused on driving customer innovations around XM (Experience Management) and Business Technology for Middle and Eastern Europe.
I am with SAP for more then 10 years in different customer facing roles and my motivation is to improve and innovate on business processes around all industries by applying technology in a way no one has done before.
Outlook
I will continue to add further Blog Posts whenever I see a need for it. What topic would you like to learn more about?
So stay tuned and follow me here to get notified: lukas.riederle
Looking for a way how to collect feedback from other SAP Solutions?