Command Palette

Search for a command to run...

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

rt-setup-triggers

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

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

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

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

RT 2.0 Triggers Setup - Complete Workflow

Orchestrates the complete RT triggers/journey setup: parent segment validation → use case discovery → data exploration → RT config → journey creation → activation 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
  • Webhook endpoint or integration configured (optional)

Workflow Overview

Complete workflow with checkpoints at each step.

Step 1-7: RT Infrastructure Configuration ✓ (SHARED with rt-setup-personalization)
Step 8: Create RT Journey ✓
Step 9: Create Activation ✓
Step 10: Configure Journey Stage & Entry Criteria ✓
Step 11: Wait for RT Infrastructure Ready ✓
Step 12: Launch Journey ✓
Step 13: Verify & Test ✓

Steps 1-7: RT Infrastructure Configuration

SHARED STEPS - See steps/01-07-shared-rt-config.md which references:

Quick Summary

Step 1: Validate parent segment RT status

tdx ps rt list --json | jq '.[] | select(.id=="<ps_id>") | {id, name, rt_status: .status}'

Step 2: Use case discovery (Welcome Journey, Cart Abandonment, High-Value Purchase, etc.)

Steps 3-6: Data exploration (batch attributes, event tables, ID stitching, RT attributes)

Step 7: Configure RT infrastructure

# Configure event tables, key events, RT attributes, ID stitching
# Wait for RT status "ok"
while [ "$(tdx ps rt list --json | jq -r --arg ps '<ps_id>' '.[] | select(.id==$ps) | .status')" != "ok" ]; do
  sleep 10
done

Checkpoints:

  • ✓ Parent segment validated
  • ✓ Use case selected (journey trigger)
  • ✓ Event tables configured
  • ✓ RT attributes created
  • ✓ ID stitching configured
  • ✓ RT status is "ok"

Step 8: Create RT Journey

See steps/08-journey-creation.md for detailed implementation.

Quick Summary

Ask user about journey trigger use case:

  • Welcome Journey (user signup → send email)
  • Cart Abandonment (add to cart → reminder)
  • High-Value Purchase (purchase > $500 → alert sales)

Create journey:

# Get folder
FOLDER_ID=$(curl -s "https://api-cdp.treasuredata.com/tree/audiences/<ps_id>/segment_folders?page%5Bsize%5D=100" \
  -H "Authorization: TD1 ${TD_API_KEY}" | jq -r '.data[0].id')

# Create journey in draft state
curl -X POST "https://api-cdp.treasuredata.com/entities/realtime_journeys" \
  -H "Authorization: TD1 ${TD_API_KEY}" \
  -H 'Content-Type: application/vnd.treasuredata.v1+json' \
  --data "{
    \"attributes\": {
      \"audienceId\": \"<ps_id>\",
      \"segmentFolderId\": \"$FOLDER_ID\",
      \"name\": \"<use_case>_journey\",
      \"reentryMode\": \"reentry_unless_goal_achieved\",
      \"realtimeJourneyStages\": [{\"name\": \"Stage 1\"}],
      \"state\": \"draft\"
    }
  }"

Checkpoint: Journey created in draft state.


Step 9: Create Activation

See steps/09-activation.md for detailed implementation.

Quick Summary

Ask user: "What activation should this journey trigger?" (Webhook, Salesforce, SendGrid, Braze)

Create authentication and activation:

# Create webhook connection
curl -X POST "https://api.treasuredata.com/v4/streaming_task_auths" \
  -H "Authorization: TD1 ${TD_API_KEY}" \
  --data "{\"auth_type\": \"td_webhook_out\", \"auth\": {\"url_prefix\": \"$WEBHOOK_URL\"}}"

# Create activation step
STEP_UUID=$(uuidgen | tr '[:upper:]' '[:lower:]')
curl -X POST "https://api-cdp.treasuredata.com/entities/realtime_journeys/$JOURNEY_ID/activations" \
  -H "Authorization: TD1 ${TD_API_KEY}" \
  --data "{
    \"attributes\": {
      \"stepUuid\": \"$STEP_UUID\",
      \"connectionId\": \"$CONNECTION_ID\",
      \"connectorType\": \"td_webhook_out\"
    }
  }"

Checkpoint: Activation created and linked to journey.


Step 10: Configure Journey Stage

See steps/10-journey-config.md for detailed implementation.

Quick Summary

Link activation to journey stage with entry criteria:

# Get trigger event ID
KEY_EVENT_ID=$(tdx api "/audiences/<ps_id>/realtime_key_events" --type cdp | \
  jq -r '.data[] | select(.name=="<trigger_event>") | .id')

# Configure stage
curl -X PATCH "https://api-cdp.treasuredata.com/entities/realtime_journeys/$JOURNEY_ID" \
  -H "Authorization: TD1 ${TD_API_KEY}" \
  --data "{
    \"attributes\": {
      \"realtimeJourneyStages\": [{
        \"id\": \"$STAGE_ID\",
        \"steps\": {
          \"$STEP_UUID\": {
            \"type\": \"TriggeredAct
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

steps/01-07-shared-rt-config.mdsteps/08-journey-creation.mdsteps/09-activation.mdsteps/10-journey-config.mdsteps/11-13-launch-verify.md

FAQ

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

Complete workflow to set up RT 2.0 triggers (RT journeys) from scratch - validates parent segment RT status, discovers event tables and attributes, configures RT infrastructure (events, attributes, ID stitching), creates RT journey with activations. Use when user wants to "create realtime triggers" or "set up RT journey end-to-end".

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

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

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

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

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

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