Summary
New tab under Organisation Settings that walks the user through connecting a Snowflake warehouse for analytics data delivery. This issue covers the first-time connect flow (empty state → configure → run SQL → test). The connected-state management (status card, disconnect, re-test) is tracked separately in FE-B.
Depends on: #7276 (POST create), #7277 (test), #7279 (GET list)
Flow
Three-step wizard. On page load, call GET /organisations/{id}/integrations/warehouse-connections/ — if the list is non-empty, skip the wizard and render FE-B (connected state). Otherwise enter Step 1.
Step 1 — Configure
- Warehouse type selector: Snowflake (active); BigQuery, Databricks, Redshift shown as greyed-out "coming soon" cards
- Form fields (all pre-filled with defaults; only Account identifier is truly required user input):
- Account identifier (required, placeholder
xy12345.us-east-1)
- Warehouse (default
COMPUTE_WH)
- Database (default
FLAGSMITH)
- Schema (default
ANALYTICS)
- Role (default
FLAGSMITH_LOADER)
- User (default
FLAGSMITH_SERVICE)
- Continue → fires
POST /warehouse-connections/. On 201, advance to Step 2. On 409 (already exists), redirect to FE-B. On validation error, surface inline.
Step 2 — Run SQL
- Read-only code block showing the
setup_script returned from Step 1, with a Copy button
- Short explainer: "Run this in your Snowflake account (as a user with ACCOUNTADMIN or SECURITYADMIN + SYSADMIN) to grant Flagsmith permission to deliver data."
- Link to Snowflake docs on running scripts
- I've run this, continue → button advances to Step 3
- Back button returns to Step 1 (re-hits POST is not needed; the script is also available via GET if they reopen the page)
Step 3 — Test
- Prominent Test connection button → fires
POST /warehouse-connections/{id}/test/
- Loading state while test runs (<5s)
- Success: green checkmark, short message, automatically transitions to the connected view (FE-B scope)
- Failure: red alert with the raw
error string from the response, plus two actions:
- Try again — re-fires the test
- Back to Step 2 — in case they need to re-run the SQL
States the UI must handle
- No connection configured → Step 1
- Connection exists but not tested → jump straight to Step 3 (the user closed the browser mid-flow;
GET returns status: pending_customer_setup)
- Connection exists and tested → render FE-B (out of scope here)
Behaviour on refresh mid-flow
setup_script is persisted server-side and returned by GET, so closing the browser and returning to the tab lands the user in whichever step matches the current status — no data loss.
Summary
New tab under Organisation Settings that walks the user through connecting a Snowflake warehouse for analytics data delivery. This issue covers the first-time connect flow (empty state → configure → run SQL → test). The connected-state management (status card, disconnect, re-test) is tracked separately in FE-B.
Depends on: #7276 (POST create), #7277 (test), #7279 (GET list)
Flow
Three-step wizard. On page load, call
GET /organisations/{id}/integrations/warehouse-connections/— if the list is non-empty, skip the wizard and render FE-B (connected state). Otherwise enter Step 1.Step 1 — Configure
xy12345.us-east-1)COMPUTE_WH)FLAGSMITH)ANALYTICS)FLAGSMITH_LOADER)FLAGSMITH_SERVICE)POST /warehouse-connections/. On201, advance to Step 2. On409(already exists), redirect to FE-B. On validation error, surface inline.Step 2 — Run SQL
setup_scriptreturned from Step 1, with a Copy buttonStep 3 — Test
POST /warehouse-connections/{id}/test/errorstring from the response, plus two actions:States the UI must handle
GETreturnsstatus: pending_customer_setup)Behaviour on refresh mid-flow
setup_scriptis persisted server-side and returned byGET, so closing the browser and returning to the tab lands the user in whichever step matches the current status — no data loss.