E-commerce Personalization

Remember shopping preferences, past purchases, and product interests for tailored shopping experiences

Problem Statement

E-commerce platforms need to remember user preferences, past purchases, product interests, and budget constraints to provide personalized shopping experiences. Without a centralized memory system, personalization data becomes fragmented across different systems, making it difficult to maintain consistency and provide truly personalized recommendations.

Traditional approaches often rely on cookies or session storage, which are unreliable and don't provide the granular control needed for privacy-compliant personalization.

Solution Overview

The Memory Scope API enables e-commerce platforms to store and retrieve shopping-related memories with built-in policy enforcement. You can store product preferences, budget constraints, past purchase patterns, and shopping behavior, then retrieve them when generating recommendations or personalizing the shopping experience.

Product Preferences

Store likes, dislikes, brand preferences, and product categories

Purchase History

Remember past purchases and shopping patterns for recommendations

Budget Constraints

Store price ranges and budget preferences for filtered recommendations

Personalized Recommendations

Generate recommendations based on merged preferences and constraints

Implementation Steps

1. Store Product Preferences

When a user interacts with products, store their preferences:

POST /memory
{
  "user_id": "user123",
  "scope": "preferences",
  "domain": "products",
  "source": "explicit_user_input",
  "ttl_days": 90,
  "value_json": {
    "likes": ["electronics", "books", "home-decor"],
    "dislikes": ["clothing"],
    "brands": ["Apple", "Sony", "Nike"],
    "price_range": {"min": 10, "max": 500}
  }
}

2. Store Budget Constraints

Store budget preferences and spending limits:

POST /memory
{
  "user_id": "user123",
  "scope": "constraints",
  "domain": "budget",
  "source": "explicit_user_input",
  "ttl_days": 30,
  "value_json": {
    "monthly_budget": 1000,
    "preferred_price_range": {"min": 20, "max": 200},
    "alert_threshold": 0.8
  }
}

3. Generate Personalized Recommendations

Retrieve preferences and constraints when generating recommendations:

POST /memory/read
{
  "user_id": "user123",
  "scope": "preferences",
  "purpose": "generate product recommendations",
  "max_age_days": 90
}
Results & Benefits
  • Personalized product recommendations based on user preferences
  • Respect budget constraints automatically in recommendations
  • Policy enforcement ensures preferences only used for recommendations
  • Users can revoke access to their shopping data at any time
  • Complete audit trail of all preference accesses for compliance