Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

rt-personalization-validation

FreeNo executable scriptsNot checked

Validates RT Personalization Entity payloads before creation to prevent common API errors. MUST be invoked proactively during rt-setup-personalization…

treasure-databy treasure-data★ 23 GitHub stars

About this skill

RT Personalization Entity Validation

Validates personalization entity payloads and provides error-free templates.

When to Use This Skill

Proactive Validation (REQUIRED)

During rt-setup-personalization workflow at Step 9c:

  • MUST be invoked BEFORE making the personalization entity creation API call
  • Validates the complete payload JSON with actual values (not placeholders)
  • Prevents common API errors by catching issues before submission
  • This is a mandatory workflow step, not optional

Reactive Validation (Debugging)

After encountering API errors:

  • When seeing "Attribute payload can't be blank" errors
  • When personalization creation fails with validation errors
  • When reviewing existing personalization configurations
  • When troubleshooting payload structure issues

Critical Validation Rules

Rule #1: Empty Arrays Cause Errors

The #1 cause of "Attribute payload can't be blank" errors:

// ❌ FAILS - Empty arrays trigger validation errors
"stringBuilder": []
"attributePayload": []

// ✅ WORKS - Use null instead
"stringBuilder": null
"attributePayload": null
Value Result
null or omitted ✅ OK - skips validation
[] (empty array) ❌ ERROR - "can't be blank"

Rule #2: At Least One Payload Required

Section definition must include at least ONE of:

  • attributePayload (with content)
  • stringBuilder (with content)
  • catalogPayload (with content, feature-flagged)

All three cannot be null/empty simultaneously.

Rule #3: Misleading Error Messages

The API reports errors incorrectly:

Error: "sections[0].payload.node_id.definition.attribute_payload": ["Attribute payload can't be blank"]

Actual cause: stringBuilder: [] (empty array) Reported cause: attribute_payload (misleading)

Always check stringBuilder first when seeing "can't be blank" errors.


Field Validation Rules

attributePayload

Field Validation
outputName Required, max 256 chars, unique across all payload types
realtimeAttributeId Required, must exist in CDP cache
subAttributeIdentifier Required for ListAttribute/SlidingCounterAttribute only

subAttributeIdentifier rules:

  • ListAttribute → must match aggregation identifier
  • SlidingCounterAttribute → must match sub_duration identifier
  • SingleAttribute/CounterAttribute → must be absent

stringBuilder

Field Validation
outputName Required, max 256 chars, unique
values Required array of {type: "String", value: "..."}
values Cannot contain {{ or }} (template brackets forbidden)

segmentPayload

{
  "segmentPayload": {
    "batchSegments": [
      {"id": "segment_id_1"},
      {"id": "segment_id_2"}
    ]
  }
}
  • batchSegments required array
  • Each id required and unique

catalogPayload (Feature-Flagged)

Field Validation
catalogName Required
lookupAttributeId Required, must be SingleAttribute or ListAttribute
lookupColumn Required
outputName Required, max 256 chars, unique

Unsupported attribute types: ImportedAttribute, CounterAttribute Error: unsupported_attribute_type_for_lookup_catalog


Common Errors & Solutions

Error Message Root Cause Solution
attribute_payload: can't be blank stringBuilder: [] or attributePayload: [] Change [] to null
sub_attribute_identifier: invalid_attribute Missing for ListAttribute or wrong identifier Add correct aggregation identifier
output_name: duplicated Same name in multiple payloads Use unique names across all payload types
unsupported_attribute_type_for_lookup_catalog Counter/Imported in catalog lookup Use SingleAttribute or ListAttribute
personalization_invalid_string_builder {{ or }} in string values Remove template brackets
Name has already been taken Duplicate personalization name Use unique name or update existing

Error-Free Templates

Template 1: Minimal Valid Entity

{
  "attributes": {
    "audienceId": "PARENT_SEGMENT_ID",
    "name": "personalization_name",
    "description": "Description of use case",
    "sections": [{
      "name": "section_name",
      "entryCriteria": {
        "name": "trigger_name",
        "keyEventCriteria": {
          "keyEventId": "KEY_EVENT_ID",
          "keyEventFilters": null
        }
      },
      "payload": {
        "UNIQUE_NODE_ID": {
          "type": "ResponseNode",
          "name": "response_name",
          "definition": {
            "attributePayload": [{
              "realtimeAttributeId": "RT_ATTR_ID",
              "outputName": "output_name"
            }],
            "segmentPayload": null,
            "stringBuilder": null
          }
        }
      },
      "includeSensitive": false
    }]
  },
  "relat
Full SKILL.md on GitHub

Install rt-personalization-validation in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the rt-personalization-validation skill do?

Validates RT Personalization Entity payloads before creation to prevent common API errors. MUST be invoked proactively during rt-setup-personalization workflow at Step 9c before making the entity creation API call. Also use when encountering "Attribute payload can't be blank" errors or when reviewing personalization entity JSON.

How do I install the rt-personalization-validation skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the rt-personalization-validation skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare rt-personalization-validation with