ui.assistedSupportPlugin Class
Assisted Support Plugin UI Module
Item Index
Methods
- render static
Methods
render
(
Promise
static
-
config
Render the Assisted Support Plugin UI
Parameters:
-
config
ObjectA ui.callback.Config object
-
[uiInfo]
Object optional-
[type]
String optionalA value in {{#crossLink "ui.HostType"}}{{/crossLink}} which indicates the type of UI to render e.g. IFRAME, POPUP. -
[containerSelector]
String optionalOnly required for iframe -- a JQuery selector statement to define the element into which the iframe will be loaded -
[height]
Number optionalThe height of the rendered UI -
[width]
Number optionalThe width of the rendered UI
-
-
Returns:
Promise:
A promise that resolves when the UI component has successfully loaded
Example:
// Render plugin as an IFRAME - this is the only supported rendering for Assisted Support Plugins.
// More UIInfo examples available here
var uiInfo = {
type: MsSupportSdk.ui.HostType.IFRAME,
containerSelector: "#iframe-container"
};
// Create a assistedSupportPlugin config
var config = {
uiInfo: uiInfo,
pluginUrl: "https://support.microsoft.com/deviceselector",
puid: "insert puid value here",
locale: "en-us",
product: "windows",
issue: "tech-services",
onCompleted: function() {
console.log("Plugin flow completed.");
},
onCancelled: function () {
console.log("Plugin flow cancelled.");
},
onError: function(e) {
console.log("An error occured.");
}
};
// Render callback UI
MsSupportSdk.ui.assistedSupportPlugin.render(config).then(
function() {
console.log("Assisted Support Plugin rendered successfully.");
},
function(err) {
console.log(err.message);
});