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 theplaywright-firerockbrowser 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-idheader from abackend.leadconnectorhq.comcall in theplaywright-firerocksession and write it vianode "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→ rebuildsaudit/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-accountbrandStatus,campaignStatus,phonecount, derivedstatus(VERIFIED / IN PROGRESS / FAILED / NOT REGISTERED / BRAND ONLY / NO PHONE) andneeded. - 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 toghl-api-reference.md. - Extend the phone sweep (new mode in
scripts/ghl-audit.mjs, patterned on the existingPromise.allblock insweep()): 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/lcEmailStatusfrom meta.
Write audit/maintenance-matrix.json.
- Compile the maintenance matrix. Join
a2p-status.json+ the phone/pool sweep +meta.jsoninto 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 therefine()logic inbuild-a2p-html.mjsfor 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-firerockbrowser (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.jsonandaudit/maintenance-matrix.jsonregenerated with today'scapturedAt.- 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).