SRS: UC_8.2.10 — Flow 15B: Pod Leader Opt-In & Provisioning
| Field | Value |
|---|---|
| UC_ID | UC_8.2.10 |
| Version | v1.9 |
| Last Updated | 2026-11-04 |
| BA PiC | linh.nguyen34 |
| Category | STAGE 6: CAREER PATH & PROFESSIONALIZATION |
| Module | Pod System |
| Function | Flow 15B — Pod Leader Opt-In & Provisioning |
| Document References | Zapier Integration V7.pdf (§Flow 15B: Pod Leader Opt-In & Provisioning lines 2039–2052; §Table C: Global_Variables Min_Pod_Leader_Level = 7 line 217; §Pod_Leader_Registry lines 777–790 — naming reference only, see §2 Trigger note) · RFQ_ Stack Trading Prop Tech V7.pdf (§Create Pod Channel lines 2268–2280; §Manage Discord Role lines 2335–2350) |
1. UC Index
| UC_ID | Function | Description |
|---|---|---|
| UC_8.2.10 | Flow 15B — Pod Leader Opt-In & Provisioning | Triggered when a Level 7+ trader accepts a Pod Leader invitation. Inserts record into Pod_Leader_Registry, creates private Discord channel, writes channel_url to trader profile, assigns 'Pod Leader' Discord role, and sends Pod_Leader_Welcome email. |
UC_8.2.10 — Flow 15B: Pod Leader Opt-In & Provisioning
| Field | Value |
|---|---|
| Use Case | Pod Leader Opt-In & Provisioning |
| Description | When a trader who has reached Min_Pod_Leader_Level (Level 7) clicks the opt-in button in the Pod_Leader_Invite email, this flow provisions their Pod Leader identity: creates a registry entry, provisions a @stacktrading.com Google Workspace account, creates a private Discord channel named pod-[leader_name], writes the channel URL to the user's profile, assigns the 'Pod Leader' Discord role, and sends a welcome email. |
| Zapier Flow | Flow 15B (Pod Leader Opt-In & Provisioning) |
| Zapier Table | Pod_Leader_Registry (native PostgreSQL table) · Table C: Min_Pod_Leader_Level |
| 3rd Party | Google Workspace Admin Directory API · Discord Bot API · AWS SES |
2. Trigger
Event: Webhook received from the opt-in button click in the Pod_Leader_Invite email.
The Pod_Leader_Invite email is sent upstream by Flow 6 (L6 Transition / UC_8.1) when a trader's New_Level reaches Min_Pod_Leader_Level = 7 (sourced from Table C: Global_Variables).
PostgreSQL-native note:
Pod_Leader_Registry("Table E" in the original Zapier spec documentation) is built natively in PostgreSQL as the single source of truth — it is NOT a live Zapier Table. "Table E" is retained elsewhere in sourcing citations only as a naming/cross-reference convention to the original RFQ section. (RestatesPOD-JOIN-02.)
(Source: Zapier Integration V7.pdf §Flow 15B line 2041; §Table C line 217)
3. Pre-conditions
| ID | Pre-condition |
|---|---|
| P1 | Trader has received Pod_Leader_Invite email (sent by Flow 6 when New_Level = Min_Pod_Leader_Level) |
| P2 | Trader clicks the single-click opt-in button in the email, firing webhook to Zapier |
| P3 | Min_Pod_Leader_Level = 7 (sourced from Table C — not hardcoded) |
4. Post-conditions
| # | Post-condition |
|---|---|
| 1 | Trader's user_id and leader_name inserted into Pod_Leader_Registry with Status = 'Active', Current_Count = 0, Pending_Carry_Balance = $0.00 |
| 2 | @stacktrading.com Google Workspace account provisioned; changePasswordAtNextLogin: true; OU-level MFA enforced via orgUnitPath = /Pod Leaders |
| 3 | google_workspace_email written to Users table and Pod_Leader_Registry |
| 4 | Private Discord text and voice channel created, named pod-[leader_name] |
| 5 | channel_url written to trader's SQL user record |
| 6 | 'Pod Leader' Discord role assigned to trader |
| 7 | Pod_Leader_Welcome email sent to trader (personal email — includes Workspace activation link + channel URL + mandatory Typeform profile setup link) |
| 8 | (After Typeform submission) Trading_Style written to Pod_Leader_Registry; Is_Profile_Complete = TRUE; Pod Leader becomes visible to Flow 10 Matching Engine |
5. Basic Flow
Step 1. Receive Webhook
- Zapier catches the opt-in webhook from the
Pod_Leader_Inviteemail button. - Opt-in is a single button click — no form is shown and no profile data is collected at this step.
Trading_Styleis collected only by the Step 7.1 Typeform;Asset_Classis never selected (inherited fromUsers.asset_classat Step 2). - Payload contains:
user_id,leader_name.
(Source: Zapier Integration V7.pdf §Flow 15B line 2041 — "button click in the Pod_Leader_Invite Email"; Client confirmation 2026-09-28 — Asset_Class inherit; Client confirmation 2026-09-25 — Trading_Style via Typeform; BA decision 2026-10-30 — no opt-in form)
Step 2. Insert into Pod_Leader_Registry
- Insert record into
Pod_Leader_Registry(native PostgreSQL table) via SQL SELECT-INSERT to inheritasset_classdirectly from theUserstable:Leader_ID = user_idLeader_Name = leader_nameAsset_Class— inherited fromUsers.asset_class(NOT from form input)Trading_Style = NULL— written only at Step 7.1 (Typeform)Is_Profile_Complete = FALSEStatus = 'Active'Current_Count = 0Pending_Carry_Balance = $0.00Max_Capacity = 7(from Table CPod_Max_Capacity)google_workspace_email— written here after Step 3 resolves (or updated in Step 3)
(Source: Zapier Integration V7.pdf §Flow 15B line 2042; Client confirmation 2026-09-28 — Asset_Class inherited from Users table)
Step 3. Provision Google Workspace Account
- Call Google Workspace Admin Directory API:
- Endpoint:
POST /admin/directory/v1/users - Key fields:
primaryEmail = [firstname].[lastname]@stacktrading.com,orgUnitPath: /Pod Leaders,changePasswordAtNextLogin: true - Handle format:
firstname.lastname@stacktrading.com(lowercase, no diacritics). - OU-level MFA enforced (Google Authenticator required before Workspace access —
orgUnitPath = /Pod Leaders).
- Endpoint:
- Email collision handling (atomic loop):
WHILE GET /users/{handle}@stacktrading.com → 200: append 1, 2, 3, ...until unique (e.g.john.doe1@stacktrading.com). Do NOT useuser_idsuffix or other patterns. - Initiate Google Standard Invite Flow → activation link sent to personal
user_email; no password generated or stored by Middleware. - DB write:
UPDATE Users SET google_workspace_email = '{handle}@stacktrading.com'UPDATE Pod_Leader_Registry SET google_workspace_email = '{handle}@stacktrading.com'
(Source: Client confirmation 2026-09-28 — Flow 15B Step 2)
Step 4. Pod_Leader_Registry & Discord Auto-Provisioning — Create Discord Channel
- Call
POST /create-pod-channel:- Input:
user_id,leader_name - Middleware slugifies the channel name before calling Discord Bot:
- Convert to lowercase.
- Replace spaces with hyphens.
- Strip all Vietnamese accents and special characters.
- To prevent name collisions between leaders who share the same name: append the first 4 characters of
leader_idto the end of the slug. e.g.pod-john-doe-a7b2.
- Discord Bot creates a private text and voice channel with the slugified name.
- Sets permissions to assigned pod members.
- Leader channel access (per-user permission): IF the leader's
discord_user_id IS NOT NULL→ Bot grants the leader access to the channel at creation. IFdiscord_user_id IS NULL→ channel is still created; leader access is granted when the leader runs/link(BR_8.2.10.11). Access is never granted via the sharedPod Leaderrole. - Returns JSON:
{ "channel_id": "string", "channel_url": "URL_string" }
- Input:
- Zapier waits for JSON response containing
channel_url.
(Source: Zapier Integration V7.pdf §Flow 15B lines 2043–2045; RFQ_ Stack Trading Prop Tech V7.pdf §Create Pod Channel lines 2268–2280; Client confirmation 2026-09-20 — slugify + leader_id suffix)
Step 5. Write channel_url to User Profile
- Update SQL user record: write
channel_urlfrom Step 4 response to the trader's profile.
(Source: Zapier Integration V7.pdf §Flow 15B line 2046)
Step 6. Assign Discord Role
- Call
POST /manage-discord-role:- Input:
user_id,add_role = 'Pod Leader'
- Input:
- If
discord_user_id IS NULL→ endpoint returns200 OKand drops the action (BR_8.2.10.4). The role and channel access are applied when the leader later runs/link(BR_8.2.10.11).
(Source: Zapier Integration V7.pdf §Flow 15B lines 2049–2050; BA decision 2026-10-30 — late-linking)
Step 7. Send Welcome Email
- Send
Pod_Leader_Welcomeemail to trader's personal email (user_email— NOT@stacktrading.com). - Content: welcome kit including:
@stacktrading.comGoogle Workspace account handle.- Google Workspace activation link (from Step 3).
- Private Discord channel URL (
channel_url). - Calendar access links.
- Mandatory Typeform link for Trading Style profile setup (see Step 7.1):
https://form.stacktrading.com/mentor-profile-setup?leader_id={{user_id}}&email={{user_email}}(Hidden Fields auto-injected for automatic user identification).
(Source: Zapier Integration V7.pdf §Flow 15B line 2051; §Email Templates line 768; Client confirmation 2026-09-28 — Step 4; Client confirmation 2026-09-25 — Typeform mandatory in Pod_Leader_Welcome)
Step 7.1. Pod_Leader_Registry Profile Sync — Trading_Style (Typeform Webhook)
- Trigger:
New Entry Submittedfrom the Typeform linked in Step 7. - Pod Leader declares:
Trading_Style— multi-select:Scalping,Day Trading,Swing Trading,Algorithmic Trading(required; no sub-details needed per client confirmation)Asset_Class— displayed for reference only (pre-populated fromUsers.asset_class; read-only; Pod Leader cannot change it)
- Webhook fires from Typeform → Middleware (Zapier Flow 15B.1):
UPDATE Pod_Leader_Registry SET Trading_Style = '{{typeform.trading_style}}', Is_Profile_Complete = TRUE, Status = 'Active', Updated_At = NOW() WHERE Leader_ID = '{{typeform.leader_id}}'; - Note:
Asset_Classis NOT written from Typeform — it was already inherited fromUsers.asset_classat Step 2 insert. Typeform only confirms the display. - Effect on Flow 10:
Pod_Leader_Registryrow becomes fully visible to the Mentee Matching Engine only afterIs_Profile_Complete = TRUEis written. Until Step 7.1 completes, the Pod Leader is not matched with mentees. - Trigger Flow 11 (Waitlist Processor): immediately after
Is_Profile_Complete = TRUEis written, Middleware triggers ZapFlow 11: Waitlist Processorfor thisLeader_IDto fill the new pod's open slots fromPod_Waitlist(FIFO, sameAsset_Class). This — not the Step 2 registry insert — is the "new leader" event of UC_8.2.8 BR_8.2.8.1 #2.
(Source: Client confirmation 2026-09-25 — Typeform mandatory in Pod_Leader_Welcome; Trading_Style multi-select; Asset_Class display-only)
6. Exceptional Flows
Exc-1 — POST /create-pod-channel returns error or timeout:
channel_urlnot returned. Step 5 (DB write) and Step 6 (Discord role) cannot proceed.- Confirmed behavior (Option A — Retry + Alert): Do NOT roll back the
Pod_Leader_RegistryDB entry inserted in Step 2. Middleware retriesPOST /create-pod-channel3 times with exponential backoff. If all retries fail → SEV-1 Slack alert to#ops-itfor Ops to manually create the channel and updatechannel_urlin DB. - Rationale: Flow 15B is triggered by a button click in an email — there is no active dashboard UI to display an error to. DB rollback would leave the trader in a broken state with no recovery path.
- (Source: Client confirmation 2026-10-07)
Exc-2 — Google Workspace provisioning fails (Step 3):
- Confirmed behavior (Option A — Proceed): Allow the flow to continue (Steps 4–7: create Discord channel, assign Discord role, send welcome email to personal email). Log
WORKSPACE_PROVISIONING_FAILEDerror + send SEV-2 alert to#ops-itfor Ops to manually provision the Workspace account later. - After Ops manually provisions the Workspace account, a log entry is sufficient — Middleware does not need to send a secondary email. Ops triggers the native Google Workspace welcome email directly from the Google Admin console.
- (Source: Client confirmation 2026-10-07)
Exc-3 — discord_user_id is NULL when calling POST /manage-discord-role:
- Middleware drops Discord action and returns
200 OK. - DB writes (Steps 2, 3, and 5) remain committed. Email (Step 7) still sends.
- (Source: RFQ_ Stack Trading Prop Tech V7.pdf §Manage Discord Role lines 2345–2350)
Exc-4 — Duplicate opt-in (trader clicks button twice):
- ⚠️ Idempotency behavior not specified in source. BA assumption: check
Pod_Leader_Registryfor existingLeader_IDbefore inserting; skip insert if record exists withStatus = 'Active'. Response behavior (200 OK no-op vs 409 Conflict) pending dev confirmation.
7. Business Rules
BR_8.2.10.1: Min_Pod_Leader_Level sourced from Table C
The eligibility threshold for Pod Leader opt-in is Min_Pod_Leader_Level, read from Table C: Global_Variables. Current seed value = 7. This value must never be hardcoded in application logic — always read from Table C to allow configuration without a code deploy.
(Source: Zapier Integration V7.pdf §Table C line 217)
BR_8.2.10.2: Discord Channel Naming — Slugification + Collision Prevention
The channel name for each Pod Leader must be derived by slugifying leader_name:
- Convert to lowercase.
- Replace spaces with hyphens.
- Strip all Vietnamese accents and special characters.
- Append the first 4 characters of
leader_idto prevent collisions when two leaders share the same name (e.g.pod-john-doe-a7b2).
This slugification must be executed by Middleware in POST /create-pod-channel before the Discord Bot API call.
(Source: RFQ_ Stack Trading Prop Tech V7.pdf §Create Pod Channel lines 2273–2274; Client confirmation 2026-09-20)
BR_8.2.10.3: Current_Count Must Reflect Actual Assignments
Pod_Leader_Registry.Current_Count must be incremented each time a mentee is assigned to the leader (via Flow 10 Step 4). At provisioning (this flow), Current_Count is initialized to 0. Accuracy of this field is critical for the Flow 10 matching waterfall's capacity fallback logic.
(Source: Zapier Integration V7.pdf §Flow 10 Step 4 line 1828)
BR_8.2.10.4: Discord Resiliency — NULL discord_user_id
POST /manage-discord-role must return 200 OK when discord_user_id IS NULL. Flow must not crash. DB writes and email dispatch proceed regardless.
(Source: RFQ_ Stack Trading Prop Tech V7.pdf §Manage Discord Role lines 2345–2350)
BR_8.2.10.5: Asset Class Must Match 100% — Cross-Asset Pod Leadership Not Allowed
A Pod Leader's Asset_Class (Futures or Forex) must exactly match the asset class of all mentees assigned to their pod. A Forex trader cannot be a Pod Leader for Futures traders, and vice versa. Flow 10's matching criteria enforces "Asset Match (Strict)" as the primary gate — capacity and style are only evaluated after asset class is confirmed.
(Source: Client confirmation 2026-09-20 — "Yes, the match must be 100% strict")
BR_8.2.10.6: Google Workspace Provisioning — Regular Pod Leaders
Every Regular Pod Leader provisioned via Flow 15B MUST receive a @stacktrading.com Google Workspace account. The account is created under orgUnitPath = /Pod Leaders. OU-level policy enforces MFA (Google Authenticator) before any Workspace access is granted — Middleware does not implement MFA logic directly.
- Handle format:
firstname.lastname@stacktrading.com(lowercase, no diacritics). - Collision resolution: append sequential index (
1,2, ...) via atomic loop (e.g.john.doe1@stacktrading.com). - Activation link delivered to personal
user_emailvia Google Standard Invite Flow. No password generated or stored by Middleware. google_workspace_emailwritten to bothUserstable andPod_Leader_Registry(native PostgreSQL table).
(Source: Client confirmation 2026-09-28 — Flow 15B Step 2 — Workspace provisioning)
BR_8.2.10.7: Asset_Class Inheritance — Regular Pod Leaders Must Not Re-Select
Regular Pod Leaders (Level 7+) must NOT be prompted to select Asset_Class anywhere in this flow. Asset_Class is automatically inherited from Users.asset_class at DB write time (Step 2) and is shown read-only on the Step 7.1 Typeform. This prevents mismatch between a trader's live trading asset class and their Pod identity.
Founding Mentors (Flow 1.5) are exempt from this rule — they may be external hires with no existing Users.asset_class record and therefore MUST declare Asset_Class explicitly via Typeform (UC_8.2.13 Step 9).
(Source: Client confirmation 2026-09-28)
BR_8.2.10.8: Typeform Profile Sync — Trading_Style Confirmation Required Before Flow 10 Matching
Every Regular Pod Leader provisioned via Flow 15B MUST complete the Typeform profile setup (Step 7.1) before becoming visible to the Flow 10 Mentee Matching Engine. Is_Profile_Complete is initialized to FALSE at Step 2 insert and set to TRUE only by the Typeform webhook write. Pod Leaders with Is_Profile_Complete = FALSE are excluded from Flow 10 matching queries.
Asset_Class is displayed in the Typeform for reference only — it is read-only and pre-populated from Users.asset_class. The Pod Leader cannot change Asset_Class via Typeform.
(Source: Client confirmation 2026-09-25 — Typeform mandatory for standard Pod Leaders too; Asset_Class display-only)
BR_8.2.10.9: Discord Channel Failure — No DB Rollback; Retry 3× Then SEV-1
If POST /create-pod-channel fails or times out, the Pod_Leader_Registry record inserted in Step 2 MUST NOT be rolled back. Middleware retries with exponential backoff (3 attempts). If all retries fail, fire SEV-1 alert to #ops-it for Ops to manually create the channel and update channel_url in DB. Flow 15B is triggered by email button click — there is no active dashboard to display an error to, making DB rollback an unrecoverable dead end.
(Source: Client confirmation 2026-10-07)
BR_8.2.10.10: Google Workspace Failure — Non-Blocking; Cascade Continues
If Google Workspace provisioning fails at Step 3, the flow MUST NOT halt. Steps 4–7 (Discord channel, Discord role, welcome email) proceed normally. Ops is notified via SEV-2 alert to #ops-it and provisions the Workspace account manually. After Ops provision, Ops triggers the native Google Workspace welcome email from the Google Admin console — Middleware does not send a secondary email.
(Source: Client confirmation 2026-10-07)
BR_8.2.10.11: Late-Linking — Pod Leader Role + Own Channel Access on /link
When a user runs /link and Pod_Leader_Registry has a row with Leader_ID = user_id AND Status NOT IN ('Terminated', 'Permanently_Ineligible'), the bot MUST (1) assign the Pod Leader role and (2) grant that user per-user access to their own pod channel (Users.channel_url). Pod channel access is never granted via the shared Pod Leader role, so a leader cannot see other pods. Same rule as UC_8.2.13 BR_8.2.13.27 (Founding Mentors). Runs together with level-title sync (UC_8.1.1) and Pod Member sync (UC_8.2.1 A-04). ⚠️ UC_8.1.1 (/link handler, BA owner Huyen Dinh) not yet updated with this branch.
(Source: QnA_Level_Promotion §3.3 late-linking principle, 2026-09-30; BA decision 2026-10-30 — channel access granted at link time)
7.1 Leave & Hiatus Policy for Regular Pod Leaders (Flow 13 Integration)
Cross-reference: UC_9.2 — Flow 13 (Time-Off Management) governs the full leave pipeline. This section documents the Pod Leader-specific rules that apply when Flow 13 processes a leave request for a Regular Pod Leader (Level 7+).
7.1.1 Leave Does Not Revoke Pod Leader Role
Valid leave approved via Flow 13 does NOT cancel the Pod Leader role. BPS Admin MUST NOT manually trigger POST /api/bps/mentor/terminate during an approved leave period.
All Pod resources are preserved during On_Leave status:
| Resource | During On_Leave | Note |
|---|---|---|
Google Workspace @stacktrading.com | Active — access preserved | No Google Admin API call |
Discord channel pod-[leader_name] | Active — not archived | No POST /archive-pod-channel call |
Discord Role Pod Leader | Assigned — not revoked | No POST /manage-discord-role removal |
Pod mentee list (pod_id links) | Preserved — pod not dissolved | No mentee re-assignment |
Pod_Leader_Registry.Pending_Carry_Balance | Accruing / vesting — unchanged | Flow 17 vests normally; never reset to $0.00 |
(Source: QnA_STAGE6_POD_SYSTEM_FLOW10_11.md [POD-XF-15] client confirmed 2026-10-30; [POD-XF-18] client sheet 2026-11-04)
7.1.2 Pod_Leader_Registry Status Matrix
Status | Business State | Trading Account | Email & Discord | Pending_Carry_Balance |
|---|---|---|---|---|
Active | Working normally | Active | Active | Accruing / vesting normally |
On_Leave | On approved leave (Flow 13) — excluded from Flow 10 matching | Locked | Active (preserved) | Accruing / vesting normally |
Terminated | Terminated / Hard Breach (Flow 15C) | Disabled | Deleted / Revoked | Forfeited ($0.00) |
(Source: QnA_STAGE6_POD_SYSTEM_FLOW10_11.md [POD-XF-16] client confirmed 2026-10-30; [POD-XF-18] client sheet 2026-11-04)
7.1.3 Carry Balance Behavior During Leave
Pending_Carry_Balance continues to accrue and vest normally during approved leave. The monthly vest run (Flow 17, 1st of month) MUST include records with Pod_Leader_Registry.Status = 'On_Leave' — no freeze, no skip. Carry is only frozen on Drawdown Defense suspension (UC_8.2.9 BR_8.2.9.3) or forfeited on Termination (Flow 15C).
(Source: QnA_STAGE6_POD_SYSTEM_FLOW10_11.md [POD-XF-18]; QnA_BACKGROUND_MECHANISMS_CRON.md [BG-008] — client sheet 2026-11-04)
8. Data Model
Pod_Leader_Registry (native PostgreSQL table) — new record at opt-in
| Field | Initial Value |
|---|---|
Leader_ID | user_id from webhook |
Leader_Name | leader_name from webhook |
Asset_Class | Inherited from Users.asset_class (NOT user-entered — Regular Pod Leaders always trade their existing asset class) |
Trading_Style | NULL at insert — set by Step 7.1 Typeform (Scalping, Day Trading, Swing Trading, Algorithmic Trading — multi-select) |
Is_Profile_Complete | FALSE at insert — set to TRUE by Step 7.1 Typeform webhook after Trading_Style confirmed |
Max_Capacity | 7 (from Table C Pod_Max_Capacity) |
Current_Count | 0 |
Status | 'Active' |
Pending_Carry_Balance | $0.00 |
google_workspace_email | Written in Step 3 after Workspace provisioning |
(Source: Zapier Integration V7.pdf §Table E lines 777–790 — naming reference only; Pod_Leader_Registry is native PostgreSQL, see §2 Trigger note)
9. API Reference
| Endpoint | Method | Input | Output | Description |
|---|---|---|---|---|
POST /admin/directory/v1/users | POST | primaryEmail, orgUnitPath: /Pod Leaders, changePasswordAtNextLogin: true | 200 OK + user object | Google Workspace Admin Directory API. Provisions @stacktrading.com account. OU enforces MFA at first login. |
POST /create-pod-channel | POST | user_id, leader_name | { "channel_id": "string", "channel_url": "URL_string" } | Creates private Discord text+voice channel named pod-[leader_name]. Returns channel URL. |
POST /manage-discord-role | POST | user_id, add_role = 'Pod Leader' | 200 OK | Assigns 'Pod Leader' role via Discord Bot. Returns 200 OK if discord_user_id is NULL. |
(Source: RFQ_ Stack Trading Prop Tech V7.pdf §Create Pod Channel; §Manage Discord Role)
10. Email Templates
| Template Key | Trigger | Recipient | Content |
|---|---|---|---|
Pod_Leader_Welcome | Step 7 — after successful provisioning | Newly provisioned Pod Leader (personal email) | Welcome kit: @stacktrading.com Workspace account handle + activation link; private Discord channel URL; calendar access links; mandatory Typeform profile setup link |
(Source: Zapier Integration V7.pdf §Email Templates line 768)
11. Acceptance Criteria
| AC_ID | Flow | Given | Then | Type |
|---|---|---|---|---|
| AC-8.2.10-01 | Happy path | Trader clicks opt-in button in Pod_Leader_Invite email (no form) | Registry entry created with Asset_Class inherited from Users, Trading_Style = NULL, Is_Profile_Complete = FALSE; Google Workspace account provisioned; Discord channel pod-[leader_name] created; channel_url written to profile; 'Pod Leader' role assigned; Pod_Leader_Welcome email sent to personal email with Workspace activation link | Integration |
| AC-8.2.10-02 | Min level gate | Min_Pod_Leader_Level in Table C changed to 8 | Invite email not sent by Flow 6 for Level 7 trader; Flow 15B never triggered | Integration |
| AC-8.2.10-03 | NULL discord_user_id | discord_user_id IS NULL at Step 6 | POST /manage-discord-role returns 200 OK; flow does not crash; DB writes and email complete | Integration |
| AC-8.2.10-04 | Channel URL write | POST /create-pod-channel returns valid channel_url | channel_url written to SQL user record; matches value in Pod_Leader_Registry | Integration |
| AC-8.2.10-05 | Slugification | Leader name is "Nguyễn Văn A" | Channel created as pod-nguyen-van-a-[4chars]; Vietnamese accents stripped; spaces hyphenated | Integration |
| AC-8.2.10-06 | Name collision | Two leaders both named "John Doe" | Each gets unique channel: pod-john-doe-a7b2 and pod-john-doe-c3d4 (different leader_id suffixes) | Integration |
| AC-8.2.10-07 | Asset class gate | Forex trader (Level 7) opts in; only Futures Pod Leaders exist in registry | Forex trader cannot be assigned to any Futures Pod Leader; remains on waitlist until Forex leader available | Integration |
| AC-8.2.10-08 | Asset class inherit | Futures trader (Level 7) opts in | Pod_Leader_Registry.Asset_Class = 'Futures' inherited from Users.asset_class; no Asset_Class selector anywhere — shown read-only on the Step 7.1 Typeform | Integration |
| AC-8.2.10-09 | Workspace handle | Pod Leader name is "John Doe" and john.doe@stacktrading.com already exists | john.doe1@stacktrading.com provisioned; activation link sent to personal email | Integration |
| AC-8.2.10-10 | Typeform profile sync | Pod Leader submits Step 7.1 Typeform | Pod_Leader_Registry.Trading_Style written; Is_Profile_Complete = TRUE; Pod Leader becomes visible to Flow 10 Matching Engine | Integration |
| AC-8.2.10-11 | Asset_Class display-only in Typeform | Pod Leader opens Typeform | Asset_Class field pre-populated and read-only; Pod Leader cannot change it | Integration |
| AC-8.2.10-12 | Flow 10 visibility gate | Pod Leader provisioned but Typeform not yet submitted | Pod Leader does NOT appear in Flow 10 matching queries (Is_Profile_Complete = FALSE) | Integration |
| AC-8.2.10-13 | Exc-1: Discord channel retry | POST /create-pod-channel fails all 3 retries | Pod_Leader_Registry record NOT rolled back; SEV-1 alert fired to #ops-it; Ops creates channel manually and updates channel_url in DB | Integration |
| AC-8.2.10-14 | Exc-2: Workspace non-blocking | Google Workspace provisioning fails at Step 3 | Flow continues to Steps 4–7 (Discord channel created, role assigned, welcome email sent to personal email); WORKSPACE_PROVISIONING_FAILED logged; SEV-2 alert sent to #ops-it | Integration |
| AC-8.2.10-15 | Leader access — already linked | Leader has discord_user_id at opt-in | Leader granted access to own channel at Step 4; Pod Leader role assigned at Step 6 | Integration |
| AC-8.2.10-16 | Late-linking | Leader opted in while unlinked, later runs /link | Pod Leader role assigned; access to own channel granted; other pods not visible | Integration |
| AC-8.2.10-17 | Flow 11 on profile completion | Leader submits Step 7.1 Typeform; Pod_Waitlist has traders with the same Asset_Class | Flow 11 triggered for this Leader_ID; oldest matching waitlisted trader invited. Flow 11 NOT triggered at Step 2 insert | Integration |
12. Changelog
| Date | Version | Change | Previous | After | Source |
|---|---|---|---|---|---|
| 2026-11-04 | v1.8 → v1.9 | §7.1 cross-reference; §7.1.1 (carry row, mentee row, source); §7.1.2 On_Leave row + source; §7.1.3 rewritten | Carry frozen during On_Leave, Flow 17 skips On_Leave; cross-ref UC_9.13; source "RFQ V7 §Time-Off & Hiatus Management Engine" (does not exist) | Carry keeps vesting during leave, Flow 17 includes On_Leave; cross-ref UC_9.2; sources → client QnA | Client sheet 2026-11-04 [POD-XF-18] [BG-008]; client 2026-10-30 [POD-XF-15] [POD-XF-16] |
| 2026-09-18 | — → v1.0 | Initial document | — | Flow 15B full spec; all BRs; ACs | Zapier Integration V7.pdf §Flow 15B; RFQ_ Stack Trading Prop Tech V7.pdf |
| 2026-09-20 | v1.0 → v1.1 | Channel name slugification + collision prevention; Asset Class strict match confirmed | BR_8.2.10.2: channel named pod-[leader_name] with no special char handling. No asset class strict match BR. | Slugification: lowercase + hyphens + strip accents + first-4-of-leader_id suffix. BR_8.2.10.5 added: 100% strict Asset Class match enforced at Flow 10; cross-asset mentorship not allowed. AC-8.2.10-05/06/07 added. | Client confirmation 2026-09-20 |
| 2026-09-30 | v1.2 → v1.3 | Step 7: add mandatory Typeform link to Pod_Leader_Welcome email. Step 7.1 (new): Typeform webhook syncs Trading_Style + Is_Profile_Complete=TRUE to Table E. Asset_Class display-only in Typeform. Post-condition 8 added. Data Model: Is_Profile_Complete field added. Email template updated. BR_8.2.10.8 added. AC-8.2.10-10/11/12 added. | Step 7: welcome email had no Typeform link; no Step 7.1; Is_Profile_Complete not tracked; Flow 10 had no explicit gate on profile completeness | Step 7.1 syncs Trading_Style via Typeform webhook; Is_Profile_Complete = TRUE gates Flow 10 visibility; Asset_Class read-only in Typeform form (inherited from Users). | Client confirmation 2026-09-25 |
| 2026-09-28 | v1.1 → v1.2 | Google Workspace provisioning added (Step 3); Asset_Class inherit rule; Trading_Style-only form; Welcome email content updated; BR_8.2.10.6/7 added; Exc-2 added; Exc-2/3 renumbered; API Reference updated; Data Model updated; ACs updated | No Workspace provisioning for Regular Pod Leaders; opt-in form had both Asset_Class + Trading_Style; Welcome email had no Workspace content | Step 3 provisions @stacktrading.com account under orgUnitPath = /Pod Leaders via Google Admin API; Asset_Class inherited from Users.asset_class (not user-entered); form shows only Trading_Style; Welcome email includes Workspace activation link and channel_url; BR_8.2.10.6 (Workspace spec) + BR_8.2.10.7 (Asset_Class inherit) added; AC-8.2.10-08/09 added | Client confirmation 2026-09-28 |
| 2026-10-01 | v1.3 → v1.4 | Add §7.1 Leave & Hiatus Policy for Regular Pod Leaders (Flow 13 integration): resource preservation rules, Pod_Leader_Registry status matrix, carry balance freeze behavior during On_Leave | No leave policy section; no explicit On_Leave status matrix for regular Pod Leaders | §7.1 added: 3 sub-sections covering leave non-revocation rule, status matrix (Active / On_Leave / Terminated), carry balance frozen during On_Leave with Flow 17 skip rule | RFQ_ Stack Trading Prop Tech V7.pdf §Time-Off & Hiatus Management Engine |
| 2026-10-07 | v1.4 → v1.5 | Exc-1: confirmed Option A (retry 3× + SEV-1, no DB rollback). Exc-2: confirmed Option A (cascade proceeds, SEV-2 to #ops-it, log entry sufficient after Ops manual provision). BR_8.2.10.9 and BR_8.2.10.10 added. AC-8.2.10-13/14 added. | Exc-1: ⚠️ BA assumption (retry + alert). Exc-2: ⚠️ BA assumption (log + Slack; cascade or halt pending client confirm). | Exc-1: no DB rollback; 3 retries exponential backoff; SEV-1 if all fail. Exc-2: non-blocking; cascade Steps 4–7 continue; Ops provisions Workspace manually; Google Admin console triggers welcome email (Middleware sends no secondary email). | Client confirmation 2026-10-07 |
| 2026-10-17 | v1.5 → v1.6 | All "Table E" references renamed to Pod_Leader_Registry (native PostgreSQL table) — Document References, header Zapier Table row, §2 Trigger, Steps 2/4/7.1, §7.1 status matrix, §8 Data Model heading | Pod_Leader_Registry was referred to throughout as "Table E" / "Zapier Table E", implying it is sourced from a live Zapier Table | Added explicit PostgreSQL-native note at §2 Trigger: Pod_Leader_Registry is built natively in PostgreSQL as the single source of truth, not a live Zapier Table — "Table E" retained only as a naming/cross-reference convention to the original RFQ section | Client confirmation 2026-10-17 — PostgreSQL-only build instruction for Pod_Leader_Registry, restating POD-JOIN-02 |
| 2026-10-30 | v1.6 → v1.7 | Step 4: leader channel access rule; Step 6: unlinked note; BR_8.2.10.11 (late-linking) added; AC-8.2.10-15/16 added | Channel permissions said only "assigned pod members"; no rule for a leader who is not linked to Discord at opt-in (role dropped by BR_8.2.10.4 and never re-applied) | Leader access is granted per user: at creation if linked, else on /link, together with the Pod Leader role (BR_8.2.10.11). Never through the shared role. UC_8.1.1 /link handler (Huyen Dinh) not edited | QnA_Level_Promotion §3.3 (2026-09-30); BA decision 2026-10-30 |
| 2026-10-30 | v1.7 → v1.8 | Step 7.1: Flow 11 trigger added; AC-8.2.10-17 added. Step 1, Step 2, BR_8.2.10.7, §8 Data Model, AC-8.2.10-01: opt-in form removed | Nothing filled a new pod from the waitlist once the leader became matchable; UC_8.2.8 treated the Step 2 insert (before Typeform) as the "new leader" event. Trading_Style was collected twice in this flow — by an opt-in form at Step 1 (leftover from v1.2) and again by the Step 7.1 Typeform, which overwrote it | Flow 11 is triggered after Is_Profile_Complete = TRUE at Step 7.1, not at Step 2 insert. Opt-in is a single button click (payload user_id, leader_name); Step 2 inserts Trading_Style = NULL; Step 7.1 Typeform is the only place Trading_Style is collected. BR_8.2.10.7 Founding Mentor reference corrected Step 8.1 → UC_8.2.13 Step 9 | UC_8.2.8 BR_8.2.8.1 #2; Zapier Integration V7.pdf §Flow 15B ("button click"); Client confirmation 2026-09-25; BA decision 2026-10-30 |