Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rt-setup-personalization

БесплатноБез исполняемых скриптовНе проверен

Complete workflow to set up RT 2.0 personalization from scratch - validates parent segment RT status, discovers event tables and attributes, configures RT…

treasure-dataот treasure-data★ 23 звезды на GitHub

Об этом скилле

RT 2.0 Personalization Setup - Complete Workflow

Orchestrates the complete RT personalization setup: parent segment validation → use case discovery → data exploration → RT config → personalization service → personalization entity deployment.

Prerequisites

  • TD CLI installed: tdx
  • Authenticated: tdx auth setup
  • Parent segment created in Data Workbench
  • Master API key with full permissions: export TD_API_KEY=your_key

Workflow Overview

Complete 9-step workflow. Each step must complete successfully before proceeding.

Step 1: Validate Parent Segment ✓
Step 2: Use Case Discovery ✓
Step 3: Explore PS Attributes ✓
Step 4: Discover Event Tables ✓
Step 5: Define ID Stitching ✓
Step 6: Define RT Attributes ✓
Step 7: Configure RT Infrastructure ✓ (SHARED with rt-setup-triggers)
Step 8: Create Personalization Service ✓
Step 9: Create Personalization Entity ✓
  9a. Get Parent Segment Folder
  9b. Get Key Event and Attribute IDs
  9c. Validate Payload (REQUIRED - use rt-personalization-validation skill)
  9d. Create Entity via API
Step 10: Verify & Test ✓

Steps 1-2: Validate & Discover Use Case

See steps/01-02-validate-discovery.md for detailed implementation.

Quick Summary

Step 1: Validate parent segment exists and check RT status

# Check if PS has RT enabled
tdx ps rt list --json | jq '.[] | select(.id=="<ps_id>" or .name=="<ps_name>") | {
  id, name,
  rt_status: .status,
  event_tables: (.event_tables | length),
  key_events: (.key_events | length)
}'

Expected outputs:

  • rt_status: "ok" → RT enabled, proceed to Step 2
  • rt_status: "updating" → Wait for RT to be ready
  • Empty result → PS not RT-enabled. Show error: "RT not enabled for this parent segment. Contact CSM."

Step 2: Ask user about use case (Web Personalization, Cart Recovery, User Profile API, etc.)

Checkpoints:

  • ✓ Parent segment ID confirmed
  • ✓ RT status validated ("ok" or "not_configured")
  • ✓ Use case selected

Steps 3-6: Data Exploration

See steps/03-06-data-exploration.md for detailed implementation.

Quick Summary

Step 3: Explore parent segment batch attributes

# List all RT-enabled parent segments
tdx ps rt list --json

# Show RT-enabled parent segments with status
tdx ps rt list --json | jq '.[] | {
  id, name,
  rt_status: .status,
  event_tables: (.event_tables | length),
  key_events: (.key_events | length)
}'

Step 4: Discover streaming event tables

tdx tables "<event_db>.*" --json | jq -r '.[].name'

Step 5: Define ID stitching keys (td_client_id, email, canonical_id) — only use columns that exist in event tables (verify with tdx describe

)

Step 6: Define RT attributes based on use case (single, list, counter types)

Checkpoints:

  • ✓ Batch attributes identified
  • ✓ Event tables discovered and selected
  • ✓ ID stitching keys defined
  • ✓ RT attributes planned (types and aggregations)

Step 7: Configure RT Infrastructure

SHARED CONFIGURATION - See steps/07-rt-config.md for complete implementation.

This step is identical for both RT Personalization and RT Triggers.

Quick Summary

7a. Configure Event Tables & Key Events

# Add event tables
tdx api "/audiences/<ps_id>/realtime_setting" --type cdp -X PATCH --data '{
  "eventTables": [{"database": "<db>", "table": "<table>"}]
}'

# Create key events
tdx api "/audiences/<ps_id>/realtime_key_events" --type cdp -X POST --data '{
  "name": "<event_name>",
  "databaseName": "<db>",
  "tableName": "<table>",
  "filterRule": {"type": "And", "conditions": []}
}'

7b. Configure ID Stitching ⚠️ CRITICAL: extLookupKey must be the Profile Key column from the Parent Segment master table (e.g., guest_id, customer_id), NOT a stitching key like email. Find it with:

tdx ps desc <ps_id> --json | jq '.master'

```bash
tdx api "/audiences/<ps_id>/realtime_setting" --type cdp -X PATCH --data '{
  "keyColumns": [
    {"name": "td_client_id", "validRegexp": null, "invalidTexts": [], "internal": false}
  ],
  "extLookupKey": "<profile_key>"
}'

7c. Create RT Attributes

# Single attribute
tdx api "/audiences/<ps_id>/realtime_attributes" --type cdp -X POST --data '{
  "name": "<attr_name>",
  "type": "single",
  "realtimeKeyEventId": "<key_event_id>",
  "valueColumn": "<column>",
  "dataType": "string",
  "duration": {"value": 1, "unit": "day"}
}'

# List attribute
tdx api "/audiences/<ps_id>/realtime_attributes" --type cdp -X POST --data '{
  "name": "<list_attr>",
  "type": "list",
  "realtimeKeyEventId": "<key_event_id>",
  "idColumn": "<id_column>",
  "maxItems": 100,
  "aggregations": [{
    "name": "items",
    "identifier": "items",
    "column": "<column>",
    "aggregationType": "distinct_list"
  }],
  "duration": {"value": 60, "unit": "day"}
}'

# Counter attribute
tdx api "/audiences/<ps_i
Полный SKILL.md на GitHub

Установить rt-setup-personalization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

steps/01-02-validate-discovery.mdsteps/03-06-data-exploration.mdsteps/07-rt-config.mdsteps/08-09-personalization.mdsteps/10-verification.md

FAQ

Что делает скилл rt-setup-personalization?

Complete workflow to set up RT 2.0 personalization from scratch - validates parent segment RT status, discovers event tables and attributes, configures RT infrastructure (events, attributes, ID stitching), creates personalization service, and deploys the personalization entity with payload. Use when user wants to "create realtime setup and build personalization" or "set up RT personalization end-to-end". Includes automatic validation using rt-personalization-validation skill to prevent common API errors.

Как установить скилл rt-setup-personalization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rt-setup-personalization запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rt-setup-personalization с