GHL Maintenance Log: https://docs.google.com/spreadsheets/d/1qv0DoOY99Hs4SXPAjO3FhI1oZ6OClJHbv0HJ73I6YgE/edit?gid=0#gid=0
Note not all accounts will new A2P verification, tracking numbers, call pools, etc. Use the log to mark if they have them or not and we can fix if required.
Firerock Sub-Account Maintenance Log — A2P / Numbers / Call Pools Audit
Objective: Sweep all 45 Firerock sub-accounts for A2P 10DLC verification, tracking numbers, and call pools, then populate the GHL Maintenance Log Google Sheet with a per-account has-it / doesn't-have-it status so gaps can be prioritized for a later fix pass.
The Plan
- Read the log schema. Open the GHL Maintenance Log (
docs.google.com/spreadsheets/d/1qv0DoOY99Hs4SXPAjO3FhI1oZ6OClJHbv0HJ73I6YgE) via the playwright-firerock browser and capture the exact column headers + row order (which accounts are already listed). Map each column to a data source before touching anything. Do not assume columns — mirror what Patrick built. - Refresh the internal-API token. Capture the
token-id header from a backend.leadconnectorhq.com call in the playwright-firerock session and write it via node "C:\Paul AI\paul-ai-ghl-mcp\scripts\set-firerock-token.mjs" <token> (+ bearer file if stale). ~60 min TTL. - Refresh the account roster.
node scripts/ghl-audit.mjs meta → rebuilds audit/meta.json (45 locations, active flag, lcPhoneStatus, lcEmailStatus). This is the master row list to reconcile against the sheet. - Sweep A2P status.
node scripts/build-a2p-status.mjs → audit/a2p-status.json. Already returns per-account brandStatus, campaignStatus, phone count, derived status (VERIFIED / IN PROGRESS / FAILED / NOT REGISTERED / BRAND ONLY / NO PHONE) and needed. - Discover the call-pool endpoint (gap — not yet captured). In the logged-in browser, open a sub-account's Settings → Phone → Number Pools / call-tracking pools, capture the XHR to
backend.leadconnectorhq.com (expected /phone-system/...pools...), and confirm the response shape. Add it to ghl-api-reference.md. - Extend the phone sweep (new mode in
scripts/ghl-audit.mjs, patterned on the existing Promise.all block in sweep()): per active location pull
/phone-system/numbers/location/{loc} → count + list of numbers (tracking numbers),- the call-pool endpoint from step 5 → count + names (call pools),
- carry
lcPhoneStatus / lcEmailStatus from meta.
Write audit/maintenance-matrix.json.
- Compile the maintenance matrix. Join
a2p-status.json + the phone/pool sweep + meta.json into one row per account with a yes/no (or status) cell per sheet column: A2P Verified, Brand status, Campaign status, Has number(s), # numbers, Has call pool(s), Phone enabled, Email verified, Active/Stale, Notes/Action-needed. Reuse the refine() logic in build-a2p-html.mjs for the canonical A2P verdict. - Populate the Google Sheet. Match rows by account name to existing sheet rows; fill the status cells. Preferred: write directly via the Google Sheet in the
playwright-firerock browser (paste-per-column). Fallback if direct write is blocked: produce a paste-ready TSV block matching the sheet's exact column order for Paul to paste. Do not reorder or delete existing rows — only fill cells. - Flag the fix list. Produce a short prioritized "needs action" list (FAILED → NEEDS RESUBMIT → NOT REGISTERED → BRAND ONLY, plus missing call pools where a number exists). This is the input to a separate, approval-gated fix pass — no fixes in this task.
Build Primitives
- New script mode:
ghl-audit.mjs maintenance (numbers + call pools per active location) → audit/maintenance-matrix.json. - API reference addition: call-pool endpoint (path + response shape) in
ghl-api-reference.md. - No GHL objects, tags, or fields are created — this is read + report only.
Definition of Done
- Every account row in the Maintenance Log has A2P, tracking-number, and call-pool cells filled (has / doesn't-have / status), reconciled against the live 45-account roster (no missing rows, no orphan rows).
audit/a2p-status.json and audit/maintenance-matrix.json regenerated with today's capturedAt.- Call-pool endpoint captured and documented in
ghl-api-reference.md. - A prioritized "needs action" list handed to Paul for a later fix pass.
- Verification: spot-check 3 accounts (one VERIFIED, one NOT REGISTERED, one NO PHONE) by opening each in the GHL Trust Center + Phone Numbers UI and confirming the sheet cell matches the live UI.
Risks & decisions
- Sheet write access. If the Google Sheet can't be edited via the browser session (permissions / not authed), fall back to a paste-ready TSV for Paul. Confirm which path before writing.
- Call pools undocumented. Endpoint isn't captured yet (step 5). If it can't be pulled server-side, read call-pool presence per account from the Phone Numbers UI via browser — slower, but reliable.
- Column semantics. "Tracking numbers" may mean call-tracking pool numbers specifically vs. any provisioned LC number — confirm against the sheet's existing filled examples in step 1 before mapping.
- Read + report only. No A2P resubmissions, number provisioning, or pool creation in this task — those are ghost edits until a named fix ticket is approved (Firerock rule: no write without per-task sign-off).
- Token TTL. ~60 min; a full 45-account sweep plus browser capture may need a mid-run token refresh (step 2).
Not built yet.