Usage Metrics - API

Usage Metrics - API

Usage Metrics – API

Store and report on metrics for system usage pertaining to data export so as to support customer billing for Extended Architecture

Problem Statement

Customers of Red Box Extended Architecture typically operate within highly regulated industries where call recording is critical for regulatory compliance.

Volume licensing has been adopted as the preferred model for these customers and a tool is required for creating usage metrics to support customer billing

High level requirement (Objectives and Key results)

As an Account Manager, I would like to have usage metrics reports pertaining to data export for my EA customers, so that I can create bills for them based on their system usage

Return on Investment (ROIs)

  • Accurate billing based on usage reporting

  • Better understanding of customer usage which could feed into strategies for product improvements/enhancements

External Stakeholders

  • All customers of EA

Internal Stakeholders

  • Finance Manager

  • Key Account Managers

Definitions

  • Number of seconds of historic audio being sent Total historic audio (seconds) – Sum of number of seconds of audio sent by both Push API and Export API (Treat all calls as fully exported)

  • Peak concurrent audio stream requests Peak concurrent audio requests – The highest number of concurrent calls being streamed at a time via both the Push API and the Export API


Functional Requirements (Use Case)

Use Case Title:

Get usage metrics (API)

Description 

This use case describes the process of retrieving usage metrics via an API endpoint

Trigger 

Call to API endpoint

Primary Actors

  • 3rd party system

Secondary Actors 

EA system

Stakeholders 

  • Support Renewals

  • Key Account Managers

Preconditions 

  • EA is active

  • API endpoint is accessible

  • Raw data from which usage metrics can be produced are available

Flow (Main success Scenario)

  1. Call is made to EA API endpoint with parameter(s) specifying time period

  2. EA system returns the following usage metrics (JSON) for the specified time period:

    1. Number of seconds of audio being sent from the Call Push API

    2. Number of seconds of audio being sent from the Export API

    3. Number of seconds of historic audio  being sent

    4. Number of seconds of real-time audio  being sent

    5. Peak concurrent audio stream requests

Alternative flows

  • Developer makes call to API endpoint

Exception flows

 

Post-conditions 

Success End condition:

  1. The following data for the given time period is returned in JSON format

    1. Number of seconds of audio being sent from the Call Push API Total pushed audio (seconds)

    2. Number of seconds of audio being sent from the Export API Total exported audio (seconds)

    3. Number of seconds of historic audio  being sent Total historic audio (seconds)

    4. Number of seconds of real-time audio  being sent Total real-time audio (seconds)

    5. Peak concurrent audio stream requests Peak concurrent audio requests

  2. Zero records are valid (should indicate that system was not used over the specified period of time)

Failure End condition: 

  1. No data is returned

Frequency 

None (on demand)

Priority 

Must

Use Case Title:

Configure email delivery for usage metrics (API)

Description 

This use case describes the process of configuring email deliveries for usage metrics

Trigger 

Call to API endpoint

Primary Actors

  • 3rd party system

Secondary Actors 

  • EA system

Stakeholders 

  • EA Administrator

  • Support Renewals

  • Key Account Managers

Preconditions 

  • EA is active

  • API endpoint is accessible

Flow (Main success Scenario)

  1. Call made to EA API endpoint with the following details:

    1. Recipient name

    2. Recipient email

    3. Frequency (daily, weekly, monthly)

    4. Time email should be sent

  2. EA system saves email delivery configuration

Alternative flows

  • Developer makes call to API endpoint

Exception flows

NA

Post-conditions 

Success End condition:

  1. Email configuration successfully saved

Failure End condition: 

  1. Email configuration not successfully saved

Frequency 

None (on demand)

Priority 

Must

Use Case Title:

Email usage metrics (API)

Description 

This use case describes the process of sending usage metrics email reports

Trigger 

Scheduled timer (Use case “configure email delivery for usage metrics (API)”)

Primary Actors (Personas)

  • EA system

Secondary Actors 

  • Email recipients

Stakeholders 

  • EA Technical Architect

  • Support Renewals

  • Key Account Managers

Preconditions 

  • EA is active

  • API endpoint is accessible

  • EA system has been configured to send email reports (based on prior execution of use case “Configure email delivery for usage metrics”)

Flow (Main success Scenario)

  1. Use case starts when EA system time matches set time for a given email report configuration

  2. EA system retrieves configuration data for email report

    1. Recipient name

    2. Recipient email

    3. Time period to be covered  by report

  3. EA system retrieves usage metrics for time period specified by email report configuration

  4. EA system creates email report with usage metrics in JSON format (including data to uniquely identify customer)

  5. EA system digitally signs report

  6. EA system sends usage metrics report by email to recipient(s)

    Subject:
    “[Daily/Weekly/Monthly] usage metrics report (API) for [TenantID]“

    Body:

    [Name],
    Summary of usage metrics (API) for [TenantID]

    Number of seconds of audio sent from the Call Push API: [value]

    Number of seconds of audio sent from the Export API: [value]

    Number of seconds of historic audio  sent: [value]

    Number of seconds of real-time audio  sent: [value]

    Peak concurrent audio stream requests: [value]


  7. Recipient(s) receives usage metrics report by email

Alternative flows

NA

Exception flows

2a. EA system unable to retrieve configuration data for email
2b. EA system logs error

3a. EA system unable to retrieve usage metrics for time period specified by email configuration
3b. EA system logs error

6a. EA system unable to send usage metrics report by email
6b. EA system saves usage report to EA Core Services file system

Post-conditions 

Success End condition:

  1. Recipient(s) receive(s) email report

  2. Email report contains usage metrics for period matching report configuration

  3. Email report is in JSON format

  4. Email report contains digital signature

  5. Email report contains information uniquely identifying customer

Failure End condition: 

  1. Recipient does not receive email report

  2. Email is missing usage metrics data

  3. Email is not digitally signed

  4. Email does not contain customer identification data

Frequency 

On schedule(s)

Priority 

Must

Non functional requirements 

Area

Requirement

MoSCoW

Additional comments 

Hardware Requirements 

NA

 

 

Software Requirements and Licencing 

NA

 

 

Supportability Requirements 

Log all errors

Create audit log for all emails successfully or unsuccessfully sent

M

 

Security Requirements

All emails to be digitally signed

M

 

Interface Requirements

NA

 

 

Usability/Accessibility 

NA

 

 

Compliance Requirement 

NA

 

 

Training 

Documentation to support Administration/configuration

M

 

Resilience 

If the system is unable to send an email, the contents of the email should be saved to the EA Core Services file system in an easy to access location for manual download

M

 

Legal and Regulatory

NA

 

 

Scalability

NA

 

 

Error-handling

Log all errors

M

 

Localizability

Feature to work with system clock/timezone

M

 

Performance

NA

 

 

Concurrency

Where multiple collectors are in use, usage metrics to be based on single collector

M

 

Storage

Same as resilience

M

 

Test requirements

End to end testing

M

 

 

 Simon Jolly (Technical Architect) to review and signed-off
@Hayley Skivington (Unlicensed) to review and sign-off
@Sergey Shafiev (Unlicensed) ​​​(Team Lead) to review and sign-off
(QA) to review and sign-off
Andy Stables (Head of Finance) to review
@Gemma Jankiewicz (Unlicensed) ​​(Product Manager) to review
@Sita Patel (Unlicensed) (Technical Documentation Manager) to review
Add label