Overview
The Social Feed API provides social networking features including following customers and stores, activity feeds, product interactions, and social discovery. The feed respects privacy settings - private accounts only show content to followers. Location:convex/customers/feed.ts
Privacy Controls
The feed system respects customer privacy settings:- Private accounts (default): Content only visible to followers
- Public accounts: Content visible to all users
- Users can always see their own content regardless of privacy settings
Follow Customer
Id<'customers'>
required
Customer doing the following
Id<'customers'>
required
Customer to follow
Follow Store
Id<'customers'>
required
Customer following the store
Id<'stores'>
required
Store to follow
Like Product
Id<'products'>
required
Product to like
Id<'customers'>
required
Customer ID
Get Feed
Retrieve personalized product-focused activity feed for a customer. The feed respects privacy settings and only shows content the user is authorized to see. Uses custom cursor-based pagination where the cursor is a timestamp string.Id<'customers'>
Customer ID (defaults to authenticated user if omitted)
PaginationOptions
required
Pagination options with
numItems (1-100) and cursor (timestamp string or null for first page)Feed Content Types
The feed includes these activity types (filtered by privacy):- Price Updates: From followed stores and on liked products
- Product Likes: From followed customers (only if you also like the product)
- Product Shares: From followed customers
- Direct Shares: Shared directly to you (always visible regardless of privacy)
- New Products: From followed stores
Get Feed Debug Info
Debug helper to inspect feed data sources for a customer. Returns counts of followed customers, stores, and recent activity.Id<'customers'>
Customer ID (defaults to authenticated user if omitted)
Create Test Product Activity
Helper mutation to create test product activity events for development and testing purposes.Id<'products'>
required
Product ID for the activity event
'price_update' | 'product_liked' | 'product_shared' | 'new_product'
required
Type of activity to create
Id<'customers'>
Optional actor customer ID
number
Previous price (for price_update events)
number
New price (for price_update events)
Test Feed
Test function to validate feed functionality. Runs a feed query and returns diagnostic information.number
Number of items to request (default: 10)
Social feed includes activity from followed customers and stores with real-time updates. Privacy-restricted content is automatically filtered out.
