API Docs for: 2.0.20133.2
Show:

ui.assistedSupportPlugin Class

Assisted Support Plugin UI Module

Item Index

Methods

Methods

render

(
  • config
)
Promise static

Render the Assisted Support Plugin UI

Parameters:

  • config Object
    • [uiInfo] Object optional

      A ui.UIInfo object ui.UIInfo

      • [type] String optional
        A value in {{#crossLink "ui.HostType"}}{{/crossLink}} which indicates the type of UI to render e.g. IFRAME, POPUP.
      • [containerSelector] String optional
        Only required for iframe -- a JQuery selector statement to define the element into which the iframe will be loaded
      • [height] Number optional
        The height of the rendered UI
      • [width] Number optional
        The 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);
    });