下一步可能做什麼?
一份最終分布,涵蓋本範例的4個支援事件;下一行為概率尚未經校準。
| 下一事件 | 概率 |
|---|---|
| 購買 | 37% |
| 造訪會員入口 | 28% |
| 點擊郵件 | 21% |
| 核銷優惠券 | 14% |
為什麼有些事件沒有概率?
「傳送郵件」屬於輸入脈絡,不是預測目標,因此概率為 null。不支援或沒有資料涵蓋的事件同樣保持不可用。
Developer Center · Engineering reference
The model layer under the Decide node: a per-brand Behavior Model (an event-sequence model of how each member behaves) plus a Digital Twin layer that runs it forward (counterfactual simulation and the synthetic research panel). This page covers what an integrator can actually touch: the events that feed it, the gate that decides whether it serves, the surfaces its outputs land on, and the MCP tools that drive the panel.
Use the governed read-only REST endpoints or MCP tools below for one member prediction. Next-behavior results and personal purchase windows share a response, with explicit availability and permission checks. Events still enter through the normal integration surfaces; additional outputs surface in segments, member profiles, lookalike, send-time optimization and the synthetic panel.
一次會員預測同時返回下一行為與個人購買窗口;品牌融合頭可用時,將個人訊號與整體需求趨勢結合。
互動範例
所有狀態與數值均為合成範例,不代表即時預測或工作空間可用狀態;不會傳送客戶資料。
已有行為預測仍可返回。品牌融合頭完成訓練並通過驗證前,個人購買窗口保持不可用。
一份最終分布,涵蓋本範例的4個支援事件;下一行為概率尚未經校準。
| 下一事件 | 概率 |
|---|---|
| 購買 | 37% |
| 造訪會員入口 | 28% |
| 點擊郵件 | 21% |
| 核銷優惠券 | 14% |
「傳送郵件」屬於輸入脈絡,不是預測目標,因此概率為 null。不支援或沒有資料涵蓋的事件同樣保持不可用。
CWM 個人訊號 + TimesFM 品牌需求趨勢。
預測窗口內至少購買一次的累計概率。三個窗口之間、窗口與行為分布之間均不能相加。
一次會員請求同時返回 distribution 與 purchaseWindows。
curl --request GET \
"https://YOUR_API_HOST/api/v2/cwm/members/YOUR_MEMBER_UUID/next-behaviors" \
--header "Authorization: Bearer YOUR_API_KEY"{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "cwm_predict_next_behaviors",
"arguments": {
"member_id": "YOUR_MEMBER_UUID"
}
}
}請替換 API 網域、會員 UUID 與工作空間 API 金鑰。
所需權限 · predictions:read 可讀取行為;額外授予 metrics:read(或 *)後,可在模型就緒時取得購買窗口。
僅為合成範例節選。品牌模型回應還包含完整事件目錄及涵蓋資訊;公共先驗參考採用獨立的6類詞表。
{
"predictionKind": "next_event",
"unit": "probability_0_1",
"status": "degraded",
"distribution": {
"status": "ok",
"vocabulary": "member_event",
"normalization": "conditional_on_supported_events",
"calibrated": false,
"rows": [
{
"key": "purchase.completed",
"label": "Purchase",
"probability": 0.37,
"rank": 1,
"availability": "predicted"
},
{
"key": "portal.visited",
"label": "Portal visit",
"probability": 0.28,
"rank": 2,
"availability": "predicted"
},
{
"key": "email.clicked",
"label": "Email clicked",
"probability": 0.21,
"rank": 3,
"availability": "predicted"
},
{
"key": "coupon.redeemed",
"label": "Coupon redeemed",
"probability": 0.14,
"rank": 4,
"availability": "predicted"
},
{
"key": "email.sent",
"label": "Email sent",
"probability": null,
"rank": null,
"availability": "context_only"
}
]
},
"purchaseWindows": {
"unit": "probability_0_1",
"probabilities": {
"7": null,
"30": null,
"90": null
},
"calibrated": false,
"envelope": {
"status": "unavailable",
"backend": "cwm-timesfm-2.5",
"reasonCodes": [
"fusion_not_trained"
]
}
},
"reasonCodes": [
"fusion_not_trained"
]
}合成資料 · TimesFM 2.5
基於128天合成歷史生成的預測範例,對比近期需求走勢、未來逐日預測和分位數範圍。
合成需求單位
| 日期(UTC) | 預測值 | q10–q90 |
|---|---|---|
| 2026-10-05 | 22.9 | 22.8–23.0 |
| 2026-10-06 | 21.3 | 21.2–21.4 |
| 2026-10-07 | 18.7 | 18.6–18.8 |
| 2026-10-08 | 17.1 | 17.0–17.1 |
| 2026-10-09 | 17.7 | 17.6–17.7 |
| 2026-10-10 | 20.0 | 20.0–20.1 |
| 2026-10-11 | 22.3 | 22.3–22.4 |
| 2026-10-12 | 22.9 | 22.9–22.9 |
| 2026-10-13 | 21.3 | 21.2–21.3 |
| 2026-10-14 | 18.7 | 18.6–18.7 |
| 2026-10-15 | 17.1 | 17.0–17.2 |
| 2026-10-16 | 17.7 | 17.6–17.7 |
| 2026-10-17 | 20.0 | 19.9–20.1 |
| 2026-10-18 | 22.4 | 22.3–22.4 |
| 2026-10-19 | 22.9 | 22.8–23.0 |
| 2026-10-20 | 21.3 | 21.2–21.4 |
| 2026-10-21 | 18.7 | 18.6–18.7 |
| 2026-10-22 | 17.1 | 17.0–17.1 |
| 2026-10-23 | 17.7 | 17.6–17.7 |
| 2026-10-24 | 20.0 | 19.9–20.0 |
| 2026-10-25 | 22.3 | 22.3–22.4 |
| 2026-10-26 | 22.9 | 22.8–22.9 |
| 2026-10-27 | 21.3 | 21.2–21.3 |
| 2026-10-28 | 18.7 | 18.6–18.7 |
| 2026-10-29 | 17.1 | 17.0–17.2 |
| 2026-10-30 | 17.7 | 17.6–17.7 |
| 2026-10-31 | 20.0 | 20.0–20.1 |
| 2026-11-01 | 22.4 | 22.3–22.4 |
| 2026-11-02 | 22.9 | 22.8–22.9 |
| 2026-11-03 | 21.3 | 21.2–21.3 |
本範例輸入為合成資料,預測由真實TimesFM 2.5權重生成。預測起點為2026-10-05(UTC),演示日期固定;分位數覆蓋率尚未經校準。數值不代表客戶實際需求或個人購買概率。
一次獲得一份最終概率分布與排序。通過評測的品牌模型優先,最多支援23類有資料覆蓋的目標;品牌模型不可用時,內部公共先驗模型彙總成一份6類參考分布。不支援及僅作上下文的事件保持不可用。
自動包含在同一份會員回應中:租戶獨立的輕量融合頭結合 CWM 訊號與 TimesFM 品牌趨勢。合格融合頭直接輸出;缺少訓練或評測時,購買窗口保持不可用,已有行為預測仍可返回。
TimesFM 2.5 服務已設定且逐日歷史完整時,可預測未來最多90天的銷售額、訂單數或商品銷量,並提供預測值和9個分位數。
下一行為概率在支援的候選類別中合計為100%,尚未經校準。購買窗口另行預測7/30/90天內至少購買一次的累計概率,不與行為類別一起正規化。行為分布未按靜默時長調整;公共先驗參考尚未通過工作區驗證。
需求分位數表達整體不確定性,不是個人購買區間,覆蓋率尚未經校準。缺失資料保持不可用;在工作區評測完成前,不宣稱精度提升。
# Bearer API key; predictions:read
GET /api/v2/cwm/capabilities
GET /api/v2/cwm/members/{id}/next-behaviors
# metrics:read additionally enables purchaseWindows in next-behaviors
# predictions:read AND metrics:read for standalone trend/windows
GET /api/v2/cwm/trends?metric=gmv&horizon_days=30
GET /api/v2/cwm/members/{id}/purchase-windows
# Read-only MCP equivalents
cwm_get_forecast_capabilities
cwm_predict_next_behaviors
cwm_forecast_aggregate_trend
cwm_predict_purchase_windowsPurchase probabilities use 0–1 units and cumulative, monotonic windows. Until trained and validated, the response contains probabilities: {"7":null,"30":null,"90":null} and calibrated: false. Existing CWM 0–100 mass scores keep their meaning. Aggregate forecasts return one point and q10..q90 per complete UTC day; missing daily buckets are not filled with zero. Category names require catalog_gmv or units_sold; draft input metrics are disclosed. Tenant and member authorization remain server-side. Readiness distinguishes service_unavailable, awaiting_training, awaiting_validation and ready. TimesFM 2.5 weights use Apache 2.0.
Next-behavior responses use predictionKind: next_event and unit: probability_0_1. One response includes distribution and purchaseWindows; individual expert results are internal. Purchase fusion is invoked automatically when metrics access permits. A validated tenant head serves cumulative 7/30/90-day probabilities; missing permission, training, validation or inputs leaves all windows null with an explicit reason. Available behavior predictions remain readable. These windows are not summed with the next-event distribution. The brand model's rows include all 48 standard events: 26 are consumer behaviors, 39 enter the sequence vocabulary, and 23 is the prediction-target ceiling. Only covered candidates supported by the active, evaluated generation receive probabilities; all other rows have probability: null and an explicit availability. Legacy input-frequency coverage is weaker corpus-presence evidence and cannot certify provenance-masked tag targets. New snapshots use positive targets from optimizer training windows, excluding validation members and masked rows. The final distribution includes rank, entropyBits, retainedModelMass, coverageBasis, modelVersion and calibrated: false. An available, evaluated brand model is used directly without requesting alternate expert outputs. Otherwise, valid public-prior distributions are equally averaged internally into one degraded pv / fav / cart / buy / rmcart / buy_disc reference. aggregation distinguishes single_tenant_model from uniform_valid_experts; vocabulary identifies the candidate key space. The two vocabularies are never blended. The uniform reference is not a learned multiclass gate and is not tenant-validated; public class-training coverage is unverified. Rounded zero mass does not prove absent class training. This endpoint needs predictions:read; purchaseWindows additionally needs metrics:read or *. Without metrics permission, the purchase component reports metrics_scope_required and makes no metric or fusion call. Status is ok only when both earned components serve, degraded for partial/reference results, and unavailable when neither serves. Store access and live processing eligibility are rechecked before personal external processing; insufficient evidence remains unavailable. One request shares its live CWM fingerprint internally across the behavior and purchase heads.
The model trains on the member event stream your integrations already produce — REST API v2 (orders, members), web & portal tracking, POS/receipt capture, loyalty and coupon activity. Events pass a governed catalog with a policy firewall before they can enter training; the firewall is enforced in the pipeline, not by convention.
Purchases, receipts, points earned/redeemed, tier changes, coupon claims/redemptions, email opens/clicks, push opens, portal visits/clicks, store check-ins. Every event type is explicitly admitted to the catalog — new event types don't train silently.
Anything the model itself writes back (its own tags and scores) is excluded — a model must not learn from its own output. Message content and free text never enter training: the model learns that a member clicked, never what the message said.
Members under a processing restriction (GDPR Art. 18) are excluded from training end-to-end, and an erased member's data — including their embedding — is removed as part of the deletion machinery itself.
Practical consequence for integrators: the richer and cleaner your event feed (correct member identity resolution, honest timestamps), the better the model — there is no separate “training upload.” See REST API and Web Tracking.
A brand's model is trained per tenant, deterministically (same data ⇒ same model, versioned), and it only serves after beating a transparent baseline on that brand's own held-out data. Downstream consumers never read the model directly — they go through a single serving predicate:
If any leg fails — the model hasn't earned its place yet, the brand paused scoring, or the model has gone stale — every consumer falls back to the glass-box predictive models (or an honest empty state, in lookalike's case). Nothing is ever zero-filled and nothing pretends: a member without an embedding is served by the fallback path, never padded into the model's.
Lifecycle a brand sees
not enough history to train honestly — nothing serves
trained, being tested against the baseline on held-out reality
beat the baseline — embeddings & predictions serve
scoring stops or the model ages out — automatic fallback
Three existing output families are available in the member and segment surfaces below. Use the governed REST or MCP prediction interface above for the unified next-event distribution and purchase windows.
A behavioral fingerprint per member, learned from their whole event sequence. Powers nearest-neighbor similarity: every member with behavior has one — no tags required.
Per-member purchase imminence and churn imminence (0–100), refreshed as behavior lands. Exposed as segment conditions — e.g. "Purchase Imminence (predicted next-event, 0-100)" — and on the member profile.
Each member's expected next-purchase window and engaged hour of day, from their own rhythm.
Your AI agents can operate the Digital Twin's research panel through the governed MCP server. Four panel tools, verbatim from the live manifest, alongside the read-only prediction tools above:
list_synthetic_scenarios
((none))
List the synthetic-panel simulation scenarios with each one's honest usability boundary, confidence ceiling, and input fields. Call first to pick a kind. Requires metrics:read.
run_synthetic_panel
(segment_id, kind, fields)
Run a synthetic panel: de-identified digital twins of a segment react to a stimulus, producing an honest directional report (never real absolute numbers). Returns a run_id to poll. Bounded by a daily run cap + ≤50 twins. Requires synthetic:write.
get_synthetic_report
(run_id)
Read the frozen honest report for a synthetic-panel run — directional read, confidence ceiling, suppression flags, themes — or a blockReason if not ready. Requires metrics:read.
get_synthetic_calibration
((none))
The brand's synthetic-panel calibration (hit rate of past synthetic predictions vs reality; null until backtests exist). Requires metrics:read.
Typical flow
Contract to design against: runs are bounded (daily run cap, ≤50 twins per run); reports are directional, never absolute numbers; a run that fails its honesty checks (panel collapse, sycophancy, too-small sample) comes back with a blockReason or suppression flags instead of a flattering result — treat those as terminal, not retryable. The same caps and rules apply whether a human or your agent starts the run. Setup, auth and scopes: MCP Integration Guide.
One model per tenant, trained on that tenant's members only. Nothing pools across brands — in either direction.
Same data produces the same model, bit for bit; every score is traceable to the model version that produced it.
Member erasure deletes their training data and embedding as part of the deletion transaction — not on a cleanup schedule.
Embeddings that outlive their freshness window are purged on schedule, and a stale model stops serving automatically.