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

# Data Model

> Atomic data object references for the Firstwork platform.

## Overview

This document catalogs the key data objects in the Firstwork platform.

### Company

A tenant organization on the platform.

| Attribute         | Description                       |
| ----------------- | --------------------------------- |
| Name              | Company display name              |
| Slug              | URL-friendly identifier           |
| Logo & Branding   | Visual identity                   |
| Legal Entities    | Subsidiary organizations          |
| Allowed Languages | Languages available to applicants |

**Created by:** Platform staff
**Modified by:** Company admins (Settings)

### User

A person with an account on the platform.

| Attribute           | Description                                 |
| ------------------- | ------------------------------------------- |
| Name                | First name, last name, optional middle name |
| Email               | Primary email address                       |
| Phone               | Optional phone number                       |
| Avatar              | Profile picture                             |
| Language Preference | Preferred interface language                |

**Created by:** Registration, invite, admin creation, or API
**Modified by:** The user (Profile page) or admins

### Contract

The relationship between a user and a company — representing employment or contractor agreement.

| Attribute       | Description                                      |
| --------------- | ------------------------------------------------ |
| User            | The associated person                            |
| Company         | The associated company                           |
| Status          | Current contract status (Active, Inactive, etc.) |
| Legal Entity    | Assigned legal entity                            |
| Onboarding Flow | Assigned onboarding process                      |

**Created by:** "Create Contract" automation action, admin, or API
**Modified by:** "Update Worker Stage" automation action or admin

### Application

A candidate's submission to a hiring flow.

| Attribute           | Description                            |
| ------------------- | -------------------------------------- |
| Candidate           | The applicant                          |
| Hiring Flow         | The pipeline being applied to          |
| Current Stage       | Where the candidate is in the pipeline |
| Form Submission     | The candidate's form responses         |
| Recollection Status | Whether documents need re-submission   |

**Created by:** Candidate signup, API, bulk import, or "Create Application" automation action
**Modified by:** Stage transitions, compliance rules, automation actions, admin actions

### Hiring Flow

A recruitment pipeline definition.

| Attribute | Description                                                   |
| --------- | ------------------------------------------------------------- |
| Name      | Flow name                                                     |
| Type      | Standard or Module                                            |
| Form      | The associated form structure                                 |
| Settings  | Recollection config, stage groups, multi-application settings |

**Created by:** Admin
**Modified by:** Admin (Form Builder, Settings)

***

## Form Entities

### Form

The container for all pages, stages, and questions within a flow.

| Attribute        | Description                      |
| ---------------- | -------------------------------- |
| Pages            | Ordered list of form pages       |
| Stages           | Status checkpoints               |
| Compliance Rules | Decision logic attached to pages |

### Form Element (Question)

An individual question or content block within a page.

| Attribute              | Description                                                              |
| ---------------------- | ------------------------------------------------------------------------ |
| Type                   | The element type (text, email, number, selection, document upload, etc.) |
| Title                  | Display label                                                            |
| Helper Text            | Instructional text                                                       |
| Required               | Whether a response is mandatory                                          |
| Position               | Order within the page                                                    |
| Type-Specific Settings | Validation rules, format, options, etc.                                  |

### Form Submission

A candidate's or worker's responses to a form.

| Attribute      | Description               |
| -------------- | ------------------------- |
| Form           | The form being submitted  |
| Respondent     | The person submitting     |
| Page Responses | Answers organized by page |
| Status         | Current submission status |

***

## Automation Entities

### Automation

A configured workflow with triggers, conditions, and actions.

| Attribute        | Description                                    |
| ---------------- | ---------------------------------------------- |
| Name             | Display name                                   |
| Description      | What the automation does                       |
| Active           | Whether the automation is enabled              |
| Context          | Hiring Flow or People/Onboarding               |
| Linked Flow      | The specific flow this automation is scoped to |
| Triggers         | What starts the automation                     |
| Actions          | What the automation does                       |
| Input Variables  | Parameterization data                          |
| Execution Policy | Queue, Skip, or Continue                       |

### Automation Execution

A record of a single automation run.

| Attribute      | Description                                  |
| -------------- | -------------------------------------------- |
| Automation     | Which automation ran                         |
| Trigger Event  | What started it                              |
| Status         | Success, failure, or skipped                 |
| Timing         | Start time, end time, duration               |
| Action Results | Per-action status, input, output, and errors |

***

## Scheduling Entities

### Schedule

A definition of when a resource is available.

| Attribute            | Description          |
| -------------------- | -------------------- |
| Name                 | Schedule name        |
| Availability Windows | Days and time ranges |

### Event

A bookable appointment type.

| Attribute | Description                        |
| --------- | ---------------------------------- |
| Title     | Event name                         |
| Duration  | Meeting length                     |
| Location  | Virtual (Google Meet) or In Person |
| Schedule  | Linked availability                |

### Booking

A confirmed appointment reservation.

