Launch Brevz Application

Configuration

We explore the Brevz's configuration


When you integrate Brevz on your website, you have to provide a configuration, for the Getting started guide we used:

var brevzConfig = {
  projectId: "<Project ID, you can found this code inside the Integration signet from the Brevz's app>", // Do not change it.
};

It's only a subset of the available possibilities.

BrevzConfig

The configuration type can be described as:

/**
 * Brevz Config type
 */
export type BrevzConfig = {
  /**
   * Project ID used for the project
   * Mandatory
   */
  projectId: string;
  serviceWorker?: {
    /**
     * Service worker location, example: `sw.js`
     * Mandatory with notification
     */
    location: string;
    /**
     * Manifest location, example: `manifest.json`
     * default to manifest.json
     */
    manifestLocation?: string;
  };
  changelogConfiguration?: {
    enabled: boolean;
    bubbleConfiguration: {
      enabled: boolean;
      absolutePositionLeft?: string;
      absolutePositionRight?: string;
      absolutePositionTop?: string;
      absolutePositionBottom?: string;
    };
    palette: {
      // `String` or `HEXColor`
      icon: string;
      // `String` or `HEXColor`
      primary: string;
    };
  };
  notificationConfiguration?: {
    enabled: boolean;
    optIn: {
      enabled: boolean;
      /** Delay before autoask in seconds */
      autoAsk?: number;
      helpTitle: {
        fallback: string;
        /**
         * ISO-639-1
         * https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
         */
        helpText?: Partial<Record<Locales, string>>;
      };
      helpSubtitle: {
        fallback: string;
        /**
         * ISO-639-1
         * https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
         */
        helpText?: Partial<Record<Locales, string>>;
      };
    };
  };
};