Home / Ops / More in this area

Affirmology NDA Gate to CRM Flow Build Brief v1

Updated Jun 29, 2026 · Affirmology_NDAFlow_BuildBrief_v1.md

Summary. For: a Claude Code session on the Mac (repo access, the keys in affirmology-studio/.env, Cloudflare token, can deploy the Worker). How to use: paste this whole file as the kickoff.

Affirmology NDA Gate to CRM Flow Build Brief v1

For: a Claude Code session on the Mac (repo access, the keys in affirmology-studio/.env, Cloudflare token, can deploy the Worker). How to use: paste this whole file as the kickoff.


0. Goal (one paragraph)

Automate the demo-access pipeline end to end: a warm contact opens their personal link, signs the full NDA through SignWell, and the moment they finish, a record is written to the Airtable CRM and demo access is granted, with funnel events tracked along the way. No manual steps per person. This replaces the in-page clickwrap gate that is currently in affirmology-site/index.html.

1. Hard rules

2. The flow to build

  1. Each invite link carries a personal token: demo.affirmology.ai/?id=<token>. The page maps the token to a person and passes name/email into SignWell as prefill.
  2. The gate becomes "review and sign to enter": it presents the NDA via SignWell (reusable Template Link, or an API-created signing session), not a checkbox.
  3. On SignWell "document completed", a webhook hits our endpoint, which: upserts the People row in Airtable (NDA signed = true, signed-at, name, email, phone, Stage = "NDA signed"), and grants demo access (one-time access token, or add the email to the Cloudflare Access allowlist for the demo).
  4. Funnel events (link clicked, demo listened, vision watched, report read, beta committed) POST to /api/track and update the same People row.

3. Where things live

All paths are LOCAL files under the project root on the Mac: /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/. Open them by that local path. (If the folder also syncs to Google Drive, ignore the Drive copy and use the local path.)

4. Airtable target (already built)

5. SignWell specifics

6. Endpoints to build on the Worker

7. Demo-taker reconciliation

The engine emails a notification per render and the Listening Room/library has every entry. Add a periodic job (or reuse the render-complete signal) that matches the render's email to People and sets Demo listened + Stage "Took demo". This closes the loop between "signed" and "actually experienced it".

8. Acceptance criteria

9. Build order

  1. Confirm the Airtable token can see base appSuTUcOQbpkxLUR (section 4 prerequisite).
  2. Add SIGNWELL_API_KEY to .env; build the /api/nda-webhook and /api/track Worker routes with server-side Airtable upserts.
  3. Swap the index.html gate to the SignWell "sign to enter" flow with token prefill and the access grant.
  4. Wire the SignWell webhook to /api/nda-webhook; test a real signature end to end.
  5. Add the demo-taker reconciliation.
  6. Run the acceptance pass in section 8.

Keep it lean and idempotent. The signing-to-access-to-CRM loop is the must-have; the reconciliation and the status-check are fast-follows.