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

# FormSite

> Deployment of a form to a specific site and reporting year

FormSite records deploy a form to a specific site and year. They connect a form definition to where (site) and when (year) data is collected and drive permissions, public links, and submission scope.

## Purpose and Function

FormSite links:

* **Forms**: Structure and field definitions
* **Sites**: Locations where data is collected
* **Time periods**: The reporting year

## Deployment Configuration

**Site assignment**: Target specific locations in your hierarchy

```
Manufacturing Plant A - 2024
Regional Office B - 2024, 2025
Supplier Network - 2024 (External)
```

**Year-based deployment**: Control which reporting periods are active

* Annual reporting cycles
* Multi-year rollout strategies
* Historical data collection for baseline establishment

**Access control**: Manage who can see and submit data

* Site-specific user permissions
* Role-based access to form deployments
* External stakeholder access for supplier forms

## Form Types and Deployment Patterns

**Internal deployments (private forms)**

* Exactly one active submission per FormSite (non-deleted)
* Team members access through the platform
* Auto-save functionality as users type
* CSV import/export for bulk data operations

**External deployments (public forms)**

* Generate a unique public URL per FormSite
* Multiple submissions allowed (supplier data, contractor reports)
* Public access without platform accounts
* Branded headers with organization logos

## Data Collection Workflow

**1. Form Creation**: Design the form template with all required fields

**2. Site Deployment**: Create FormSite records linking the form to specific sites and years

**3. URL Generation**: System creates unique access URLs for each deployment

**4. Data collection**: Users submit data through various channels:

* Direct platform entry
* Public form URLs
* API integrations
* CSV bulk import

**5. Data Aggregation**: All submissions roll up through the site hierarchy

## Hierarchical data collection

FormSite deployments respect your organizational hierarchy:

**Parent-child relationships**: Data can be analyzed across site hierarchy

```
Corporate Level (aggregated from all sites)
├── Regional Level (sum of plants in region)
│   ├── Plant A (direct data collection)
│   └── Plant B (direct data collection)
└── Another Region
    └── Plant C (direct data collection)
```

**Permission inheritance**: Users can access assigned sites and child sites

**Reporting flexibility**: Generate reports at any level of the hierarchy

## Notes

* FormSubmissions and FormElementSubmissions are always scoped to a FormSite
* Public form endpoints are keyed by `formSiteId`

## Real-World Examples

**Manufacturing Energy Assessment**:

* Form: "Monthly Energy Consumption"
* Deployed to: 15 manufacturing plants
* Year: 2024
* Access: Internal team members only

**Supplier Sustainability Survey**:

* Form: "Annual Supplier Assessment"
* Deployed to: 200+ supplier sites
* Year: 2024
* Access: External public form with unique URLs

**Regional Waste Tracking**:

* Form: "Quarterly Waste Management"
* Deployed to: Regional offices and facilities
* Years: 2024-2026 (multi-year program)
* Access: Regional managers and facility staff

## Operational Benefits

**Scalability**: Deploy forms to hundreds or thousands of sites simultaneously

**Flexibility**: Same form template adapts to different sites and time periods

**Control**: Precise management of who can access which deployments

**Auditability**: Complete tracking of all form deployments and changes

**Efficiency**: Bulk deployment operations and template reuse across sites
