Skip to content
Last updated

Lookup Catalog

Lookup Catalog enables RT 2.0 Personalization to reference external business data — such as product catalogs, coupon definitions, and sale schedules — at the moment a personalization request is made. Unlike profile attributes that store per-user values, Lookup Catalog data is keyed by a non-user dimension such as product_id and is queried in real time from RT 2.0's internal storage.

When to Use Lookup Catalog

Use Lookup Catalog when the personalization response must include data that varies by product, SKU, coupon, or another non-user dimension:

  • Return a sale banner that contains the specific discount rate and end date for the product currently being viewed.
  • Return a coupon reminder only when the user has a coupon applicable to the product they just added to the cart.
  • Return product recommendation metadata keyed by the user's most recently viewed item.

If your use case requires only per-user attributes (name, tier, purchase history), use Real-time Attributes instead.

How Lookup Catalog Works

Treasure Workflow
scheduled upload

Queried on each
p13n API call

cdp_lookup_catalog
database

RT 2.0
Internal Storage

Personalization Response

Client / SDK

Treasure Workflow
scheduled upload

Queried on each
p13n API call

cdp_lookup_catalog
database

RT 2.0
Internal Storage

Personalization Response

Client / SDK

  1. A data engineer prepares lookup tables in the cdp_lookup_catalog database in Data Workbench and runs a Treasure Workflow sync workflow to push the data to RT 2.0's internal storage.
  2. In Audience Studio, a Lookup Catalog Attribute is created for the parent segment, linking the catalog table to a runtime lookup key (an RT attribute value).
  3. When a personalization request arrives, RT 2.0 queries the matching row using the runtime key value and returns the column values as part of the offer payload.
  4. The client renders the returned values — for example, the TD Web SDK renders Liquid-resolved HTML into a DOM zone or popup.

Step 1 — Prepare Lookup Catalog Data

A data engineer creates and maintains lookup tables in the cdp_lookup_catalog database in Data Workbench.

Database and Table Conventions

  • The database is typically named cdp_lookup_catalog. Any Plazma database can be used, but this name is the standard convention.
  • The primary key is the first non-time column in the table — if the table's first column happens to be named time, the second column is used as the primary key instead. The primary key column must be unique, non-null, and of type string.
  • Additional columns can contain string, number, boolean, or array values (array<string>, array<int>, etc.). Arrays of arrays (nested arrays) are not supported — see Limitations.
  • Column names in Lookup Catalog Attribute configuration use the Plazma column name (not queryAs alias).
  • Data must be deduplicated and normalized before upload — the workflow does not deduplicate.
NULL key values cause upload failure

Rows where the primary key column is NULL or empty will cause the sync workflow to fail with a 400 error. Ensure all rows have a valid, non-null key value before uploading.

Example: Product Sale Table

A table limited_time_sale keyed by product_id:

product_id discount_rate sale_end banner_html
SKU-12345202026-07-31 23:59<div class='promo'>20% OFF — ends July 31</div>
SKU-67890152026-08-15 23:59<div class='promo'>15% OFF — ends August 15</div>
Sanitize HTML before storage

If a column stores raw HTML (as in banner_html above) and is rendered client-side via Liquid, make sure the source of that HTML is trusted and sanitized before it is ingested into the catalog table. Untrusted or user-generated HTML stored in a Lookup Catalog table can introduce an XSS risk when rendered in the browser.

Example: User–Product Coupon Table

A table user_product_coupon with a composite key (user_id + product_id concatenated) for cart-level coupon lookups:

user_product_id has_coupon coupon_code
user_001SKU-12345trueSAVE10
user_001SKU-67890trueFLASH15
Composite key order matters

When a Lookup Catalog Attribute uses multiple lookup keys (for example, user_id + product_id), the runtime values are concatenated without a delimiter, in the order the keys are defined in the attribute configuration (for example, user_001 + SKU-12345user_001SKU-12345). The composite key stored in the table must match this exact concatenation — do not insert a delimiter between the parts, or lookups will fail to match.

Array Column Support

Columns with array types (array<string>, array<bigint>, etc.) are fully supported. A row can have a mix of scalar and array columns.

product_id name price tags (array<string>)
SKU-12345Crew Tee29["sale", "tops", "new-arrival"]
SKU-67890Wide-leg Pants58["sale", "bottoms"]
Arrays of arrays are not supported

Multi-dimensional arrays (arrays nested inside arrays) are not supported. Flatten nested structures before ingestion.

Step 2 — Upload Data to RT Storage

The sync workflow reads from the cdp_lookup_catalog database and pushes changes to RT 2.0's internal storage via the Bulk Load API. Only records that have changed since the last run are uploaded (hash-based change detection).

The workflow automatically discovers all eligible tables in cdp_lookup_catalog and syncs them on each run; set the optional p_table_name parameter to restrict a run to a single table (useful for testing). For setup instructions, parameter reference, and troubleshooting, see Lookup Catalog Sync Workflow.

Data freshness

Lookup Catalog data is batch-synced — it is not streaming. The data reflects the state at the last workflow execution. Design your sync schedule based on how frequently your catalog data changes.

Step 3 — Create a Lookup Catalog Attribute

In Audience Studio, add a Lookup Catalog attribute to the parent segment.

  1. Open the parent segment in Audience Studio.
  2. Under RT Attributes, click Add Attribute and select Lookup Catalog.

Add Attribute dialog with the Lookup Catalog tab selected, showing Name, System ID, Description, Lookup catalog table, Lookup columns, and Lookup keys fields

  1. Configure the attribute fields:
