Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Audit for Dev

Booking

On here you can find the list of booking table attributes

{
  "id" -> booking ID
  "user_id" -> user ID
  "restaurant_id" ->  restaurant ID
  "date" -> booking date
  "start_time" -> booking start time
  "end_time" -> booking end time
  "party_size" -> booking party size
  "active" -> booking status (active or not)
  "created_at" -> booking created at
  "updated_at" -> booking updated at
  "name" -> user name
  "email" -> user email
  "phone" -> user phone
  "no_show" -> booking no show status (true or false)
  "arrived" -> booking arrival status (true or false)
  "table" -> booking table number (if any)
  "special_request" -> booking special request
  "channel" -> booking channel
  "ack" -> booking acknoledge
  "note" -> booking note
  "cancel_url" -> booking cancel url
  "gcal_id" -> google calender id
  "remindered" -> booking reminder 
  "deleted_at" -> 
  "kids" ->  booking kids number (if any)
  "adult" -> booking adult number 
  "adjusted" -> indicates wheter the booking was being updated or not   
  "group_booking" -> indicates wheter the booking was group booking 
  "created_by" -> booking sreated by
  "modified_by" -> booking updated by
  "confirmed_by" -> booking confirmed by
  "cancelled_by" -> booking canceled by
  "medium" -> booking medium
  "special_bonus_id" -> not used anymore
  "cancel_reason" -> booking cancel reason
  "voucher_id" -> promo code id
  "voucher_added_at" -> promo code
  "dining_occasion_id" -> dining occasion id
  "service_type" -> service type (dine in)
  "distance_to_restaurant" -> not used anymore
  "address_id" ->  not used anymore
  "old_reservation_id" -> to save the old booking ID (if the user edits their booking, a new booking data will be created and the old booking ID will be listed here if this data was the new booking)
  "driver_ack" ->  not used anymore
  "is_temporary" -> indicates if the booking was temporary or not
  "self_pickup_ack" ->  not used anymore
  "promptpay_provider" -> 
  "cc_provider" -> 
  "gb_merchant_id" -> 
  "delivery_time" ->  not used anymore
  "skip_reorder_driver" ->  not used anymore
  "charge_price" -> the price that user paid (if the charge_percent is 100, the value is the same as the total_price)
  "total_price" -> the total price of the reservation
  "charge_amount_type" -> 
  "charge_percent" ->   the percentage amount of the payment 
  "charge_type" -> 
  "delivery_fee" ->   not used anymore
  "delivery_fee_in_baht" ->   not used anymore
  "delivery_fee_per_km_in_baht" ->   not used anymore
  "guest_id" -> 
  "prefix_number_cc" -> 
  "confirmed_at" -> 
  "delivery_subsidize_cents" ->   not used anymore
  "delivery_subsidize_currency" ->  not used anymore
  "is_order_now" -> 
  "time_estimation" ->   not used anymore
  "skip_start_time" -> 
  "delivery_discount_amount_cents" ->   not used anymore
  "delivery_discount_amount_currency" ->  not used anymore
  "prepared" -> 
  "_wallet_provider" -> 
  "delivery_channel_id" ->  not used anymore
  "driver_called" ->  not used anymore
  "used_voucher_amount_by_hh_cents" ->  
  "used_voucher_amount_by_hh_currency" ->  
  "used_voucher_amount_by_restaurant_cents" ->  
  "used_voucher_amount_by_restaurant_currency" ->  
  "corporate_event_id" -> 
  "accept_we_travel_together" -> 
  "original_delivery_fee" ->   not used anymore
  "driving_duration" ->   not used anymore
  "driving_duration_checked" ->  not used anymore
  "for_locking_system" -> 
  "session_id" -> 
  "payment_start_from" -> 
  "shopee_pay_provider" ->  not used anymore
  "refund" -> 
  "waiting_for_pick_up" -> 
  "pay_now" -> 
  "new_reservation_id" -> to save the new booking ID (if the user edits their booking, new booking data will be created and the new booking ID will be listed here if this data was the old booking)
  "username" -> user name
}

Audit

On here you can find if there's update on the booking.

{
  "id"-> audit ID
  "auditable_id"-> booking ID
  "auditable_type"-> type of edited data (reservation)
  "associated_id"-> 
  "associated_type"-> 
  "user_id"-> user id
  "user_type"-> user type (admin, owner, user)
  "username"-> user name
  "action"-> audit action (update, create)
  "audited_changes": {} -> audited change listed here
  "version"-> audit version
  "comment"-> audit comment
  "remote_address"-> 
  "created_at"-> 
  "request_uuid"-> 
}

Property

On here you can find the details of booking property, like packages, payment, and campaign

