The object is used to get live chat metrics over a period of time.

Hierarchy

  • LineMetrics

Methods

get

  • The method returns the value of a live chat’s metrics.

    Parameters

    • type: LineMetricType

      Metric type. The values are listed in LineMetricType.

    • start: TDatetime

      Start of the period.

    • end: TDatetime

      End of the period.

    • Optional from: undefined | number

      Number of entries to skip (the default value is 0).

    • Optional size: undefined | number

      Number of search results (the default number is 10, the maximum is 10,000).

      // Get data (one hundred entries) for a metric 
      // Response  time for the week 
      const now = new Datetime(); 
      const start = now.addDate(0,  0, -7).truncateTime(); 
      const metrics = await System.lines.metrics.get( 
           LineMetricType.responseTime, 
          start, now, 0, 100, 
      ); 
      

    Returns Promise<LineMetricItem[]>