Field Description
NameDisplay name for the attribute (for example, sale_end_at).
System IDInternal identifier used in Liquid templates and Entry Criteria (for example, sale_end_at). Auto-populated from Name but can be customized.
DescriptionOptional description for internal documentation purposes.
Lookup catalog tableSelect the table from cdp_lookup_catalog to use as the lookup source.
Lookup columnsSelect the columns to include in the response payload. Use the Plazma column name (not the queryAs alias).
Lookup keysSelect the RT attribute type (Single-Value Attribute, List Attribute, etc.) and the specific attribute whose runtime value is used to look up rows. Click + Add Lookup Key to add multiple keys for composite lookups. Order matters — keys are concatenated in the listed order to form the composite lookup key.
Composite key order

For composite keys, define lookup keys in the same order as the key columns are concatenated in the catalog table. Mismatched order produces lookup misses.

Deleting a column after attribute creation

If a column is removed from the catalog table after a Lookup Catalog Attribute has been configured to reference it, the attribute configuration is not automatically updated. The offer response will simply stop returning that column's data after the next sync.

Step 4 — Configure Entry Criteria (Optional)

Lookup Catalog Attributes can be used in Entry Criteria in Audience Studio to gate whether a personalization section is returned at all. This is server-side decision logic — the section and its entire payload are excluded from the API response when the condition is not met, so the client does not need to implement any conditional rendering logic.

Setting Up Entry Criteria in Audience Studio

  1. In Audience Studio, open the Personalization and navigate to the target section.

  2. In the Entry Criteria canvas, drag and drop the Lookup Catalog Attribute you created into a condition slot.

  3. Select the operator and value. For example, to return a section only when a coupon exists for the user–product combination:

    • Attribute: product_coupon → column: has_coupon
    • Operator: ==
    • Value: "true"

When this condition is not satisfied at request time, the section is omitted entirely from the personalization response.

No lookup_key required in the request

You do not need to pass a lookup_key field in the API request. RT 2.0 automatically concatenates the runtime attribute values in the order defined in Lookup keys and queries the catalog data internally.

Operators for Scalar Columns

Operator Description
==Equal to a value
!=Not equal to a value
<, <=, >, >=Numeric or timestamp comparison
IS NULL / IS NOT NULLNull checks
ANDCombine multiple conditions

Operators for Array Columns

When a Lookup Catalog column is array-typed and the lookup key is a Single-Value attribute (single-key lookup), the following operators apply:

Operator array_matching Semantics
ContainanyDoes any element in the array contain the substring?
InanyDoes the array contain any element exactly equal to one of the right-side values?
InallDo all elements in the array exactly equal one of the right-side values?

array_matching is required when using Contain or In on an array column. The not: true flag inverts either operator.

OR is not supported

OR logic in Entry Criteria is not supported for Lookup Catalog Attributes in the current release. Use multiple sections with separate entry criteria if needed.

Step 4b — Add to Personalization Payload

To include Lookup Catalog Attribute values in the API response, add the attribute to the Attribute Payload section of the Personalization configuration in Audience Studio.

  1. In Audience Studio, open the Personalization section configuration.
  2. Under Attribute Payload, add the Lookup Catalog Attribute columns you want returned.
  3. Save the configuration.

In M2, Lookup Catalog Attributes are treated as first-class attributes — they appear in the attributes sub-section of the response alongside Single, Counter, and List attributes.

Personalization API Response Structure

When a request matches the Entry Criteria, the response includes the Lookup Catalog Attribute values under offers.<section_name>.attributes:

{
  "offers": {
    "Coupon Reminder": {
      "attributes": {
        "product_coupon - has_coupon": "true",
        "product_coupon - coupon_ids": "CPN008"
      },
      "batch_segments": null,
      "td_app": null
    }
  }
}

When the Entry Criteria condition is not satisfied (for example, no coupon exists for that user–product combination), the section is omitted entirely:

{
  "offers": {}
}

Use Cases

Limited-Time Sale Banner

Show an inline sale banner on a product detail page only while a sale is active for that specific product.

  1. Create a limited_time_sale table keyed by product_id with discount_rate and sale_end columns.
  2. Create a Lookup Catalog Attribute (sale_info) using a Single-Value RT attribute that stores the current product_id as the lookup key.
  3. Set Entry Criteria: sale_info.discount_rate IS NOT NULL — the section is only returned when a sale row exists for this product.

Cart Coupon Reminder

Show a coupon reminder when the user has a coupon applicable to the product they just added to the cart.

  1. Create a user_product_coupon table with a composite key (user_id + product_id) and has_coupon, coupon_code columns.
  2. Create a Lookup Catalog Attribute (coupon) with two lookup keys: user_id first, then product_id (RT attribute storing the most recently added product).
  3. Set Entry Criteria: coupon.has_coupon == "true".

Interest Tag Personalization (Array Column)

Display personalized tags based on a product's associated keywords stored as an array column.

  1. Create a product_tags table with a product_id key and a keywords column of type array<string>.
  2. Create a Lookup Catalog Attribute (interest_tags) using the current product_id as the lookup key.
  3. Optionally set Entry Criteria: interest_tags.keywords Contain "sale" with array_matching: any.

Limitations

Limitation Detail
Batch sync onlyData is not updated in real time. Changes to the source table take effect only after the next sync workflow run.
No arrays of arraysMulti-dimensional arrays (arrays nested inside arrays) are not supported. Flatten nested structures before ingestion.
Key column constraintsThe primary key is the first non-time column in the table, must not contain NULL values, and must be of type string.
Schema changes require digest resetIf the primary key column is changed, the digest table (_wf_{table_name}_digests) must be dropped and recreated before the next workflow run. Previously uploaded data is not automatically deleted.
Sensitive lookup keysLookup keys marked as sensitive in Audience Studio cannot be used in client-side personalization requests. When a sensitive attribute is used as a lookup key, the entire section is redacted from the response for client-side requests.