{
  "id": property ID
  "custom_sms_by_owner": 
  "reservation_id": booking ID
  "created_at": 
  "updated_at": 
  "campaign_source": 
  "campaign_medium": 
  "campaign_name": 
  "campaign_term": 
  "campaign_content": 
  "package": {
    "package_type": package type
    "package_data": [
      {
        "id": package ID
        "type": package type
        "quantity": package quantity
        "price_cents": package price in cents
        "price_currency": package price currency
        "commision": package commision
        "restaurant_package_id": restaurant package ID
        "pricing_type": pricing type
        "use_custom_price": indicates whether package using custom price or not
        "prepayment_percent": indicates prepayment in percent
        "total_adult_price": total adult price
        "total_kids_price": total kids price
        "pricing_groups": pricing group data
        "restaurant_package_start_date": 
        "restaurant_package_end_date": 
      }
    ],
    "price_cents": package price in cents
    "price_currency": package price currency
    "revenue": revenue
  },
  "business_booking": indicates company booking
  "guest_booking_id": guest booking id
  "klook_id": klook id
  "is_prepayment": indicates whether the package was using prepayment or not
  "prepayment_cents": total prepayment amount in cents
  "prepayment_currency": prepayment currency
  "last_minute": indicates whether the package was using last minutes booking
  "lat": 
  "lng": 
  "skip_review": 
  "has_requested_bike": not used anymore
  "pending_transaction_id": 
  "covered_by_hh": indicates whether the booking was covered by Hungryhub
  "delivered_timestamp": not used anymore
  "courier_called_at": not used anymore
}

Audit

On here you can find the audit if the booking property was edited.

{
  "id"-> audit ID
  "auditable_id"-> peoperty ID
  "auditable_type"-> type of edited data (reservation, reservation property)
  "associated_id"-> 
  "associated_type"-> 
  "user_id"-> user id
  "user_type"-> user type (admin, owner, user)
  "username"-> user name
  "action"-> audit action (update, create)
  "audited_changes": {} -> audited change listed here
  "version"-> audit version
  "comment"-> audit comment
  "remote_address"-> 
  "created_at"-
  "request_uuid"-> 
}

Charges

On here you can find the detail of booking charges, when the booking was prepaid or using deposit. Private (https://app.clickup.com/9003122396/docs/8ca1fpw-31876/8ca1fpw-39856)

Reservation Vouchers

On here you can see the detail if the user user point or voucher on their booking. it will create new data on reservation voucher table

Vouchers

On here you can see the details of the voucher that user using while booking

Vendor Payment

On here you can find the details of the payment if user use vendor payment

Notification

On here you can find list of notification that user receive

[
  {
    "id": 35584207,
    "note": {
      "sidekiq_job_ids_J2Cgi": {
        "send_notifications_J2Cgi": "bb719a9b2b9e4fe545aeea66"
      }
    },
    "parent_id": 4875845,
    "parent_type": "Reservation",
    "created_at": "2024-05-19T15:05:34.000Z",
    "updated_at": "2024-05-19T15:05:34.000Z"
  },
  {
    "id": 35584208,
    "note": {
      "notifications_480V7": {
        "create_gcal_event": "g9l30mekm3i69gsrpid1k1i4q0",
        "ack_has_offers_notif_confirmed_by_email_for_admin": "#",
        "ack_has_offers_notif_confirmed_by_email_for_owner": "#",
        "ack_has_offers_notif_confirmed_by_sms_for_owner": "NEW BOOKING!\nThe Lobby Lounge at Hyatt Regency Bangkok Sukhumvit\nBooking ID: 4875845\nTue, 21 May @ 13:15 for 4 adults",
        "push_notification_booking_created_to_owner": null
      },
      "notification_paths_480V7": [
        "create",
        "by_guest",
        "has_offers_not_last_minute",
        "create_gcal_event",
        "ack_has_offers_notif_confirmed_by_email",
        "ack_has_offers_notif_confirmed_by_sms",
        "ack_has_offers_ask_to_give_rating_by_email",
        "push_notification_booking_created"
      ]
    },
    "parent_id": 4875845,
    "parent_type": "Reservation",
    "created_at": "2024-05-19T15:05:35.000Z",
    "updated_at": "2024-05-19T15:05:35.000Z"
  }
]

OpenRice Notification (title name should same as the vendor or partner that user booked)

On here you can find list of vendor and partner notification

{
  "id": 6534,
  "reservation_id": 4875845,
  "vendor_id": 3,
  "created_at": "2024-05-19T15:05:13.000Z",
  "updated_at": "2024-05-19T15:05:13.000Z",
  "webhook_sent_at": null,
  "webhook_reservation_status": null,
  "reference_id": "20240519792229",
  "supplier_reservation_id": null,
  "inventory_source_id": null
}