| Attribute | Description                                 |
| --------- | ------------------------------------------- |
| Event     | The booked event                            |
| Candidate | Who booked it                               |
| Time Slot | Reserved date and time                      |
| Status    | Pending, Confirmed, Cancelled, or Completed |

### Meeting Queue Enrollment

A candidate's position in a meeting queue.

| Attribute | Description                                   |
| --------- | --------------------------------------------- |
| Queue     | The meeting queue                             |
| Candidate | The enrolled person                           |
| Status    | Waiting, Active, Cancelled, Completed, Failed |
| Position  | Queue position                                |

***

## AI Caller Entities

### AI Caller Bot

A configured AI voice bot.

| Attribute        | Description                                               |
| ---------------- | --------------------------------------------------------- |
| Name             | Bot name                                                  |
| System Prompt    | Conversation script                                       |
| Voice            | Selected voice                                            |
| Input Variables  | Data provided before the call                             |
| Output Variables | Data to capture during the call                           |
| Settings         | Turn detection, speed, summarization, call duration limit |

### Call Enrollment

A record of a single call.

| Attribute     | Description                                  |
| ------------- | -------------------------------------------- |
| Bot           | Which AI Caller was used                     |
| Type          | Test, Automation, or Form                    |
| Call Method   | Phone, Audio, or Video                       |
| Status        | Initiated, In Progress, Completed, or Failed |
| Transcript    | Full conversation text                       |
| Summary       | AI-generated call summary                    |
| Output Values | Captured structured data                     |
| Recording     | Audio recording (if enabled)                 |

***

## AI Agent Entities

### AI Agent

A configured browser automation bot.

| Attribute        | Description                     |
| ---------------- | ------------------------------- |
| Name             | Agent name                      |
| Description      | What the agent does             |
| Scope            | Company-specific or Global      |
| Instructions     | The workflow of browser actions |
| Input Variables  | Data provided before execution  |
| Output Variables | Data captured during execution  |
| States           | Named workflow checkpoints      |

### Agent Execution

A record of a single agent run.

| Attribute   | Description              |
| ----------- | ------------------------ |
| Agent       | Which agent ran          |
| Status      | Execution status         |
| Input Data  | Values provided          |
| Output Data | Values captured          |
| Logs        | Detailed execution logs  |
| Timing      | Start and end timestamps |

***

## LMS Entities

### Course

A training course.

| Attribute          | Description                       |
| ------------------ | --------------------------------- |
| Title              | Course name                       |
| Description        | Course overview                   |
| Status             | Draft, Active, or Inactive        |
| Cover Image        | Thumbnail                         |
| Lessons            | Content built via Form Builder    |
| Certificate Config | Validity period (months or years) |

### Enrollment

A learner's assignment to a course.

| Attribute | Description                     |
| --------- | ------------------------------- |
| Course    | The assigned course             |
| Learner   | The enrolled person             |
| Status    | Active, Completed, or Cancelled |
| Due Date  | Enrollment deadline             |
| Score     | Quiz score (if applicable)      |

***

## Configuration Entities

### Integration

A connected third-party service.

| Attribute   | Description                                                                 |
| ----------- | --------------------------------------------------------------------------- |
| Type        | Hotjar, GTM, Sterling, Veriff, Google Calendar, Google Sheets, Google Gmail |
| Status      | Connected or Disconnected                                                   |
| Credentials | Type-specific configuration (API keys, OAuth tokens, etc.)                  |

### API Key

A credential for external API access.

| Attribute | Description       |
| --------- | ----------------- |
| Name      | Key label         |
| Status    | Active or Revoked |

### Tag

A categorization label applied to applications, automations, or other records.

### Feature Flag

A toggleable platform feature.

| Attribute  | Description                                                  |
| ---------- | ------------------------------------------------------------ |
| Name       | Flag identifier                                              |
| Enabled    | Global on/off state                                          |
| Allow List | Companies/applications where the flag is explicitly enabled  |
| Block List | Companies/applications where the flag is explicitly disabled |

### Compliance Rule

A decision rule attached to a form page.

| Attribute     | Description                                 |
| ------------- | ------------------------------------------- |
| Conditions    | Tree of AND/OR logic with field comparisons |
| Type          | Recollection, Assignment, or Navigation     |
| Actions       | What happens when the rule fires            |
| AI Evaluation | Optional AI-assisted rule assessment        |

### Custom Variable

A computed data field.

| Attribute     | Description                                           |
| ------------- | ----------------------------------------------------- |
| Type          | Aggregated (across records) or Annotated (per record) |
| Function      | Sum, count, average, min, max, mean, mode, or median  |
| Source Fields | Data paths used for computation                       |

### Task

A manual review item for admins or workers.

| Attribute | Description                          |
| --------- | ------------------------------------ |
| Title     | Task description                     |
| Status    | Pending, In Progress, or Completed   |
| Priority  | Urgency level                        |
| Due Date  | Deadline                             |
| Action    | Where to navigate to handle the task |
