Skip to main content
Initialize a session when a guest begins browsing a menu. Sessions enable analytics tracking, personalization, and—with GuestIQ—deliver real-time intelligence about the guest before they even search.
First-Touch Personalization: When you create a session, GuestIQ returns the guest’s complete profile—behavioral patterns, demographics, order history, audience segments, and targeted dish recommendations. This data flows from every platform and touchpoint the guest has ever interacted with, plus any connected third-party loyalty systems. Your UI can adapt to the diner from the very first screen.

Start Session

mutation StartSession($input: StartSessionInput!) {
  startSession(input: $input) {
    sessionId
    chainId
    restaurantId

    # GuestIQ: Complete guest intelligence at first touch
    guestiq {
      # Identity - verified when matched via loyalty/passport
      identity {
        guestId
        identifiedVia
        isReturning
      }

      # Behavioral patterns - computed with confidence scores
      behavior {
        browsingStyle { value confidence }
        customizationRate { value confidence }
        decisionSpeed { value confidence }
        pricePreference { value confidence }
        visitPatterns {
          preferredDays
          preferredTimes
          avgDwellTime
          confidence
        }
        engagementScore { value confidence }
      }

      # Demographics - inferred with confidence scores
      demographics {
        ageRange { value confidence }
        householdType { value confidence }
        dietaryLifestyle { value confidence }
        healthFocus { values confidence }
        householdIncome { value confidence }
      }

      # Order history - factual, no confidence needed
      orderHistory {
        totalOrders
        avgOrderValue
        lastOrderDate
        frequentItems {
          dishId
          dishName
          orderCount
          lastOrdered
        }
        preferredModifiers
        avgItemsPerOrder
      }

      # Segments - with confidence and basis
      segments {
        primary { segment confidence basis }
        compound { segment confidence basis }
      }
      cohorts

      # AI-powered dish targeting
      targetedDishes {
        dishId
        dishName
        reason
        confidence
        targetingType
      }

      # Third-party loyalty - with confidence score
      loyaltyTags {
        source
        programId
        tier
        points
        tags
        confidence
        lastSyncedAt
      }

      # Touchpoints - factual counts
      touchpoints {
        totalSessions
        platforms { platform sessionCount lastSeen }
        firstSeen
        lastSeen
      }

      # Recommendations
      recommendations {
        type
        dishId
        reason
        confidence
      }

      # Data quality metadata
      dataQuality {
        observationCount
        firstSeen
        lastSeen
        lastUpdated
      }
    }
  }
}

Input

input StartSessionInput {
  chainId: String!
  restaurantId: String
  guestId: String
  passportId: String
  platform: Platform!
  appVersion: String
}

enum Platform {
  IOS
  ANDROID
  WEB
  KIOSK
  POS
  VOICE
  OTHER
}
FieldTypeRequiredDescription
chainIdStringYesRestaurant chain identifier
restaurantIdStringNoSpecific location (for multi-location chains)
guestIdStringNoYour guest or loyalty ID
passportIdStringNoEveryBite Passport ID, if the guest has one
platformPlatformYesUser’s platform: IOS, ANDROID, WEB, KIOSK, POS, VOICE, OTHER
appVersionStringNoPartner app version for debugging

Response

type SessionResponse {
  sessionId: String!
  chainId: String!
  restaurantId: String
  platform: Platform!
  appVersion: String
  guestiq: GuestIQ            # Complete guest intelligence at first touch
}

Example

mutation StartSession {
  startSession(input: {
    chainId: "honeygrow"
    restaurantId: "loc_philly_walnut"
    guestId: "loyalty_12345"
    passportId: "passport_abc"
    platform: IOS
    appVersion: "3.2.1"
  }) {
    sessionId
    chainId
    restaurantId
    guestiq {
      identity { guestId identifiedVia isReturning }
      behavior {
        browsingStyle { value confidence }
        customizationRate { value confidence }
        engagementScore { value confidence }
      }
      demographics {
        ageRange { value confidence }
        householdIncome { value confidence }
      }
      orderHistory { totalOrders avgOrderValue frequentItems { dishName orderCount } }
      segments {
        primary { segment confidence basis }
        compound { segment confidence basis }
      }
      cohorts
      targetedDishes { dishId dishName reason confidence targetingType }
      loyaltyTags { source tier points tags confidence }
      touchpoints { totalSessions platforms { platform sessionCount } }
      recommendations { type dishId reason confidence }
      dataQuality { observationCount lastUpdated }
    }
  }
}

GuestIQ Response Types

GuestIQ returns the guest’s complete profile at session creation. This data is aggregated across all platforms and third-party loyalty systems—giving you everything you need to personalize from the first screen.

Understanding Confidence Scores

GuestIQ data falls into three categories:
CategoryConfidenceDescription
VerifiedNo score neededDirect from source of truth (order history, loyalty data)
ObservedHigh (0.7-1.0)Derived from sufficient observations (25+ interactions)
InferredVariable (0.1-0.7)Predicted from limited data—score reflects sample size
Fields we compute (behavior, demographics, segments, targetedDishes) include confidence scores based on observation count. Fields from authoritative sources (orderHistory, loyaltyTags, touchpoints) are factual and don’t need confidence.

