Social Proof System

Build trust with verified reviews and community engagement

Social Proof Overview

Litestore's social proof system transforms customer reviews and community engagement into powerful marketing tools that drive conversions and build trust.

Review System Architecture

Verified Purchase Reviews

Only customers who have actually purchased products can leave reviews:

// Review submission validation
const canReview = await prisma.orderItem.findFirst({
  where: {
    order: {
      userId: userId,
      status: 'completed'
    },
    productId: productId
  }
});

if (!canReview) {
  throw new Error('Must purchase product to leave review');
}

Review Structure

Comprehensive review data for maximum social proof:

interface Review {
  id: string;
  productId: string;
  userId: string;
  orderId: string; // Links to verified purchase
  rating: number; // 1-5 stars
  title: string;
  content: string;
  verified: boolean; // Always true for purchase reviews
  helpful: number; // Community voting
  photos: string[]; // User-generated content
  createdAt: Date;
  updatedAt: Date;
}

One Review Per Customer

Prevents spam while encouraging quality feedback:

// Enforce single review policy
const existingReview = await prisma.review.findFirst({
  where: {
    productId: productId,
    userId: userId
  }
});

if (existingReview) {
  throw new Error('You have already reviewed this product');
}

Moderation & Quality Control

Automated Moderation

AI-powered content analysis for quality and safety:

// Content analysis pipeline
const analysis = await analyzeReviewContent({
  title: review.title,
  content: review.content,
  rating: review.rating
});

// Results include:
// - Spam detection score
// - Sentiment analysis
// - Language quality metrics
// - Brand safety flags

Admin Review Queue

Human oversight for edge cases and quality control:

// Review queue management
const pendingReviews = await prisma.review.findMany({
  where: { status: 'pending' },
  include: {
    user: true,
    product: true,
    analysis: true // AI analysis results
  },
  orderBy: { createdAt: 'desc' }
});

Moderation Actions

// Approve review
await prisma.review.update({
  where: { id: reviewId },
  data: { status: 'approved', moderatedAt: new Date() }
});

// Reject with feedback
await prisma.review.update({
  where: { id: reviewId },
  data: {
    status: 'rejected',
    moderationReason: 'Inappropriate content',
    moderatedAt: new Date()
  }
});

// Request revisions
await notifyUser({
  userId: review.userId,
  message: 'Please revise your review to meet guidelines',
  reviewId: reviewId
});

Community Engagement Features

Helpful Voting System

Community moderation through collective intelligence:

// Vote on review helpfulness
const vote = await prisma.reviewVote.upsert({
  where: {
    reviewId_userId: {
      reviewId: reviewId,
      userId: currentUserId
    }
  },
  update: { helpful: isHelpful },
  create: {
    reviewId: reviewId,
    userId: currentUserId,
    helpful: isHelpful
  }
});

// Update review helpfulness score
const helpfulCount = await prisma.reviewVote.count({
  where: { reviewId: reviewId, helpful: true }
});

await prisma.review.update({
  where: { id: reviewId },
  data: { helpfulVotes: helpfulCount }
});

Review Responses

Enable dialogue between brands and customers:

// Brand response to review
const response = await prisma.reviewResponse.create({
  data: {
    reviewId: reviewId,
    userId: brandUserId, // Brand representative
    content: 'Thank you for your feedback! We appreciate your support.',
    isBrandResponse: true
  }
});

Review Analytics

Track engagement and impact:

// Review performance metrics
const analytics = await prisma.review.aggregate({
  where: { productId: productId },
  _count: { id: true },
  _avg: { rating: true, helpfulVotes: true }
});

// Individual review engagement
const engagement = await prisma.reviewEngagement.findMany({
  where: { reviewId: reviewId },
  include: { user: true, type: true } // views, shares, etc.
});

Social Proof Display

Product Page Integration

Seamlessly integrate reviews into product pages:

// Get reviews for product display
const reviews = await prisma.review.findMany({
  where: {
    productId: productId,
    status: 'approved'
  },
  include: {
    user: { select: { name: true, avatar: true } },
    votes: { where: { helpful: true } },
    responses: {
      include: { user: true },
      orderBy: { createdAt: 'asc' }
    }
  },
  orderBy: { helpfulVotes: 'desc', createdAt: 'desc' },
  take: 10
});

Review Summary Statistics

Display aggregate review data:

// Calculate review statistics
const stats = await prisma.review.aggregate({
  where: { productId: productId, status: 'approved' },
  _count: { id: true },
  _avg: { rating: true }
});

// Rating distribution
const distribution = await prisma.review.groupBy({
  by: ['rating'],
  where: { productId: productId, status: 'approved' },
  _count: { rating: true }
});

Highlight top-performing reviews:

// Get featured reviews
const featuredReviews = await prisma.review.findMany({
  where: {
    productId: productId,
    status: 'approved',
    OR: [
      { helpfulVotes: { gte: 5 } }, // Popular reviews
      { rating: 5 }, // Perfect reviews
      { photos: { isEmpty: false } } // Reviews with photos
    ]
  },
  orderBy: { helpfulVotes: 'desc' },
  take: 3
});

