Learn how the Preflight API optimizes personalization performance by caching user context ahead of time.
Personalization Overview
The Personalization API (Preflight) provides developers with a mechanism to inform Athos about user preference changes in real-time, enabling faster and more relevant personalized experiences.
What is the Preflight API?
The Preflight API is designed to prime Athos's personalization algorithms before subsequent API calls are made. By sending user context data proactively, you ensure that personalization parameters are cached and ready, resulting in:
- Faster API response times for Search and Autocomplete requests
- Improved page speed scores due to reduced latency
- More relevant personalized results based on up-to-date shopper behavior
Integration Requirements
📋 Note: The Preflight API is only required if your Athos account is configured for Personalized Search & Merchandising.
When to Use This API
Send a Preflight request whenever any of the following user data points change:
| Data Point | Description | Use Case |
|---|---|---|
shopper | Unique identifier for logged-in users | When a user logs in or their session is established |
cart | Product SKUs/UIDs currently in the cart | When items are added to or removed from the cart |
lastViewed | Recently viewed product SKUs/UIDs | When a user views a product detail page |
How It Works
- Capture User Actions: Monitor changes to shopper ID, cart contents, or product views in your application
- Send Preflight Request: Call the Preflight API endpoint with the updated context
- Cache Priming: Athos caches the personalization data for the user
- Optimized Subsequent Calls: Future Search or Autocomplete API requests retrieve pre-processed personalization data instantly
Required Parameters
siteId- Your Athos account identifieruserId- TheathosUserIdcookie value (learn about UUID generation)
Optional Parameters
shopper- Platform shopper ID (omit for anonymous users)cart- Comma-separated product SKUs/UIDslastViewed- Comma-separated product SKUs/UIDs (most recent first)
Next Steps
- GET Preflight - Implementation details for GET method
- POST Preflight - Implementation details for POST method
- Personalization Best Practices - Configuration and optimization guide