Flipper Service

The FlipperService handles the feature switches of the current customer in Suite. It can tell whether a feature is enabled for the customer. Calling the getter function will return a promise that will be resolved with the service.

It works in iframes as well, but the UI Kit and window.e.config must be present on top window, otherwise the promise won't resolve.

Javascript:

window.e.utils.getFlipperService().then(flipperService => {
  if (flipperService.isOn('myFlipper')) {
    console.log('myFlipper is on');
  }
});

Creating Flipper Service

Method

Name Description
window.e.utils.getFlipperService() Returns promise that resolves with flipper service.

Flipper Service API Reference

Method

Name Description
isOn(flipper) Returns true if flipper is on.
isOff(flipper) Returns true if flipper is off.