Conversion Optimization

Review-Driven Recommendations

Use reviews to improve product recommendations:

// Products frequently bought together (from reviews)
const recommendations = await prisma.review.groupBy({
  by: ['productId'],
  where: {
    userId: { in: reviewersWhoAlsoBought },
    rating: { gte: 4 }
  },
  _count: { productId: true },
  orderBy: { _count: { productId: 'desc' } }
});

Review-Generated Content

Automatically create marketing content from reviews:

// Extract positive highlights
const highlights = await extractReviewHighlights({
  reviews: approvedReviews,
  aspects: ['quality', 'design', 'performance', 'value']
});

// Generate marketing copy
const marketingCopy = await generateMarketingCopy({
  highlights: highlights,
  product: productData,
  targetAudience: 'social shoppers'
});

Anti-Spam & Quality Assurance

Duplicate Detection

Prevent review manipulation:

// Check for duplicate content
const similarReviews = await findSimilarReviews({
  content: newReview.content,
  productId: productId,
  threshold: 0.85 // 85% similarity threshold
});

if (similarReviews.length > 0) {
  // Flag for moderation
  await flagReview(newReview.id, 'potential_duplicate');
}

Bot Detection

Identify and block automated reviews:

// Behavioral analysis
const botScore = await analyzeBotBehavior({
  userAgent: request.headers['user-agent'],
  ipAddress: request.ip,
  submissionPattern: userSubmissionHistory,
  timing: submissionTiming
});

if (botScore > 0.7) {
  await blockReviewSubmission(userId, 'bot_detected');
}

Quality Scoring

Rate review quality automatically:

// Comprehensive quality analysis
const quality = await scoreReviewQuality({
  length: review.content.length,
  specificity: containsSpecificDetails(review),
  originality: !isDuplicate(review),
  helpfulness: await predictHelpfulness(review),
  sentiment: analyzeSentiment(review)
});

// Auto-approve high-quality reviews
if (quality.overall > 0.8) {
  await approveReview(review.id);
}

Integration & API

Review Import/Export

Migrate reviews from other platforms:

// Import reviews from CSV/other platforms
const importedReviews = await importReviews({
  source: 'shopify',
  data: csvData,
  mapping: {
    rating: 'star_rating',
    content: 'review_body',
    customerEmail: 'customer_email',
    productId: 'product_handle'
  }
});

Webhook Events

Real-time review notifications:

// Review webhook events
{
  "event": "review.created",
  "data": {
    "reviewId": "review-123",
    "productId": "prod-456",
    "rating": 5,
    "verified": true
  }
}

{
  "event": "review.approved",
  "data": {
    "reviewId": "review-123",
    "moderatedBy": "admin-789",
    "moderatedAt": "2024-01-15T10:30:00Z"
  }
}

Analytics & Insights

Review Performance Dashboard

Track review system effectiveness:

// Review analytics
const reviewAnalytics = {
  totalReviews: await prisma.review.count(),
  averageRating: await prisma.review.aggregate({
    _avg: { rating: true }
  }),
  reviewVelocity: calculateReviewVelocity(), // reviews per day
  helpfulnessRate: calculateHelpfulnessRate(),
  conversionImpact: measureReviewConversionImpact()
};

Customer Sentiment Analysis

Understand customer satisfaction trends:

// Sentiment tracking over time
const sentimentTrends = await analyzeSentimentTrends({
  productId: productId,
  timeframe: '30d',
  groupBy: 'day'
});

// Identify common pain points
const painPoints = await extractPainPoints({
  reviews: recentReviews,
  minRating: 3 // Include neutral/negative reviews
});

Best Practices

Review Collection Strategy

Maximize review volume and quality:

  1. Post-Purchase Emails: Automated review requests after delivery
  2. Incentives: Small rewards for verified reviews (without requiring positive ratings)
  3. Follow-ups: Gentle reminders for customers who haven't reviewed
  4. Multiple Touchpoints: Review links in order confirmations, apps, etc.

Moderation Guidelines

Maintain quality while encouraging honesty:

  1. Clear Guidelines: Publish review policies upfront
  2. Consistent Standards: Apply rules equally to all reviews
  3. Transparency: Explain moderation decisions when rejecting reviews
  4. Appeals Process: Allow customers to appeal moderation decisions

Community Building

Turn reviews into conversations:

  1. Respond to Reviews: Engage with customers who leave feedback
  2. Highlight Helpful Reviews: Feature community-approved content
  3. User-Generated Content: Showcase customer photos and stories
  4. Review Contests: Run campaigns encouraging detailed reviews

SEO Optimization

Leverage reviews for search visibility:

  1. Structured Data: Implement review schema markup
  2. Rich Snippets: Enable star ratings in search results
  3. Long-Tail Keywords: Reviews naturally include specific search terms
  4. Fresh Content: Regular reviews signal active product pages

Conversion Impact

Reviews can increase conversion rates by up to 270% according to some studies. Focus on collecting detailed, authentic reviews to maximize this effect.

On this page