**Order Log Comparison (GoFood Booking Log Proto vs Order on Cosmo)**
**Context**
As a consolidated order service, Cosmo should store all orders from online and offline. Online order is order that being fired by GoFood booking log (Firehose). Offline order is order that being created by Cashier.
On online orders, currently Cosmo don't store all available fields on GoFood Booking Log. Cosmo now only store few basic information about it. Cosmo able to add more data field upon request by respective stakeholders.
**GoFood Booking Log that being published to Cosmo**
```aspnet
message GoFoodBookingLogMessage {
string order_number = 2; // Copied
string customer_name = 29; // Copied
string customer_phone = 30; // Copied
string driver_name = 32; // Copied
string driver_phone = 33; // Copied
google.protobuf.Timestamp booking_creation_time = 41; // Copied
gojek.esb.types.GoFoodBookingSubStatus.Enum sub_status = 201; // Converted into CREATED, IN_PROGRESS, COMPLETED, CANCELLED
string otp = 209; // Copied
string saudagar_id = 212; // Copied
repeated gojek.esb.types.GoFoodShoppingItem shopping_items = 302; // Copied
}
```
**GoFood Booking Log Proto**
```aspnet
message GoFoodBookingLogMessage {
gojek.esb.types.ServiceType.Enum service_type = 1; //required
string order_number = 2; //required
string order_url = 3; //required
gojek.esb.types.BookingStatus.Enum status = 4; //required
google.protobuf.Timestamp event_timestamp = 5; //required
string customer_id = 6; //required
string customer_url = 7; //required
string driver_id = 8; //filled during driver_found, cancelled, customer_picked_up, customer_dropped_off, feedback_for_driver, and refunded event_names
string driver_url = 9;
bool is_reblast = 10; //if this is a reblasted booking, then true
string activity_source = 11;
string service_area_id = 12;
//payment
gojek.esb.types.PaymentType.Enum payment_type = 13;
float total_unsubsidised_price = 14;
float customer_price = 15;
float amount_paid_by_cash = 16;
float amount_paid_by_credits = 17;
float surcharge_amount = 18;
float tip_amount = 19;
float driver_cut_amount = 20;
//distance, locations
float total_distance_in_kms = 21;
string route_polyline = 22;
repeated gojek.esb.types.Route routes = 23;
google.protobuf.Duration driver_eta_pickup = 24;
google.protobuf.Duration driver_eta_dropoff = 25;
gojek.esb.types.Location driver_pickup_location = 26;
gojek.esb.types.Location driver_dropoff_location = 27;
//customer
string customer_email = 28;
string customer_name = 29;
string customer_phone = 30;
//driver
string driver_email = 31;
string driver_name = 32;
string driver_phone = 33;
string driver_phone2 = 34;
string driver_phone3 = 35;
//cancellation
int32 cancel_reason_id = 36;
string cancel_reason_description = 37;
gojek.esb.types.CancelSource.Enum cancel_source = 38;
gojek.esb.types.CustomerType.Enum customer_type = 39;
//booking creation time
google.protobuf.Timestamp booking_creation_time = 41;
//customer discount
float total_customer_discount = 40;
float gopay_customer_discount = 42;
float voucher_customer_discount = 43;
google.protobuf.Timestamp pickup_time = 44;
float driver_paid_in_cash = 45;
float driver_paid_in_credit = 46;
reserved 47;
reserved "previous_status";
string receiver_name = 48;
string driver_photo_url = 49;
gojek.esb.types.BookingStatus.Enum previous_booking_status = 50;
gojek.esb.types.VehicleType.Enum vehicle_type = 51;
// Customer surge information
int64 customer_total_fare_without_surge = 52;
float customer_surge_factor = 53;
int64 customer_dynamic_surge = 54;
bool customer_dynamic_surge_enabled = 55;
// Driver surge information
int64 driver_total_fare_without_surge = 56;
float driver_surge_factor = 57;
int64 driver_dynamic_surge = 58;
bool driver_dynamic_surge_enabled = 59;
//Actual Time arrival
google.protobuf.Duration driver_ata_pickup = 60; //actual time arrival
google.protobuf.Duration driver_ata_dropoff = 61; //actual time arrival
//Activity Source Information
string gcm_key = 62; //gcm_key should be filled if activity_source is android
string device_token = 63; //device_token should be filled if activity_source is ios
//Financial Information
string pricing_service_id = 64;
string payment_invoice_number = 65; //for gopay reconciliation
//price-edit
string price_edit_reason = 150;
//driver-arrived
gojek.esb.types.Location driver_arrived_location = 151;
google.protobuf.Timestamp driver_arrived_time = 152;
//driver-order-placed
gojek.esb.types.Location driver_order_placed_location = 154;
google.protobuf.Timestamp driver_order_placed_time = 155;
google.protobuf.Timestamp merchant_accepted_time = 156;
//merchant-cancel
string merchant_cancel_reason = 157;
google.protobuf.Timestamp merchant_cancel_time = 158;
//GoResto specific information
string restaurant_id = 200;
gojek.esb.types.GoFoodBookingSubStatus.Enum sub_status = 201;
float shopping_price = 202;
float commission_price = 203;
float withholding_income_tax = 204;
float voucher_redeemed_value = 205;
float voucher_commission = 206;
string voucher_id = 207;
string voucher_title = 208;
string otp = 209;
float driver_entered_price = 210;
string driver_wallet_id = 211;
string saudagar_id = 212;
google.protobuf.Timestamp validated_at = 213;
string merchant_wallet_id = 214;
string restaurant_uuid = 215;
string search_id = 216; // Deprecated, please use analytics.search_id instead.
string gopay_driver_reservation_id = 217;
string voucher_batch_id = 218;
gojek.esb.types.MerchantConfig merchant_config = 219;
string brand_id = 220;
//GoFood Business Intelligence purpose
string receipt_url = 300;
bool is_goresto = 301;
repeated gojek.esb.types.GoFoodShoppingItem shopping_items = 302;
bool has_promo = 303;
gojek.esb.types.GoFoodBookingAnalytics analytics = 304;
//GoFood Campaign Details
repeated gojek.esb.types.markdown.CampaignDiscount campaign_discounts = 400;
}
```