About the tool
A recommendation activity is a saved bundle of catalog + algorithm + rules that the PRZIO SDK can serve when your storefront asks for products.
Product recommendations in PRZIO start with a recommendation activity bound (optionally) to a catalog. You pick one or more recommendation types — behavior signals, AI ranking, or pure rules — and PRZIO returns ordered products that match. Your site renders them with the API response.
Delivery is straightforward: feed your products with feedProduct, optionally track views with trackProductView, then call getRecommendations (or the REST endpoint) wherever you want a carousel — homepage, PDP, cart, post-search, account dashboard, email.
Why this model works for ecommerce
Marketing controls strategy (which algorithm, which rules, which catalog) without engineering changes. Engineering keeps full control of the rendering. Same activity stays consistent across web, mobile, and email.
How it works
From a fresh project to a live carousel — at a glance.
-
Create a catalog and feed products. Open Product Recommendation → Catalogs, create a catalog, copy its ID, and call
PrzioSDK.feedProducton each PDP. PRZIO stores categories, tags, brand, price, and any extra keys you send.
Step 1 — Catalogs list with the catalog ID and a chip preview of the first products. -
Verify products inside the catalog. Open the catalog row to see every product with image, name, ID, view/purchase counts, categories and tags. Use search and filter to validate your feed before shipping.
Step 2 — Confirm products: filters, view counts, and key/value chips. -
Create an activity and pick algorithms. Switch to the Recommendations tab, create a new activity, set a name, H1 title, max products, and tick one or more recommendation types. Bind the activity to your catalog if you want results scoped to it.
Step 3 — Pick algorithms: AI, behavior, or rules. Multiple types are mixed up to your max. -
Add rules and activate. Layer include/exclude rules to filter products further, set status to Activated, and embed via the SDK or REST endpoint.
Step 4 — Activate and embed: SDK snippet shown inside the activity.
All activities live under your project in PRZIO, alongside personalization, popups, and chatbot. Catalog-scoped data (products, view events) cascades when you delete a catalog.
Catalogs & products
A catalog is a logical bucket for product feeds. You can have many catalogs in one project (e.g. PROD::Products, QA::Products).
What's stored on each product
- productId — your SKU / unique ID.
- environment — defaults to
production; you can feed staging products separately. - thumbnails[] — primary image URLs.
- categoryPaths[] — colon-delimited category trees (e.g.
Electronics:Audio:Headphones). - tags[] — flat tags like
sale,bestseller. - keys{} — every other field you send (title, name, brand, price, slug, …) — used both for display and for rules.
What you see in the catalog
Each product row shows the resolved name (from name, product_name, title, or productId) next to the product ID, plus session views, purchases, cart abandons, categories and tags.
Recommendation types
Pick one or many. When you select multiple, results are merged and capped at your max.
aiBased
Mixes most viewed, most purchased, cart abandon, categories, and visitor history. Ranked by your configured AI provider (OpenRouter / OpenAI from project settings).
aiThemeBased
The LLM expands recently viewed categories into a lifestyle theme and recommends related catalog categories. Falls back to seed categories when no AI key is configured.
mostViewed
Top products across the site (or catalog, when bound), counted by unique sessions. Great for homepage and trending strips.
similarProduct
Score on shared categories, tags, brand, slug, and identifying keys against the seed product. Pass productId.
whoViewedThisViewedThat
Co-view from sessions that viewed the seed product, with a category/tag fallback when the catalog is small or sparse.
recentlyViewed
The visitor's literal recently viewed list — never enriched with similar items. Pass userIdentifier.
basedOnRecentlyViewed
Round-robin across categories the visitor browsed. Surfaces variety instead of more of the same item.
basedOnLastPurchased
Score new candidates against categories/tags from purchases. Cross-sell & replenishment.
basedOnCart
Bring back cart abandoners with related products from the items they almost bought.
criteria
Pure rule engine — match key/operator/value across categories, tags, brand, price, audience, or any catalog field.
Tip: For PDP carousels start with similarProduct + whoViewedThisViewedThat. For homepage, mostViewed + aiThemeBased with fallbackToRandom on. For cart, basedOnCart + basedOnLastPurchased.
Inclusion / exclusion rules
Layer rules on top of the algorithm to filter the candidate list further. Two lists, each combined with AND or OR.
Operators
| Operator | Use when |
|---|---|
equals / notEquals | Exact match on a field (e.g. brand equals Apple). |
contains / doesNotContain | Substring or partial match — useful for paths like categoryPaths. |
startsWith | Prefix match — e.g. category:slug begins with women. |
in | Treat the value as a list — match if any element is found. |
Match modes
| Mode | Behavior |
|---|---|
static | Compare candidate's key to the rule's literal value. Default. |
dynamic | Compare candidate's key to the SAME key on the seed product (the productId in the request, or the visitor's most recently viewed product when only userIdentifier is sent). Example: same brand as the current product. |
profile | Compare candidate's key to profileKey (defaults to the same key) on the visitor's profile attributes (audience + custom values set via setAudience / stitch). Example: targetGender equals visitor's gender. |
Hint: Both lists support and or or combination. If a dynamic rule's seed value is missing, the rule is treated as no-match — include rules drop the candidate, exclude rules keep it.
SDK: feedProduct
Send a product into a catalog from your PDP. Idempotent — calling again updates the same record.
PrzioSDK.feedProduct({
catalogId: 'YOUR_CATALOG_ID', // required
product: {
id: 'SKU-123', // required
thumbnails: ['https://example.com/img.jpg'],
environment: 'production', // default
title: 'Product Title',
description: 'Product description',
category: 'Electronics:Phones:Smartphones',
// OR multiple paths:
// categories: ['Electronics:Phones:Smartphones', 'Audio:Headphones'],
tags: ['sale', 'bestseller'],
price: 99.99,
brand: 'Acme',
// any other key — usable in rules and shown on cards
productPath: '/products/sku-123'
},
userIdentifier: 'user-123', // optional; defaults to przio-uuid cookie
sessionId: '...' // optional
});
Special keys
category/categories[]— colon-delimited paths. Stored oncategoryPathsinternally.tags[]— flat tags.thumbnails[]— primary image list. Falls back toimage_file,image_url,imageUrl,imageon display.productPath/url/link— used for the click-through link on rendered cards.
SDK: trackProductView
Record that a visitor viewed a product. Powers mostViewed, recentlyViewed, basedOnRecentlyViewed, and the aiThemeBased seed.
PrzioSDK.trackProductView({
productId: 'SKU-123',
catalogId: 'YOUR_CATALOG_ID', // optional — if you want catalog-scoped views
environment: 'production',
userIdentifier: 'user-123' // optional; defaults to przio-uuid
});
Most teams call this once per PDP load, right after feedProduct. Sessions are de-duplicated, so a visitor who reloads the same product page is counted as a single view per session.
SDK: getRecommendations
Browser-side helper that wraps the REST API and handles cookies / project ID for you.
const { recommendations, fallback, activity } = await PrzioSDK.getRecommendations({
activityId: 'YOUR_ACTIVITY_ID',
catalogId: 'YOUR_CATALOG_ID', // optional override
productId: 'CURRENT_SKU', // optional — for similar / wvtw
userIdentifier: 'user-123', // optional — for recently viewed / cart / purchase
excludeProductId: 'CURRENT_SKU', // optional — drop the current product
limit: 10,
environment: 'production',
recommendationType: 'mostViewed' // optional override
});
// recommendations = [{ id, thumbnails, categoryPaths, tags, ...keys }]
Note: When the activity has multiple types selected, results are merged and capped at the activity's limit (or your override). The fallback field tells you whether viewHistory or random top-up was applied so you can label the carousel ("Trending now" vs. "You might like").
REST API reference
Same endpoint getRecommendations hits — usable from servers or other clients.
Endpoint
GET https://app.przio.com/api/sdk/recommendations
Query parameters
| Parameter | Required | Description |
|---|---|---|
projectId | Yes | Your PRZIO project ID. |
activityId | No | Bound recommendation activity. When omitted, the most recently updated activated activity is used. |
catalogId | No | Override the activity's catalog (rare — usually set on the activity). |
environment | No | Defaults to production. Use QA / STAGE for non-prod feeds. |
limit | No | 1–50. Capped by the activity's max products. |
productId | Conditional | Required for similarProduct / whoViewedThisViewedThat unless userIdentifier can auto-seed from view history. |
userIdentifier | Conditional | Required for recentlyViewed, basedOnRecentlyViewed, basedOnLastPurchased, basedOnCart, aiThemeBased. Defaults to przio-uuid cookie when called from the browser. |
excludeProductId | No | Drop one product from results — usually the current PDP. |
recommendationType | No | Override the activity's type. Useful for testing. |
Example
GET /api/sdk/recommendations ?projectId=69f736a98edeecd183a5995c &activityId=69f79919546b619b944fb9d0 &userIdentifier=visitor-uuid-123 &limit=10
Response shape
A flat list of products with the keys you fed, plus image and category metadata.
{
"recommendations": [
{
"id": "SKU-123",
"thumbnails": ["https://example.com/sku-123.jpg"],
"categoryPaths": ["Electronics:Audio:Headphones"],
"tags": ["sale", "bestseller"],
"title": "Wireless Headphones",
"brand": "Acme",
"price": 99.99,
"productPath": "/products/sku-123"
}
],
"fallback": "viewHistory", // or "random", omitted when none
"activity": {
"name": "PROD:: Your Recently Viewed Product",
"h1Title": "Continue Shopping Your Last Viewed Product",
"description": "Pick up right where you left off and complete your purchase."
}
}
- recommendations[] — flat array. Each item has the catalog keys you sent on
feedProduct, plusid,thumbnails,categoryPaths,tags. - fallback — present when the primary algorithm underfilled the carousel.
viewHistory= topped up from category similarity,random= activity opted intofallbackToRandom. - activity — the H1 and description you set on the activity, ready to render above the carousel.
Recipes
Concrete activity setups you can copy.
Trending picks
Types: mostViewed + aiThemeBased
Rules: exclude tags contains hidden
Fallback: random
PDP carousel
Types: similarProduct + whoViewedThisViewedThat
Rules: include brand equals current product's brand (mode dynamic)
Pass: productId
Cart sidebar
Types: basedOnCart + basedOnLastPurchased
Rules: exclude SKUs already in cart (handled by excludeProductSkusSeen)
Pass: userIdentifier
Email "for you"
Types: aiBased
Rules: include targetGender equals visitor's gender (mode profile)
Pass: userIdentifier
Recently viewed
Types: recentlyViewed
Rules: none
Pass: userIdentifier
Sale category strip
Types: criteria
Rules: include tags contains sale AND price < 50
Pass: none