> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khanhng.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 1.4 Context and Scope

> Context and Scope for ReportGeneratorTool.

## 1.4.1 Business Context

![1.4 Context and Scope](https://cs210032002b3e09a5d.blob.core.windows.net/tech-doc/diagrams/BC-ReportingGeneratorTool-001.jpg)

**Facility User**

A facility user uses the *Facility Management Platform* to request device performance reports.\
The user selects the device, reporting period, temperature thresholds, and report recipients.\
The facility user does not communicate directly with the *Report Automation Service*.

**Facility Management Platform**

The *Facility Management Platform* collects report requirements from the facility user.\
It sends the report request to the *Report Automation Service* and receives a job identifier and processing status in return.

**IoT Device Management Platform**

The *IoT Device Management Platform* provides access to device telemetry, CSV exports, and visual charts.\
The *Report Automation Service* uses browser automation to sign in, select the requested device and reporting period, download the CSV file, and capture the chart.\
The platform receives device measurements through an IoT gateway, but the *Report Automation Service* does not communicate directly with the gateway or devices.

**Report Archive**

The *Report Archive* stores completed PDF reports.\
It is currently implemented using Azure Blob Storage.\
The *Report Automation Service* uploads each generated PDF and retrieves it when preparing the report for delivery.

**Report Recipient**

A report recipient receives the completed device report as a PDF email attachment.\
The report contains the device chart, temperature statistics, alarm counts, alarm durations, and the selected reporting period.\
The facility user and report recipient may be the same person, but they represent separate business roles.

## 1.4.2 System Context

![1.4 Context and Scope](https://cs210032002b3e09a5d.blob.core.windows.net/tech-doc/diagrams/SC-ReportingGeneratorTool-001.png)

## 1.4.3 External interfaces

| Communication partner | Input to Report Automation Service | Output from Report Automation Service | Interface or channel |
| - | - | - | - |
| Facility User | Report request submitted indirectly through the Facility Management Platform | Processing status and completed report delivered indirectly | Facility Management Platform |
| Facility Management Platform | Client information, IoT platform URL and credentials, device configuration, reporting period, thresholds, and recipients | Orchestration ID, status endpoints, and processing status | HTTPS and JSON |
| IoT Device Management Platform | CSV telemetry export and rendered chart content | Login actions, device selection, reporting period, and export request | Browser automation over HTTPS |
| IoT Gateway and Devices | Device measurements provided indirectly through the IoT Device Management Platform | None | No direct interface |
| Azure Blob Storage | Stored PDF content, storage confirmation, or storage error | Generated PDF and storage metadata | Azure Blob Storage API |
| Email Service | Delivery confirmation or delivery error | Recipient addresses, subject, message, and PDF attachment | SMTP through Nodemailer |
| Report Recipient | None | Completed device report as a PDF email attachment | Email service |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.