GuestIQ

type GuestIQ {
  identity: GuestIdentity!
  behavior: GuestBehavior
  demographics: GuestDemographics
  orderHistory: OrderHistory
  segments: GuestSegments
  cohorts: [String!]
  targetedDishes: [TargetedDish!]
  loyaltyTags: [LoyaltyTag!]
  touchpoints: Touchpoints
  recommendations: [Recommendation!]
  dataQuality: DataQuality!
}

DataQuality

Metadata about the data backing this profile.
type DataQuality {
  observationCount: Int!           # Total interactions observed
  firstSeen: DateTime
  lastSeen: DateTime
  lastUpdated: DateTime            # When profile was last updated
}
Observation CountTypical ConfidenceWhat It Means
1-20.1-0.3Very limited data, mostly inferred
3-100.3-0.5Some patterns emerging
11-250.5-0.7Reasonable confidence
25+0.7-0.95High confidence, well-observed

GuestIdentity

type GuestIdentity {
  guestId: String!
  identifiedVia: IdentificationMethod!
  isReturning: Boolean!
}

enum IdentificationMethod {
  LOYALTY_ID
  PASSPORT_ID
  EMAIL
  PHONE
  DEVICE_FINGERPRINT
  BEHAVIORAL_MATCH
  MULTI_FACTOR
}
Identity has no confidence score—when matched via LOYALTY_ID or PASSPORT_ID, it’s verified. DEVICE_FINGERPRINT and BEHAVIORAL_MATCH indicate probabilistic matching.

GuestBehavior

Behavioral patterns derived from interactions across all touchpoints. All fields nullable—we only return what we have sufficient data to compute.
type GuestBehavior {
  browsingStyle: ComputedAttribute
  customizationRate: ComputedAttribute
  decisionSpeed: ComputedAttribute
  pricePreference: ComputedAttribute
  visitPatterns: VisitPatterns
  engagementScore: ComputedAttribute
}

type ComputedAttribute {
  value: String!
  confidence: Float!             # 0.0 to 1.0 based on observation count
}

type VisitPatterns {
  preferredDays: [DayOfWeek!]
  preferredTimes: [MealPeriod!]
  avgDwellTime: Int              # Seconds spent per session
  confidence: Float!
}

enum BrowsingStyle {
  EXPLORER         # Browses many items, tries new things
  LOYALIST         # Orders same items repeatedly
  RESEARCHER       # Reads details, compares options
  IMPULSE          # Quick decisions, minimal browsing
}

enum DecisionSpeed {
  QUICK            # <30 seconds to order
  MODERATE         # 30 seconds - 2 minutes
  DELIBERATE       # >2 minutes, reviews options
}

enum PricePreference {
  BUDGET           # Prefers lower-priced items
  VALUE_CONSCIOUS  # Balances price and quality
  PREMIUM          # Willing to pay more for quality
  INDIFFERENT      # Price not a factor
}

enum DayOfWeek {
  MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
}

enum MealPeriod {
  BREAKFAST        # 6am - 10am
  LUNCH            # 11am - 2pm
  AFTERNOON        # 2pm - 5pm
  DINNER           # 5pm - 9pm
  LATE_NIGHT       # 9pm - 12am
}
FieldDescription
browsingStyleHow the guest explores menus
customizationRatePercentage of orders with modifications (0.0 to 1.0)
decisionSpeedHow quickly they typically order
pricePreferenceSensitivity to pricing
visitPatternsWhen they typically visit
engagementScoreOverall engagement level (0.0 to 1.0)

GuestDemographics

Inferred demographic profile based on behavior patterns. All fields nullable with confidence scores—these are predictions, not facts.
type GuestDemographics {
  ageRange: ComputedAttribute
  householdType: ComputedAttribute
  dietaryLifestyle: ComputedAttribute
  healthFocus: ComputedListAttribute
  householdIncome: ComputedAttribute
}

type ComputedListAttribute {
  values: [String!]!
  confidence: Float!
}

enum HouseholdType {
  STUDENT
  YOUNG_PROFESSIONAL
  FAMILY_WITH_KIDS
  EMPTY_NESTER
  SENIOR
}

enum DietaryLifestyle {
  OMNIVORE
  FLEXITARIAN
  VEGETARIAN
  VEGAN
  HEALTH_CONSCIOUS
  PERFORMANCE_FOCUSED
  ALLERGY_RESTRICTED
}

enum HouseholdIncome {
  LOW              # Bottom 25% by AOV
  MODERATE         # 25-75% by AOV
  HIGH             # Top 25% by AOV
  VIP              # Top 5% by lifetime value
}
Demographics are inferred from behavioral data. A low confidence score means limited observations—use for soft personalization (“You might like…”), not hard filtering.

OrderHistory

