Diner Preferences
Diner Preferences represent an individual user’s dietary needs, restrictions, and nutritional goals. Pass these with your queries to get personalized results and match status calculations.The Two-Layer Model
EveryBite uses a two-layer approach to personalization:Menu Key
App-level, staticIdentifies which brand’s menu data your app can access. Stored in your app configuration.
Diner Preferences
User-level, dynamicThe individual diner’s dietary needs. Passed per-request or loaded from Passport.
Preference Types
Dietary Preferences (Diets)
What type of diet does the diner follow?| Diet | Description |
|---|---|
Vegan | No animal products |
Vegetarian | No meat, may include dairy/eggs |
Pescatarian | No meat except fish/seafood |
GlutenFree | No gluten-containing ingredients |
DairyFree | No dairy products |
Allergen Exclusions
What allergens must be avoided?| Allergen | Description |
|---|---|
Dairy | Milk and milk products |
Egg | Eggs and egg products |
Fish | Fish |
Shellfish | Shrimp, crab, lobster, etc. |
Wheat | Wheat and wheat products |
TreeNut | Almonds, walnuts, cashews, etc. |
Peanut | Peanuts and peanut products |
Sesame | Sesame seeds and sesame oil |
Soy | Soybeans and soy products |
Gluten | Gluten proteins |
Nutrient Targets
What nutritional goals does the diner have?Passing Preferences
Option 1: Per-Request (Anonymous)
Pass preferences directly with each query. Good for anonymous users or simple implementations.Option 2: From Passport (Authenticated)
Load preferences from the diner’s EveryBite Passport. Preferences are stored and applied automatically.With Passport, preferences are set once and work everywhere. A diner sets “I’m allergic to peanuts” in their Passport, and it’s applied at every participating restaurant.
Option 3: Combined (Passport + Overrides)
Start with Passport preferences but add request-specific filters.How Preferences Affect Results
When you pass preferences, two things happen:1. Filtering
Dishes that don’t meet criteria are filtered out or flagged:2. Match Status Calculation
Every dish gets amatchStatus based on how well it fits the preferences:
| Status | Meaning |
|---|---|
MATCH | Fully compatible with all preferences |
PARTIAL_MATCH | Can be modified to become compatible |
NOT_A_MATCH | Contains excluded allergens or incompatible |
Building a Preferences UI
Use thefilterOptions query to build your preferences UI dynamically:
Example UI Pattern
Based on our SmartMenu implementation:
- Diet toggles - Buttons for Vegan, Vegetarian, etc.
- Allergen checkboxes - Multi-select for allergens to exclude
- Nutrient sliders - Range inputs for calories, protein, etc.
- Active filter chips - Show selected filters with remove buttons
Preferences in Passport
For a deeper integration, use EveryBite Passport to:- Store preferences - Diners set once, applies everywhere
- Sync across devices - Preferences follow the diner
- Track history - See how preferences evolve over time
Learn More About Passport
The universal dining identity