food.order_cake_or_special — Full Intent Specification
INTENT NAMESPACE: food
INTENT NAME: order_cake_or_special
FULL ID: food.order_cake_or_special
VERSION: v1.0.0
STATUS: draft
LAST UPDATED: 2026-05-10
TTBS WEIGHTS: time 0.30 · taste 0.40 · budget 0.20 · safety 0.10
Cake / special-occasion order is a customization-heavy intent for celebration items (birthday cakes, anniversary mithai, festival sweets, baby-shower confections). Distinct shape: (a) occasion_kind enum drives message templates + decor; (b) customization block (cake message text, photo upload, dietary substitutions, allergen-aware); (c) lead_time_hours >= 4 typical (>= 24 for elaborate); (d) delivery OR pickup choice within one intent; (e) religious_authenticity for traditional sweets (halwai certification).
1. NATURAL LANGUAGE COVERAGE
Classifies IN
- "birthday cake for my daughter's 5th"
- "anniversary cake delivery 7pm"
- "Diwali mithai box for office gifting"
- "customized photo cake of dog"
- "Eid sevaiyan from authentic halwai"
- "baby shower theme cake 2kg"
- "tiramisu for date night"
- "Krishna Janmashtami special sweets"
- "wedding cake 5kg fondant"
Classifies OUT — borderline NO
- "biryani for dinner" →
food.order_delivery - "table at restaurant" →
food.book_dine_in - "tiffin subscription" →
food.subscribe_tiffin - "catering for wedding" →
food.book_catering_event
MULTI-INTENT TRIGGERS
- "birthday cake and a chef at home" →
food.order_cake_or_special+food.book_chef_at_home - "anniversary cake and a table reservation" →
food.order_cake_or_special+food.book_dine_in - "Diwali mithai and grocery for festival" →
food.order_cake_or_special+grocery.order_delivery
2. INPUT — TOMO → PROVIDER
{
"intent": "food.order_cake_or_special",
"intent_version": "v1.0.0",
"request_id": "req_cake_8h2k_2026-05-10T08:00:00Z",
"user_session_id": "anon_user_token_or_uid",
"fulfillment_kind": "delivery",
"delivery_address": {
"lat": 17.4504,
"lng": 78.3811,
"line_1": "Flat 502, SriHomes Apartment",
"line_2": "Hitech City Main Road",
"neighborhood": "Madhapur",
"city": "Hyderabad",
"state": "Telangana",
"pincode": "500081",
"country_code": "IN",
"delivery_notes": "Surprise delivery - please call ahead"
},
"pickup_location": null,
"scheduled_for_iso": "2026-05-12T18:30:00+05:30",
"delivery_window_minutes": 30,
"occasion_kind": "birthday",
"occasion_subkind": "child_birthday",
"celebrant_name": "Tara",
"celebrant_age": 5,
"item_kind": "fondant_themed_cake",
"customization": {
"cake_kind": "fondant_themed",
"flavor_primary": "vanilla_strawberry",
"flavor_acceptable": ["vanilla_strawberry", "chocolate_truffle", "butterscotch"],
"weight_kg": 2.0,
"shape": "round_3_tier",
"theme": "frozen",
"color_primary": "blue_white",
"color_secondary": "silver",
"message_text": "Happy Birthday Tara",
"message_language": "en-IN",
"candles_count": 5,
"edible_image_uploaded": false,
"edible_image_url": "",
"photo_personalization_uploaded": false,
"photo_url": "",
"decoration_extras": ["edible_glitter", "fondant_figurine"],
"topper_kind": "fondant_3d_character",
"knife_provided": true,
"candles_provided": true,
"candles_kind": "numerical_5"
},
"dietary": {
"veg_or_non_veg": "veg",
"egg_or_eggless": "eggless",
"vegan_required": false,
"jain_required": false,
"halal_required": false,
"satvik_required": false,
"gluten_free_required": false,
"sugar_free_required": false,
"diabetic_friendly_required": false,
"allergens_to_avoid": ["peanuts"]
},
"preferences": {
"budget_band": "good",
"budget_max_inr_total": 3500,
"religious_authenticity_required": false,
"halwai_certification_required": false,
"preferred_packaging": "premium_box_with_flaps",
"delivery_personnel_kyc_required": true,
"thermal_packaging_for_summer": true,
"advance_lead_time_hours_min": 24,
"advance_lead_time_hours_max": 168
},
"context": {
"user_locale": "en-IN",
"user_currency_pref": "INR",
"user_weather_celsius": 32,
"is_festival_day": false,
"trust_signals": {
"is_repeat_customer": false,
"prior_orders_with_partner": 0,
"user_account_age_days": 312,
"verified_address": true
}
}
}
| Field | Type | Constraint | Notes |
|---|---|---|---|
intent |
string | REQUIRED, equals "food.order_cake_or_special" |
|
fulfillment_kind |
enum | REQUIRED, STRICT delivery | pickup |
|
delivery_address |
object or null | REQUIRED if fulfillment=delivery | |
pickup_location |
object or null | REQUIRED if fulfillment=pickup | |
scheduled_for_iso |
ISO_DATETIME | REQUIRED | |
delivery_window_minutes |
int | REQUIRED, ≥0 | tolerance around scheduled |
occasion_kind |
enum | REQUIRED, see §5 | |
occasion_subkind |
enum | REQUIRED, see §5 | |
celebrant_name |
string | REQUIRED, may be empty | |
celebrant_age |
int | REQUIRED, ≥0 | 0 if not relevant |
item_kind |
enum | REQUIRED, see §5 | |
customization.cake_kind |
enum | REQUIRED, see §5 | |
customization.flavor_primary |
enum | REQUIRED, see §5 | |
customization.weight_kg |
float | REQUIRED, ≥0.5 | |
customization.shape |
enum | REQUIRED, see §5 | |
customization.message_text |
string | REQUIRED, may be empty | strict char limits |
customization.message_language |
string | REQUIRED, RFC_3066 | |
customization.candles_count |
int | REQUIRED, ≥0 | |
customization.edible_image_uploaded |
bool | REQUIRED | |
customization.edible_image_url |
URL | REQUIRED, may be empty | only if uploaded |
customization.photo_personalization_uploaded |
bool | REQUIRED | |
customization.decoration_extras |
array |
REQUIRED, may be empty | see §5 |
customization.topper_kind |
enum | REQUIRED, see §5 | |
customization.candles_provided |
bool | REQUIRED | |
customization.candles_kind |
enum | REQUIRED, see §5 | |
dietary.veg_or_non_veg |
enum | REQUIRED, STRICT veg | non_veg | egg | vegan |
|
dietary.egg_or_eggless |
enum | REQUIRED, STRICT egg | eggless |
hard filter |
dietary.diabetic_friendly_required |
bool | REQUIRED | |
preferences.religious_authenticity_required |
bool | REQUIRED | for halwai-cert sweets |
preferences.halwai_certification_required |
bool | REQUIRED | |
preferences.preferred_packaging |
enum | REQUIRED, see §5 | |
preferences.delivery_personnel_kyc_required |
bool | REQUIRED | |
preferences.thermal_packaging_for_summer |
bool | REQUIRED | |
preferences.advance_lead_time_hours_min |
int | REQUIRED, ≥0 | |
preferences.advance_lead_time_hours_max |
int | REQUIRED, ≥0 |
Anti-fabrication preamble (universal): no paid placement, no urgency text, no commission-influenced fields.
3. PROVIDER TOOLS
Tool 1: search_cake_and_special_options
PURPOSE: return ranked list of bakers/halwais matching customization + dietary
INPUT: §2 request body
OUTPUT: { results: CakeSpecialOption[], result_token, expires_at }
SLA: p50 < 700ms, p95 < 1500ms
Tool 2: get_baker_detail
PURPOSE: baker profile + sample cake gallery + reviews
INPUT: { baker_id, request_id }
OUTPUT: BakerDetail (§4)
SLA: p95 < 800ms
Tool 3: validate_customization
PURPOSE: baker confirms feasibility of requested customization
INPUT: { baker_id, customization_payload, request_id }
OUTPUT: { feasibility_status, fare_estimate_inr, lead_time_required_hours, modifications_suggested }
SLA: p95 < 800ms
Tool 4: place_order
PURPOSE: commit order
INPUT: { option_id, payment_token, request_id, idempotency_key, user_phone, edible_image_upload_url }
OUTPUT: { order_ref, status, baker_assigned, fare_quote, estimated_ready_iso, photo_proof_at_completion_url }
SLA: p95 < 5000ms
IDEMPOTENCY: REQUIRED on idempotency_key
Tool 5: track_order
PURPOSE: live state from prep through delivery/pickup
INPUT: { order_ref, request_id }
OUTPUT: CakeSpecialTrack (§4)
SLA: p95 < 400ms
RATE LIMIT: ≤ 1 every 60s during prep; ≤1/30s during delivery
Tool 6: cancel_order
INPUT: { order_ref, reason, request_id }
OUTPUT: { status, cancellation_charge_inr, refund_amount_inr, refund_processing_days }
SLA: p95 < 2000ms
Tool 7: request_modification
PURPOSE: modify message text, decoration, etc. before lead-time window closes
INPUT: { order_ref, modifications, request_id }
OUTPUT: { status, fare_delta_inr, lead_time_extension_hours }
SLA: p95 < 1500ms
Tool 8: submit_photo_proof
PURPOSE: baker uploads photo of finished item before delivery
INPUT: { order_ref, photo_url, photo_taken_iso, request_id }
OUTPUT: { acknowledged: true, user_approval_required }
SLA: p95 < 1500ms
Tool 9: rate_order
INPUT: { order_ref, rating_5star, taste_score, presentation_score, accuracy_score, comment, tip_inr, request_id }
OUTPUT: { acknowledged: true }
SLA: p95 < 800ms
All nine REQUIRED.
4. RESPONSE SHAPE
CakeSpecialOption
id: string, REQUIRED
option_token: string, REQUIRED
expires_at: ISO_DATETIME, REQUIRED
baker:
id: string, REQUIRED
merchant_id: string, REQUIRED
display_name: string, REQUIRED
brand: string, REQUIRED
baker_kind: STRICT ENUM, REQUIRED # see §5
cake_specialty: array<STRICT ENUM>, REQUIRED, ≥1 # see §5
sweet_specialty: array<STRICT ENUM>, REQUIRED, may be empty
signature_creations: array<string>, REQUIRED, ≥3
veg_only_kitchen: boolean, REQUIRED
eggless_section: boolean, REQUIRED
vegan_section: boolean, REQUIRED
jain_section: boolean, REQUIRED
halal_section: boolean, REQUIRED
satvik_section: boolean, REQUIRED
diabetic_friendly_section: boolean, REQUIRED
halwai_certified: boolean, REQUIRED
halwai_certification_authority: STRICT ENUM, REQUIRED
partner_account_age_days: int, REQUIRED, ≥0
partner_orders_completed_30day: int, REQUIRED, ≥0
custom_orders_completed_total: int, REQUIRED, ≥0
ratings:
overall_score: float, REQUIRED, 0-5
overall_count: int, REQUIRED, ≥0
taste_score: float, REQUIRED, 0-5
presentation_score: float, REQUIRED, 0-5
accuracy_score: float, REQUIRED, 0-5 # how close to brief
on_time_30day_pct: float, REQUIRED, 0-1
photo_match_30day_pct: float, REQUIRED, 0-1 # delivered matches uploaded photo brief
trust:
fssai_license_number: string, REQUIRED
fssai_license_valid_until: ISO_DATE, REQUIRED
fssai_grade: STRICT ENUM, REQUIRED
cleanliness_audit_iso: ISO_DATETIME, REQUIRED
cleanliness_audit_score: int, REQUIRED, 0-100
food_handler_kyc_pct: int, REQUIRED, 0-100
tomo_field_team_audited: boolean, REQUIRED
address:
line_1: string, REQUIRED
neighborhood: string, REQUIRED
city: string, REQUIRED
pincode: string, REQUIRED
lat: float, REQUIRED
lng: float, REQUIRED
google_place_id: string, REQUIRED
distance_from_user_km: float, REQUIRED
photos:
thumbnail_url: URL, REQUIRED
hero_url: URL, REQUIRED
gallery_url: URL, REQUIRED # JSON manifest of past creations
bakery_kitchen_photos: URL, REQUIRED
ai_generated_photos: boolean, REQUIRED # MUST be false
customization_feasibility:
fully_feasible: boolean, REQUIRED
feasibility_score: int, REQUIRED, 0-100
flavor_available: boolean, REQUIRED
shape_available: boolean, REQUIRED
weight_available: boolean, REQUIRED
theme_supported: boolean, REQUIRED
edible_image_supported: boolean, REQUIRED
photo_personalization_supported: boolean, REQUIRED
fondant_figurine_supported: boolean, REQUIRED
language_supported: boolean, REQUIRED # for message in regional language
modifications_suggested: array<string>, REQUIRED, may be empty # if not fully feasible
lead_time_required_hours: int, REQUIRED # >= preferences.advance_lead_time_hours_min
dietary_compliance:
egg_or_eggless_match: boolean, REQUIRED
vegan_match: boolean, REQUIRED
jain_match: boolean, REQUIRED
halal_match: boolean, REQUIRED
satvik_match: boolean, REQUIRED
diabetic_match: boolean, REQUIRED
allergen_safe: boolean, REQUIRED # full pipeline checked
shared_kitchen_disclosure: string, REQUIRED # honest disclosure of shared facility risks
fare:
total_inr: INR_INTEGER, REQUIRED
base_item_inr: INR_INTEGER, REQUIRED # cake/sweet base price
customization_inr: INR_INTEGER, REQUIRED # extras
edible_image_inr: INR_INTEGER, REQUIRED # 0 if not used
photo_personalization_inr: INR_INTEGER, REQUIRED # 0 if not used
delivery_fee_inr: INR_INTEGER, REQUIRED # 0 if pickup
thermal_packaging_inr: INR_INTEGER, REQUIRED # 0 if not requested
packaging_fee_inr: INR_INTEGER, REQUIRED
service_fee_inr: INR_INTEGER, REQUIRED
platform_fee_inr: INR_INTEGER, REQUIRED
gst_inr: INR_INTEGER, REQUIRED
fare_breakdown_text: string, REQUIRED
is_upfront_fare: boolean, REQUIRED
fare_locked_until_iso: ISO_DATETIME, REQUIRED
packaging:
primary_packaging: STRICT ENUM, REQUIRED
thermal_protection: boolean, REQUIRED
spill_proof: boolean, REQUIRED
candles_provided: boolean, REQUIRED
knife_provided: boolean, REQUIRED
decoration_intact_warranty: boolean, REQUIRED # if cake arrives damaged, full refund
cancellation:
free_cancel_until_iso: ISO_DATETIME, REQUIRED
cancel_charge_within_lead_time_inr: INR_INTEGER, REQUIRED
cancel_charge_within_4h_of_ready_inr: INR_INTEGER, REQUIRED
no_show_charge_inr: INR_INTEGER, REQUIRED # for pickup
partner_cancel_compensation_inr: INR_INTEGER, REQUIRED
refund_processing_days: int, REQUIRED, ≥0
freshness:
data_last_synced_iso: ISO_DATETIME, REQUIRED
_provider:
name: string, REQUIRED
tomo_partner_id: string, REQUIRED
partner_tier: STRICT ENUM, REQUIRED
deep_link: URL, REQUIRED
customer_support_phone: string, REQUIRED
customer_support_email: string, REQUIRED
customer_support_24x7: boolean, REQUIRED
in_app_chat_supported: boolean, REQUIRED
partner_cake_special_volume_30d: int, REQUIRED, ≥0
partner_completion_rate_30d: float, REQUIRED, 0-1
BakerDetail (returned by get_baker_detail)
Superset of baker block plus 30+ past creation photos with consent-given user attribution, full reviews, kitchen-tour video URL.
CakeSpecialTrack
order_ref: string, REQUIRED
status: STRICT ENUM, REQUIRED
status_updated_iso: ISO_DATETIME, REQUIRED
status_history: array, REQUIRED, ≥1
prep_progress:
prep_started_iso: ISO_DATETIME, REQUIRED # may equal future
prep_pct: int, REQUIRED, 0-100
decoration_pct: int, REQUIRED, 0-100
estimated_ready_iso: ISO_DATETIME, REQUIRED
photo_proof:
uploaded: boolean, REQUIRED
url: URL, REQUIRED # may be empty until uploaded
uploaded_iso: ISO_DATETIME, REQUIRED # may equal future
user_approval_status: STRICT ENUM, REQUIRED # see §5
delivery: # null if pickup
rider_assigned: boolean, REQUIRED
rider_id: string, REQUIRED
rider_name: string, REQUIRED
rider_phone_masked: string, REQUIRED
rider_lat: float, REQUIRED
rider_lng: float, REQUIRED
rider_eta_minutes: int, REQUIRED
delivery_zone_kind: STRICT ENUM, REQUIRED
thermal_packaging_active: boolean, REQUIRED
pickup: # null if delivery
ready_at_baker_iso: ISO_DATETIME, REQUIRED
pickup_zone_kind: STRICT ENUM, REQUIRED
hold_time_remaining_minutes: int, REQUIRED, ≥0
support_phone: string, REQUIRED
support_email: string, REQUIRED
Forbidden fields
paid_placement_score | sponsored_rank | promotion_priority |
fake_recent_order_text | auto_inflate_custom_orders_completed |
ai_generated_photos (must equal false) | hidden_customization_fee |
fake_halwai_certification | undisclosed_egg_use | fake_eggless |
fake_photo_match_30day_pct
5. CONTROLLED VOCABULARIES
fulfillment_kind
delivery | pickup
occasion_kind
birthday | anniversary | wedding | engagement | baby_shower |
naming_ceremony | religious_festival | religious_pooja | farewell |
welcome_back | retirement | promotion | graduation | thank_you |
get_well | condolence | other
occasion_subkind
child_birthday | adult_birthday | milestone_birthday |
silver_anniversary | golden_anniversary | wedding_cake_5kg_plus |
diwali_mithai | eid_sevaiyan | rakshabandhan_box | janmashtami_special |
ganesh_chaturthi_modaks | onam_special | pongal_special |
christmas_cake | thanksgiving_dessert | other
item_kind
fondant_themed_cake | photo_cake | photo_personalized_cake |
multi_tier_cake | cupcakes | tiramisu | cheesecake | mousse_cake |
mithai_box_premium | mithai_box_traditional | barfi_box |
laddu_box | halwa_special | sweets_assortment | dessert_platter |
cookies_box | brownie_box | choco_lava | other
customization.cake_kind
fondant_themed | photo_cake | drip_cake | naked_cake | floral |
multi_tier | tiramisu | cheesecake | mousse_cake | minimalist |
sculpted_3d | bento_cake | pull_apart | cupcake_arrangement |
ice_cream_cake | sugar_free_cake | gluten_free_cake | other
customization.flavor_primary and flavor_acceptable[]
vanilla | vanilla_strawberry | chocolate | chocolate_truffle |
butterscotch | red_velvet | black_forest | white_forest | tiramisu |
mango | pineapple | blueberry | lemon | coffee | hazelnut |
caramel | rasmalai | ferrero | oreo | strawberry_cheesecake |
biscoff | salted_caramel | choco_lava | mixed_fruit | tropical |
seasonal_special
customization.shape
round_1_tier | round_2_tier | round_3_tier | square | rectangle |
heart | star | numerical | letter | car | princess |
custom_3d_sculpt | other
customization.decoration_extras[]
edible_glitter | gold_leaf | silver_leaf | fondant_figurine |
fresh_flowers | dried_petals | sprinkles | pearls | macarons |
chocolate_curls | wafer_paper | sugar_lace | hand_painted |
edible_photo | drip_glaze | ice_cream_dome | fruits_on_top |
custom_topper | none
customization.topper_kind
none | numerical | letter | fondant_3d_character | fresh_flowers |
glittery_topper | photo_topper | custom_text_topper | mini_figurine
customization.candles_kind
none | numerical_1 | numerical_2 | numerical_3 | numerical_4 | numerical_5 |
numerical_double_digit | birthday_pillar | sparkler | musical |
trick_relight | floating | religious_diya | other
dietary.veg_or_non_veg
veg | non_veg | egg | vegan
dietary.egg_or_eggless
egg | eggless
dietary.allergens_to_avoid[]
peanuts | tree_nuts | dairy | eggs | wheat | gluten | soy | sesame
baker.baker_kind
home_baker | boutique_bakery | franchise_bakery | hotel_bakery |
patisserie | halwai_traditional | mithai_specialty | dessert_parlor |
cloud_bakery | celebrity_baker
baker.cake_specialty[]
fondant | photo_cakes | wedding_cakes | sculpted_3d | minimalist |
korean_style | floral | vintage | bento | sugar_free | gluten_free |
vegan | eggless_specialty | chocolate_specialist | seasonal | other
baker.sweet_specialty[]
bengali_mithai | rajasthani_mithai | south_indian_sweets | dry_fruit_mithai |
chocolate_fusion_mithai | sugar_free_mithai | diabetic_friendly_mithai |
festival_specials | wedding_traditional_mithai | none
baker.halwai_certification_authority
none | guru_authority_indian | regional_culinary_council | partner_internal |
tomo_food_audit | family_lineage_certificate
baker.trust.fssai_grade
A | B | C | unrated
packaging.primary_packaging and preferences.preferred_packaging
basic_box | premium_box | premium_box_with_flaps | luxury_gift_box |
heat_sealed | thermal_box | reusable_tin | banana_leaf_basket |
mixed
CakeSpecialTrack.status
order_received | confirmed_by_baker | prep_in_progress |
decorating | almost_ready | photo_proof_pending_user_approval |
ready | rider_assigned | en_route | nearby | delivered |
ready_for_pickup | user_arrived_for_pickup | picked_up |
cancelled | failed_delivery | expired_unpicked
CakeSpecialTrack.photo_proof.user_approval_status
not_required | pending | approved | rejected_change_requested |
not_applicable
CakeSpecialTrack.delivery.delivery_zone_kind
home | office | event_venue | hotel | hospital | school | other
CakeSpecialTrack.pickup.pickup_zone_kind
counter_at_entry | counter_at_back | curbside_zone | parking_lot |
ground_floor_locker | rooftop_pickup
cancel_order.reason
user_changed_mind | wrong_date | wrong_address | found_alternative |
event_cancelled | medical | weather | other
merchant_id resolution order
1. FSSAI license number
2. partner_id + ":" + baker_id
3. Google Place ID (if baker has fixed bakery)
6. TTBS DIMENSIONS
Per-domain weights
food (order_cake_or_special): { time: 0.30, taste: 0.40, budget: 0.20, safety: 0.10 }
TIME
SIGNALS USED:
- lead_time_required_hours ≤ time-until-scheduled HARD FILTER
- on_time_30day_pct weight 0.40
- distance_from_user_km weight 0.20
- operating_hours.is_open_now HARD FILTER
- photo_proof_uploaded availability weight 0.10
- estimated_ready_iso buffer to scheduled weight 0.20
TASTE
SIGNALS USED:
- baker.ratings.taste_score weight 0.20
- baker.ratings.presentation_score weight 0.20
- baker.ratings.accuracy_score weight 0.20
- customization_feasibility.feasibility_score weight 0.20
- photo_match_30day_pct (delivered matches photo brief) weight 0.10
- baker.signature_creations relevance weight 0.10
HARD FILTERS:
- dietary.egg_or_eggless match HARD FILTER
- dietary.allergens_to_avoid present in baker's shared kitchen → drop or warn
- jain_required AND jain_section=false → drop
- vegan_required AND vegan_section=false → drop
- religious_authenticity_required AND halwai_certified=false → drop
BUDGET
SIGNALS USED:
- fare.total_inr vs band:
ok → home_bakers / cloud_bakeries (basic)
good → boutique_bakeries / patisseries (mid)
great → premium_bakers / celebrity_bakers (high)
- customization_inr (lower=better all else equal) weight 0.20
- delivery_fee_inr (lower=better) weight 0.15
- cancellation tier permissiveness weight 0.15
HARD FILTERS:
- fare.total_inr > preferences.budget_max_inr_total → drop
SAFETY
SIGNALS USED:
- baker.trust.fssai_grade (A=high) weight 0.30
- baker.trust.cleanliness_audit_score weight 0.20
- baker.trust.food_handler_kyc_pct weight 0.15
- baker.trust.tomo_field_team_audited weight 0.10
- allergen_safe AND shared_kitchen_disclosure honest weight 0.20
- delivery_personnel_kyc_required → check HARD FILTER if true
- thermal_packaging available for hot weather weight 0.10
HARD FILTERS:
- allergen present in user.allergens_to_avoid + dietary risk → drop
- egg_or_eggless mismatch → drop
Hidden ranking factor
information_completeness_score weight 0.10.
7. COMPLETION CONTRACT
POST /api/v1/cpc/mcp_provider/{tomo_partner_id}
{
"intent": "food.order_cake_or_special",
"intent_version": "v1.0.0",
"external_id": "BAKE-XYZ",
"amount_inr": 3250,
"closed_at": "2026-05-12T18:42:00+05:30",
"request_id": "req_cake_8h2k_...",
"status": "delivered",
"order_ref": "BAKE-XYZ",
"merchant_id": "FSSAI-12345",
"baker_id": "baker_8423",
"ready_at": "2026-05-12T17:45:00+05:30",
"delivered_at": "2026-05-12T18:32:00+05:30",
"fulfillment_kind": "delivery",
"promised_iso": "2026-05-12T18:30:00+05:30",
"actual_iso": "2026-05-12T18:32:00+05:30",
"photo_proof_url": "https://...",
"photo_proof_user_approval": "approved",
"decoration_intact_at_delivery": true,
"currency": "INR",
"fare_breakdown_total_inr": 3250,
"rider_tip_inr": 0,
"ratings_pending": true,
"notes": ""
}
Status enum: delivered | picked_up | cancelled_by_user | cancelled_by_baker | failed_delivery | expired_unpicked | photo_proof_rejected_remade | terminated_with_quality_issue
8. WIDGET
WIDGET TYPE: cake_special_options
SOURCE: src/widgets/types.ts
TYPE NAME: CakeSpecialOptionsPayload
RENDERED IN: components/widgets/CakeSpecialOptionsWidget.tsx
Default: 3 stacked rows showing baker name + cake gallery thumbnail + cake-kind badge, customization-feasibility score, fare breakdown. Tap row → baker detail with sample creations carousel + reviews + dietary compliance summary → "Order with customization". Then CakeOrderTrackingCard with prep progress + photo-proof approval flow + delivery/pickup state.
9. CACHING POLICY
| Call | TTL | Rationale |
|---|---|---|
search_cake_and_special_options |
60s | bakers' availability shifts |
get_baker_detail |
5min | baker profile static-ish |
validate_customization |
60s | feasibility may shift |
place_order |
0s | |
track_order |
5s | live during prep |
| Failure responses | 0s |
10. ERROR CODES
| Code | HTTP | Meaning | TOMO behavior |
|---|---|---|---|
NO_BAKERS_AVAILABLE |
503 | no baker matches | retry or fall back |
OUT_OF_DELIVERY_RANGE |
400 | address outside coverage | surface |
OPTION_EXPIRED |
410 | option_token invalid | re-quote |
LEAD_TIME_INSUFFICIENT |
400 | scheduled too soon | suggest later |
CUSTOMIZATION_INFEASIBLE |
400 | request impossible | surface modifications |
ORDER_NOT_FOUND |
404 | order_ref doesn't exist | surface |
ALREADY_CANCELLED |
409 | duplicate cancel | idempotent |
PHOTO_PROOF_REQUIRED_BEFORE_DISPATCH |
409 | user must approve photo | surface approval flow |
EDIBLE_IMAGE_UPLOAD_REJECTED |
400 | image fails content guidelines | surface |
DECORATION_DAMAGED_IN_TRANSIT |
503 | en route damage | surface refund flow |
11. SANDBOX → PRODUCTION CHECKLIST
[ ] All §2 inputs validated, request_id echoed
[ ] search_cake_and_special_options returns ≥3 options for "2kg fondant birthday cake eggless"
[ ] All §4 fields populated with REAL data
[ ] FSSAI license + grade present
[ ] photo_ai_generated == false everywhere
[ ] Allergen disclosure complete
[ ] eggless flow tested end-to-end (no egg traces in eggless cakes)
[ ] photo_proof flow tested with user approval
[ ] book + customize + photo proof + deliver tested in sandbox
[ ] cancel respects free_cancel_until_iso (must be > lead_time)
[ ] thermal_packaging tested for summer order
[ ] CPC webhook within 60s of completion
[ ] HMAC verification passes
[ ] No forbidden fields anywhere
[ ] No paid placement / sponsored signals
[ ] customer_support_24x7 verified by TOMO call
[ ] Halwai certification verified (if claimed)
[ ] Decoration intact warranty tested with damage simulation
[ ] Edible image upload + print tested
12. ANTI-FABRICATION RULES
RULE 1 — No paid placement signals.
RULE 2 — Ratings unrounded floats from verified orders only.
RULE 3 — No fake custom_orders_completed inflation.
RULE 4 — No AI-generated photos. Gallery must be real past creations.
RULE 5 — Eggless means EGGLESS.
dietary.egg_or_eggless='eggless' delivered with even trace of egg = severe
health/dietary breach. TOMO samples randomly for lab test in case of complaint.
RULE 6 — Photo match honesty.
photo_match_30day_pct must come from baker's actual delivered-vs-brief comparison
data. Inflating to attract custom-cake users = breach.
RULE 7 — Allergen safety with shared kitchen disclosure.
shared_kitchen_disclosure must be honest. Charging for allergen-safe then
cross-contaminating in shared kitchen = breach + health hazard.
RULE 8 — Halwai certification real.
halwai_certified=true requires verifiable lineage or council certificate.
Self-attested certifications without authority = breach.
RULE 9 — Photo proof real and recent.
photo_proof.url must be a fresh photo of the actual cake just before
dispatch. Reusing stock photos = breach.
RULE 10 — Decoration intact warranty honored.
decoration_intact_warranty=true means partner refunds + remakes if cake
arrives damaged. Refusing claim with photo evidence = breach.
RULE 11 — No commission-based response shaping.
RULE 12 — Customization fee transparent.
customization_inr must reflect actual extras (edible image, fondant
figurine, etc.). Inflating to compensate for low base = breach.
RULE 13 — Edible image content guidelines applied honestly.
Rejecting an image after charging upload fee = breach. Reject before
charging.
RULE 14 — Photo personalization face matches uploaded photo.
photo_personalization_uploaded delivered cake must match the user's photo
to a reasonable degree. Substituting with stock face = severe breach.
RULE 15 — Surge or "festival fee" backed by actual demand.
No fake "Diwali surge" without partner-side demand telemetry.
VERSION HISTORY
v1.0.0 — 2026-05-10 — Initial spec