Complete order history aggregated across all platforms. No confidence scores—this is factual data from actual orders.
type OrderHistory {
  totalOrders: Int!
  avgOrderValue: Float!
  lastOrderDate: DateTime
  frequentItems: [FrequentItem!]!
  preferredModifiers: [String!]!
  avgItemsPerOrder: Float!
}

type FrequentItem {
  dishId: String!
  dishName: String!
  orderCount: Int!
  lastOrdered: DateTime!
}
FieldDescription
totalOrdersLifetime order count
avgOrderValueAverage order total
lastOrderDateMost recent order timestamp
frequentItemsTop ordered dishes with counts
preferredModifiersCommon customizations (e.g., “extra_protein”, “no_sauce”)
avgItemsPerOrderAverage items per transaction

GuestSegments

type GuestSegments {
  primary: [SegmentMembership!]!
  compound: [SegmentMembership!]!
}

type SegmentMembership {
  segment: String!
  confidence: Float!             # How confident we are in this classification
  basis: SegmentBasis!
}

enum SegmentBasis {
  EXPLICIT           # Guest explicitly set this preference
  OBSERVED           # Derived from consistent behavior
  INFERRED           # Predicted from limited data
}
Primary segments are single attributes: wheat-free, high-protein, frequent-visitor, customizer Compound segments are combinations: wheat-free+high-protein, vegan+spicy-lover

TargetedDish

AI-powered dish recommendations based on the guest’s complete profile.
type TargetedDish {
  dishId: String!
  dishName: String!
  reason: String!                # Human-readable explanation
  confidence: Float!             # 0.0 to 1.0
  targetingType: TargetingType!
}

enum TargetingType {
  PREFERENCE_MATCH     # Matches dietary/nutritional preferences
  REORDER              # Previously ordered, likely to order again
  NEW_ITEM_DISCOVERY   # New menu item matching their profile
  UPSELL               # Add-on they typically purchase
  CROSS_SELL           # Complementary item based on order patterns
}
Targeting TypeTypical ConfidenceDescription
REORDER0.9+Based on actual order history—very reliable
PREFERENCE_MATCH0.7-0.9Based on stated or observed preferences
UPSELL0.6-0.8Based on past modifier/add-on behavior
NEW_ITEM_DISCOVERY0.5-0.7Matches profile but no direct history
CROSS_SELL0.4-0.7Based on order patterns of similar guests

LoyaltyTag

Data synced from third-party loyalty systems. The confidence score represents match confidence from the source system.
type LoyaltyTag {
  source: LoyaltySource!
  programId: String!
  tier: String                   # e.g., "GOLD", "PLATINUM"
  points: Int
  tags: [String!]!               # Custom tags from the loyalty system
  confidence: Float!             # 0.0 to 1.0 - match confidence from source
  lastSyncedAt: DateTime!
}

enum LoyaltySource {
  CUSTOM                         # Direct API integration
}
Loyalty data is passed through from your connected platform via direct API integration. We don’t assign confidence—your loyalty system is the authoritative source. Configure integrations via the Integrations API.

Touchpoints

Cross-platform interaction metrics. No confidence scores—these are factual counts.
type Touchpoints {
  totalSessions: Int!
  platforms: [PlatformMetric!]!
  firstSeen: DateTime!
  lastSeen: DateTime!
}

type PlatformMetric {
  platform: Platform!
  sessionCount: Int!
  lastSeen: DateTime!
}
FieldDescription
totalSessionsLifetime session count across all platforms
platformsBreakdown by platform (iOS, Android, Web, Kiosk, POS, Voice)
firstSeenFirst interaction timestamp
lastSeenMost recent interaction

Recommendation

type Recommendation {
  type: RecommendationType!
  dishId: String!
  reason: String!
  confidence: Float!
}

enum RecommendationType {
  HIGHLIGHT        # Feature prominently based on preferences
  UPSELL           # Suggest add-on based on past behavior
  REORDER          # Previous favorite
  NEW_MATCH        # New menu item matching their profile
}

GuestIQ for New vs. Returning Guests

Returning Guest

Full intelligence: segments, history, recommendations based on past behavior across all sessions.

New Guest

Limited intelligence initially. As they interact, signals build their profile in real-time.
Even for new guests, GuestIQ can provide value if they’ve been identified via device fingerprint from a previous anonymous session.

When to Start a Session

Call startSession when:
  • User opens your app/website
  • User begins a new ordering flow
  • Previous session has timed out (recommend 30 minutes)
  • User switches to a different restaurant chain

Runtime Headers

After starting a session, include the X-Session-ID header on all subsequent requests:
Authorization: pk_your_api_key
Content-Type: application/json
X-Session-ID: sess_7f3a9c2e-8b1d-4e5f-a6c0-9d2e8f1a3b5c
All context (chain, platform, guest identity, passport) is bound to the session when you call startSession. You only need to pass the session ID on subsequent calls.

Best Practices

One Session Per Flow

Start a new session when the user begins ordering, not on every page view.

Persist Guest ID

Store the guest ID locally and reuse it across sessions for better personalization.

Handle Errors Gracefully

If session start fails, continue without it - search and dish queries still work.

Include App Version

Pass your app version to help debug issues across releases.