Customer 360 Pipeline
A fusion recipe over the shared block palette: one ingest spine joins pre-loaded warehouse tables with
staged documents, then optional heads for operational routing, search, and portfolio landscape.
When to use
- Mixed customer documents on a stage — tickets, chats, surveys, calls, errors, transcripts.
- Structured tables in Snowflake — master profile plus enrichment tables — joined into one record per customer.
- AI classification and signal extraction on documents.
- Risk scoring, grounded search, and/or product-health rollups with executive briefings.
Do NOT use for: doc-only routing with no warehouse tables →
../structured-extraction/SKILL.md; search-only →
../enterprise-search/SKILL.md; corpus themes without a per-customer record →
../corpus-intelligence/SKILL.md.
Read first
../conventions.md · ../../blocks/README.md ·
../../blocks/conventions.md.
Read examples/basic.md before you build.
Shape: one spine, optional heads
Spine: ingest → modality-aware text → classify on file content → doc signals → DT_<prefix>_ENTITY
FROM <master_table> with LEFT JOIN to doc aggregates and each enrichment table on <entity_key>.
This is the records/entity contract extended with warehouse tables.
Heads — build only what the prompt named; list every lane at the build gate:
Recipe — spine
ingest/ingestion → ingest/parse-text →
derive <entity_key> from path → extract/classify on TO_FILE or text body →
doc signals via AI_COMPLETE JSON, or per-type extract/fields when schemas are
named → DT_<prefix>_ENTITY with warehouse LEFT JOINs → serve/final-shape.
Modality: route formats through parse-text.md; audio uses
AI_TRANSCRIBE per that block. If ingest already stores plain-text bodies in a file-log CONTENT column, join
that in the doc-rows DT to skip re-parsing .txt. Default path key: token before __ in the basename.
Classification: AI_CLASSIFY on content — never path-only DOC_TYPE.
Intake — hard requirements
With ../conventions.md hard requirements, confirm:
<master_table> — one row per entity; default spine.
- Enrichment tables — open list: table name, join key, aggregates to compute. Do not load unless the user asks.
<entity_key> linkage — default path-derived.
AI_CLASSIFY labels — include other.
- Heads to build — operational / search / landscape / embed; spine always.
Intake topics
| Topic |
Default |
Block |
| Entity universe |
all <master_table> rows |
doc-only spine only if asked |
| Structured data loaded? |
yes — pipeline only |
— |
| Doc signals |
classify + AI_COMPLETE JSON |
extract/fields if schemas named |
| Risk / route |
deterministic SQL |
reason + triage for AI judgment |
| Search / RAG |
on when asked |
search/* |
| Landscape |
metrics + synthesize when trends named; else inline rollup |
analyze/* |
| Per-doc embeddings |
off |
summarize-embed if asked |
| Terminal lag |
1 hour |
base Step 7 |
Refresh
Spine, operational, and search chunk DTs: INCREMENTAL. metrics-trend / synthesize: FULL when used.
Inline landscape rollups on the 360 record may stay INCREMENTAL. Cortex Search self-refreshes but still needs an
INCREMENTAL chunk DT upstream.
Smoke checks
- One file log;
AI_CLASSIFY on content.
- Entity DT row count matches
<master_table> unless doc-only spine; SQL joins at least one enrichment table.
- Operational:
RISK_TIER / ROUTE populated when head built.
- Search:
DT_<prefix>_CHUNKS reads doc rows; chunks populated; SEARCH_PREVIEW hits on a sample query.
- Landscape: sane rollup rows and non-empty briefing when built.
Examples
examples/basic.md — start here.
1---2name: customer3603description: "Build a persistent Customer 360 pipeline that unifies pre-loaded warehouse tables with staged documents — classify and extract AI signals, join into one record per customer, score risk and route action lanes, optional Cortex Search RAG, optional product-health landscape with executive briefing. Use when structured customer, transaction, telemetry, and survey data already lives in Snowflake and mixed support docs land on a stage. Triggers: customer 360, unify structured and unstructured data, CSM pipeline, join documents with warehouse tables, customer risk route, product health monitoring, campaign impact analysis, executive customer insights."4parent_skill: ai-functions-pipeline-builder5metadata:6 source: https://skillmd.com/skills/s-14-h/customer3607---89# Customer 360 Pipeline1011A **fusion recipe** over the shared block palette: one ingest spine joins **pre-loaded warehouse tables** with12**staged documents**, then optional heads for operational routing, search, and portfolio landscape.1314## When to use1516- Mixed customer documents on a stage — tickets, chats, surveys, calls, errors, transcripts.17- Structured tables in Snowflake — master profile plus enrichment tables — joined into one record per customer.18- AI classification and signal extraction on documents.19- Risk scoring, grounded search, and/or product-health rollups with executive briefings.2021**Do NOT use for:** doc-only routing with no warehouse tables →22[`../structured-extraction/SKILL.md`](../structured-extraction/SKILL.md); search-only →23[`../enterprise-search/SKILL.md`](../enterprise-search/SKILL.md); corpus themes without a per-customer record →24[`../corpus-intelligence/SKILL.md`](../corpus-intelligence/SKILL.md).2526## Read first2728[`../conventions.md`](../conventions.md) · [`../../blocks/README.md`](../../blocks/README.md) ·29[`../../blocks/conventions.md`](../../blocks/conventions.md).3031Read [`examples/basic.md`](examples/basic.md) before you build.3233## Shape: one spine, optional heads3435**Spine:** ingest → modality-aware text → classify on file content → doc signals → `DT_<prefix>_ENTITY`36`FROM <master_table>` with `LEFT JOIN` to doc aggregates and each enrichment table on `<entity_key>`.37This is the [`records/entity`](../../blocks/records/entity.md) contract extended with warehouse tables.3839**Heads** — build only what the prompt named; list every lane at the build gate:4041| Head | Triggers | Blocks |42|------|----------|--------|43| Operational | risk, route, triage | Deterministic `RISK_TIER` / `ROUTE` on the 360 record, or [`records/reason`](../../blocks/records/reason.md) + [`records/triage`](../../blocks/records/triage.md) for AI judgment |44| Search | searchable text, RAG, Q&A | [`search/chunk-index`](../../blocks/search/chunk-index.md) + [`search/rag-answer`](../../blocks/search/rag-answer.md) |45| Landscape | product health, campaign impact, briefing | [`analyze/metrics-trend`](../../blocks/analyze/metrics-trend.md) + [`analyze/synthesize`](../../blocks/analyze/synthesize.md), or one rollup DT with inline `AI_COMPLETE` briefing |46| Embed | similarity, clustering beyond search | [`analyze/summarize-embed`](../../blocks/analyze/summarize-embed.md) on the doc spine; off by default |4748## Recipe — spine4950[`ingest/ingestion`](../../blocks/ingest/ingestion.md) → [`ingest/parse-text`](../../blocks/ingest/parse-text.md) →51derive `<entity_key>` from path → [`extract/classify`](../../blocks/extract/classify.md) on `TO_FILE` or text body →52doc signals via `AI_COMPLETE` JSON, or per-type [`extract/fields`](../../blocks/extract/fields.md) when schemas are53named → `DT_<prefix>_ENTITY` with warehouse `LEFT JOIN`s → [`serve/final-shape`](../../blocks/serve/final-shape.md).5455**Modality:** route formats through [`parse-text.md`](../../blocks/ingest/parse-text.md); audio uses56`AI_TRANSCRIBE` per that block. If ingest already stores plain-text bodies in a file-log `CONTENT` column, join57that in the doc-rows DT to skip re-parsing `.txt`. Default path key: token before `__` in the basename.5859**Classification:** `AI_CLASSIFY` on content — never path-only `DOC_TYPE`.6061## Intake — hard requirements6263With [`../conventions.md`](../conventions.md) hard requirements, confirm:64651. `<master_table>` — one row per entity; default spine.662. Enrichment tables — open list: table name, join key, aggregates to compute. Do not load unless the user asks.673. `<entity_key>` linkage — default path-derived.684. `AI_CLASSIFY` labels — include `other`.695. Heads to build — operational / search / landscape / embed; spine always.7071## Intake topics7273| Topic | Default | Block |74|-------|---------|-------|75| Entity universe | all `<master_table>` rows | doc-only spine only if asked |76| Structured data loaded? | yes — pipeline only | — |77| Doc signals | classify + `AI_COMPLETE` JSON | `extract/fields` if schemas named |78| Risk / route | deterministic SQL | `reason` + `triage` for AI judgment |79| Search / RAG | on when asked | `search/*` |80| Landscape | metrics + synthesize when trends named; else inline rollup | `analyze/*` |81| Per-doc embeddings | off | `summarize-embed` if asked |82| Terminal lag | 1 hour | base Step 7 |8384## Refresh8586Spine, operational, and search chunk DTs: **`INCREMENTAL`**. `metrics-trend` / `synthesize`: **`FULL`** when used.87Inline landscape rollups on the 360 record may stay `INCREMENTAL`. Cortex Search self-refreshes but still needs an88`INCREMENTAL` chunk DT upstream.8990## Smoke checks9192- One file log; `AI_CLASSIFY` on content.93- Entity DT row count matches `<master_table>` unless doc-only spine; SQL joins at least one enrichment table.94- Operational: `RISK_TIER` / `ROUTE` populated when head built.95- Search: `DT_<prefix>_CHUNKS` reads doc rows; chunks populated; `SEARCH_PREVIEW` hits on a sample query.96- Landscape: sane rollup rows and non-empty briefing when built.9798## Examples99100- [`examples/basic.md`](examples/basic.md) — start here.