Skip to main content

Overview

The Customer Products API provides product browsing functionality with personalized features including liked products, customer-specific pricing, and social interactions. This system enhances the shopping experience with recommendations and social proof. Location: convex/customers/products.ts

Get Products

Retrieve products for a store with optional category filtering and customer personalization.
customerId
Id<'customers'>
Customer ID for personalized results (shows liked status, recommendations)
storeId
Id<'stores'>
required
Store ID to get products from
categoryId
Id<'categories'>
Optional category filter to show only products in specific category

Get Liked Products

Retrieve products that a customer has liked.
customerId
Id<'customers'>
Customer ID (defaults to authenticated user)
categoryId
Id<'categories'>
Optional category filter

Product Browsing Components

Complete product browsing interface with social features:

Liked Products Page

Complete liked products management:

Product Personalization

The system provides personalized product experiences:

Like Status

Shows whether the customer has liked each product for quick recognition

Social Proof

Displays likes, shares, and order counts to help customers make decisions

Recommendations

Future: AI-powered recommendations based on liked products and order history

Wishlist

Liked products serve as a wishlist for future purchases

Product Interaction Features

Customers can like/unlike products for wishlist and social features:
Share products on social platforms:
Real-time stock level monitoring:

Error Handling

Status Code: 404
Status Code: 200 (Success with empty array)
Status Code: 404
Product data includes real-time stock levels, social interaction counts, and personalized information like like status for enhanced shopping experience.
Use the social stats (likes, shares, orders) to highlight popular products and help customers discover trending items in each store.