# AME ApplicantStream setup

This connects the ApplicantStream Chrome extension to AME Hub at https://amehub.pages.dev.
It imports the same calendar fields used by Advanced Axis: candidate IDs and contact details,
first/second/third rounds, First Day of Training, interviewers, attendance, follow-up statuses,
notes, future bookings, and available job posting titles and locations.

## 1. Install the database tables once

Open the AME Supabase project (lupewcbhwcqezrgkftjz), select SQL Editor, then New query.
Copy the entire contents of supabase/ame-applicantstream.sql into the query and click Run.
Wait for Success. This adds tables and functions; it does not delete existing AME employees,
metrics, or manually entered interviews. Old manual interview records stay in their old tables
and are not mixed into the new imported reports.

The first successful owner import connects this database to the ApplicantStream Account No
shown on that calendar. Later imports from a different office are rejected.
There are no ApplicantStream passwords or API keys to configure.

## 2. Install the Chrome extension

1. Download downloads/ame-applicantstream-sync-1.0.2.zip from Recruiting → Imports & matches.
2. Extract the ZIP. Keep the extracted folder somewhere permanent.
3. In Chrome, open chrome://extensions.
4. Turn on Developer mode.
5. Click Load unpacked. Select the extracted ame-applicantstream-sync folder containing manifest.json.
6. Open Chrome's extensions menu and pin AME — ApplicantStream Sync.

This is a separate AME extension. Keep the Axis extension installed for Axis;
the AME extension sends only to amehub.pages.dev.

## 3. Import a calendar

1. Sign in to AME Hub as the owner and leave Recruiting → Recruiting overview open.
2. In another Chrome tab, sign in to this office's ApplicantStream account.
3. Open its Classic Calendar, enable Show Notes Column, clear Find Applicant,
   and turn off Paused Calendar.
4. Wait for edits to finish saving. Close any résumé popup.
5. Click the pinned AME extension. Choose Open calendar date, This week,
   or Custom range, then click Sync now.
6. Keep Chrome open and leave the calendar alone while the extension runs.
7. Wait for the success receipt, then review AME Recruiting.

Sync reloads the calendar. Save any edits before starting. The popup can be closed
while syncing; reopen it for progress or Stop. Custom ranges include weekdays only,
skip weekends, and support up to 62 calendar days. Empty days save only when all
four sections are verified. Retry an interrupted date safely; stable IDs prevent duplicates.

## 4. Match interviewers

Open Recruiting → Imports & matches. Exact full names match AME employee accounts
automatically. For an unmatched name, choose the correct employee and Save match.
Candidates are attributed through the second-round interviewer. Unmatched candidates
remain visible to the owner until matched; they are not exposed to every employee.

## What people see

- Owner: all imported stages, candidates, ad history, analytics, imports, matches, and retention reviews.
- Team leaders: candidates attributed to themselves and their assigned team/downline.
- Reps: candidates attributed to their own account.
- Trainees: no Recruiting access.

Imported attendance is read-only and updates on the next ApplicantStream sync.
Third-round Yes means orientation confirmation. First Day of Training Yes means arrival.
One- and two-week retention reviews remain owner-only. Orientation no-shows do not
enter the retention calculation. Missing attendance, reasons, and ad locations remain unknown.

## Messages and data handling

No automatic emails, Gmail connection, or recruiting text messages are enabled.
The extension does not store passwords, session cookies, résumé attachments, or inbox messages.
Saved candidate data is stored in this AME Supabase project; extension session storage
contains only sync progress and receipt text.

## Updating the extension

Replace the extracted extension files, click Reload on chrome://extensions,
and refresh the AME Recruiting tab. Do not change the site URL in the extension
unless the office's domain changes.
