What data is inside
Claude queries three wide tables in ClickHouse. They are flattened copies of our Recras data (bookings, customers, invoices, payments, staff planning, e-mails and notes), rebuilt every four hours from a read-only mirror that is refreshed every 15 minutes. Claude never writes to Recras.
Tables at a glance
| Table | One row per | Columns | Rows | Last export |
|---|
flattened_bookings | booking (with its customer, package, invoices, payments and staffing summarised) | 76 | 5,404 | 2 h 35 min ago 2026-12-01 04:30:01 UTC |
flattened_contact_moments | contact moment: an e-mail sent from Recras or a note on a contact | 35 | 53,729 | 2 h 35 min ago 2026-12-01 04:30:11 UTC |
flattened_contacts | contact: customer, supplier or staff member (with booking, invoice and communication totals) | 66 | 6,650 | 2 h 35 min ago 2026-12-01 04:30:29 UTC |
flattened_shifts | staff shift: one person, one time slot, with role, vessel, booking and recorded hours | 73 | 4,002 | 2 h 35 min ago 2026-12-01 04:30:40 UTC |
flattened_staff_planning_notifications | shift line in a planning mail to a staff member (new, changed or cancelled, with the times as communicated) | 18 | 3,405 | 2 h 34 min ago 2026-12-01 04:30:45 UTC |
The full guide Claude reads before querying is available as guide.md.
Reading the data
Booking statuses
Statuses are Dutch, as in Recras:
informatie- information request
interesse- interest
optie- option
pending_online- online booking awaiting payment
reservering- reservation (confirmed)
definitief- definitive (confirmed)
gaande- ongoing (confirmed)
voltooid- completed (confirmed)
geannuleerd- cancelled
Revenue and volume questions normally count the four confirmed statuses and exclude cancellations, options and information requests. Claude states which statuses it included.
Conventions
- Every row carries
synced_at (last time the record was seen in Recras) and deleted_at (set when it disappeared). Analyses skip deleted rows unless asked otherwise. - Amounts are in euro; columns ending in
_incl_vat include VAT. cost_total_incl_vat is the authoritative booking value. - Timestamps are UTC;
date columns are calendar dates as Recras shows them. - Invoice statuses:
concept (draft), verzonden (sent, unpaid), deels_betaald (partially paid), betaald (paid). - Contact types:
klant (customer), leverancier (supplier), personeel (staff), overig (other). Customer analyses filter on klant. - Package names, customer types and e-mail subjects are in Dutch, as entered in Recras.
- Personal data (names, addresses, e-mail texts) is in the tables because it is in Recras; it is only visible to colleagues who signed in with an allowed account, never on these public pages.
flattened_bookings
Bookings with customer, contact person, company, package and aggregated lines/invoices/payments/shifts/contact moments. Use it for revenue, volume, package popularity, group sizes, lead times, cancellations and payment behaviour. The customer, main contact person, company and package are joined in as prefixed columns; invoices, payments, booking lines, shifts and contact moments are summarised as counts, sums and first/last dates.
Record (21 columns)
id | identifier |
reference | text, may be empty |
date | date, may be empty |
status | text, may be empty |
status_updated_at | date and time (UTC), may be empty |
package_name | text, may be empty |
package_id | whole number, may be empty |
persons | whole number, may be empty |
online_booking | yes/no (1/0), may be empty |
status_expiry_date | date, may be empty |
particulars | text, may be empty |
should_invoice | yes/no (1/0), may be empty |
draft_invoice_after_days | whole number, may be empty |
invoiced_amount | amount (EUR), may be empty |
book_process_id | whole number, may be empty |
product_id | whole number, may be empty |
created_at | date and time (UTC), may be empty |
synced_at | date and time (UTC), may be empty |
deleted_at | date and time (UTC), may be empty |
package_person_count | whole number, may be empty |
package_price_pp_incl | amount (EUR), may be empty |
Timeline (7 columns)
first_seen_at | date and time (UTC), may be empty |
first_line_begin_at | date and time (UTC), may be empty |
last_line_end_at | date and time (UTC), may be empty |
first_invoice_date | date, may be empty |
last_invoice_date | date, may be empty |
last_payment_at | date and time (UTC), may be empty |
last_contact_moment_at | date and time (UTC), may be empty |
Costs (booking value as calculated by Recras) (7 columns)
cost_payment_term | whole number, may be empty |
cost_customer_reference | text, may be empty |
cost_total_incl_vat | amount (EUR), may be empty |
cost_company_id | whole number, may be empty |
cost_remark | text, may be empty |
cost_item_count | count (never empty) |
cost_items_amount | amount (EUR), may be empty |
Customer (the contact the booking belongs to) (13 columns)
customer_id | whole number, may be empty |
customer_contact_type | text, may be empty |
customer_name | text, may be empty |
customer_type | text, may be empty |
customer_department | text, may be empty |
customer_address | text, may be empty |
customer_postal_code | text, may be empty |
customer_city | text, may be empty |
customer_country_code | text, may be empty |
customer_province_code | text, may be empty |
customer_website | text, may be empty |
customer_company_id | whole number, may be empty |
customer_deleted_at | date and time (UTC), may be empty |
Main contact person (7 columns)
main_contact_person_id | whole number, may be empty |
main_contact_first_name | text, may be empty |
main_contact_last_name | text, may be empty |
main_contact_gender | text, may be empty |
main_contact_email | text, may be empty |
main_contact_phone | text, may be empty |
main_contact_city | text, may be empty |
Company (the invoicing company) (2 columns)
company_name | text, may be empty |
company_display_name | text, may be empty |
Package catalogue (the package definition, if it still exists) (1 columns)
package_catalog_name | text, may be empty |
Booking lines (activities and products on the booking) (4 columns)
line_count | count (never empty) |
line_quantity_total | whole number, may be empty |
line_product_count | count (never empty) |
line_product_names | text, may be empty |
Location / vessel (1 columns)
line_location_names | text, may be empty |
Invoices (aggregates) (3 columns)
invoice_count | count (never empty) |
invoice_total_incl_vat | amount (EUR), may be empty |
invoice_statuses | text, may be empty |
Payments (aggregates) (3 columns)
payment_count | count (never empty) |
paid_total | amount (EUR), may be empty |
outstanding_amount | amount (EUR), may be empty |
Staff shifts (aggregates) (4 columns)
shift_count | count (never empty) |
shift_hours | number, may be empty |
shift_staff_names | text, may be empty |
shift_qualification_names | text, may be empty |
Covering shifts (derived by location + time overlap) (2 columns)
covering_shift_count | count (never empty) |
covering_skipper_names | text, may be empty |
Contact moments (aggregates) (1 columns)
contact_moment_count | count (never empty) |
flattened_shifts
Staff shifts with staff member, role, location/vessel, linked booking and booking line, tasks, recorded hours, last planning notification and covered trips. Use it for the daily roster (who worked when, in which role, on which vessel), staffing per booking (which trips had a skipper), labour hours per trip, vessel or package, planned versus recorded hours, and workload per person per week or month. Role, location and booking come from the shift itself or, when missing there, from its first task. date is the local calendar date; begin_at and end_at are UTC. Statuses: bevestigd (confirmed), concept (draft), gevraagd (requested), geannuleerd (cancelled), geweigerd (declined). Recras keeps no modification history: last_notified_* shows what the staff member was last told by the daily planning mail, notification_in_sync whether that still matches, and covered_* which trips the shift covers by vessel and time overlap.
Record (17 columns)
id | identifier |
status | text, may be empty |
begin_at | date and time (UTC), may be empty |
end_at | date and time (UTC), may be empty |
date | date, may be empty |
weekday | text, may be empty |
internal_reference | text, may be empty |
remark | text, may be empty |
note | text, may be empty |
created_at | date and time (UTC), may be empty |
created_by | whole number, may be empty |
updated_by | whole number, may be empty |
is_generated | yes/no (1/0), may be empty |
product_id | whole number, may be empty |
product_name | text, may be empty |
synced_at | date and time (UTC), may be empty |
deleted_at | date and time (UTC), may be empty |
Planning (2 columns)
planned_minutes | whole number, may be empty |
planned_hours | number, may be empty |
Timeline (1 columns)
first_seen_at | date and time (UTC), may be empty |
Staff member (6 columns)
staff_id | whole number, may be empty |
staff_name | text, may be empty |
staff_contact_type | text, may be empty |
staff_email | text, may be empty |
staff_company_id | whole number, may be empty |
staff_customer_contact_id | whole number, may be empty |
Role (qualification) (3 columns)
qualification_id | whole number, may be empty |
qualification_name | text, may be empty |
task_qualification_names | text, may be empty |
Location / vessel (3 columns)
location_id | whole number, may be empty |
location_name | text, may be empty |
line_location_id | whole number, may be empty |
Bookings (aggregates or the linked booking) (11 columns)
booking_id | whole number, may be empty |
booking_reference | text, may be empty |
booking_date | date, may be empty |
booking_status | text, may be empty |
booking_package_name | text, may be empty |
booking_persons | whole number, may be empty |
booking_cost_total_incl_vat | amount (EUR), may be empty |
booking_customer_id | whole number, may be empty |
booking_customer_name | text, may be empty |
booking_customer_type | text, may be empty |
booking_line_id | whole number, may be empty |
Booking lines (activities and products on the booking) (5 columns)
line_product_id | whole number, may be empty |
line_product_name | text, may be empty |
line_begin_at | date and time (UTC), may be empty |
line_end_at | date and time (UTC), may be empty |
line_quantity | whole number, may be empty |
Shift tasks (4 columns)
task_count | count (never empty) |
task_descriptions | text, may be empty |
task_begin_at | date and time (UTC), may be empty |
task_end_at | date and time (UTC), may be empty |
Recorded hours (8 columns)
recorded_count | count (never empty) |
recorded_begin_at | date and time (UTC), may be empty |
recorded_end_at | date and time (UTC), may be empty |
recorded_break_minutes | whole number, may be empty |
recorded_minutes | whole number, may be empty |
recorded_hours | number, may be empty |
recorded_notes | text, may be empty |
hours_difference | number, may be empty |
Planning notifications (from the daily mails to staff) (8 columns)
notification_count | count (never empty) |
last_notified_at | date and time (UTC), may be empty |
last_notified_change_type | text, may be empty |
last_notified_begin_at | date and time (UTC), may be empty |
last_notified_end_at | date and time (UTC), may be empty |
last_notified_status | text, may be empty |
notification_match | text, may be empty |
notification_in_sync | yes/no (1/0), may be empty |
Covered trips (derived by location + time overlap) (5 columns)
covered_booking_count | count (never empty) |
covered_booking_ids | text, may be empty |
covered_booking_references | text, may be empty |
covered_package_names | text, may be empty |
covered_persons_total | whole number, may be empty |
flattened_staff_planning_notifications
Shift lines from the daily planning mails to staff (new/changed/cancelled with times), matched to the current shift. The communicated history of shifts. Recras mails every staff member a daily digest (07:02) with the shifts that were added, changed or cancelled the day before; this table holds one row per shift line with the times as printed (converted to UTC) and the previous times for changes. matched_shift_id links the line to the current shift when staff, begin and end match exactly, or when the staff member has only one shift that day.
Record (8 columns)
id | identifier |
sent_at | date and time (UTC), may be empty |
change_type | text, may be empty |
begin_at | date and time (UTC), may be empty |
end_at | date and time (UTC), may be empty |
status | text, may be empty |
position | whole number, may be empty |
match | text, may be empty |
Contact moments (aggregates) (1 columns)
contact_moment_id | whole number, may be empty |
Staff member (2 columns)
staff_id | whole number, may be empty |
staff_name | text, may be empty |
Staff shifts (aggregates) (1 columns)
shift_date | date, may be empty |
Previous values (from the mail) (2 columns)
previous_begin_at | date and time (UTC), may be empty |
previous_end_at | date and time (UTC), may be empty |
Matched shift (4 columns)
matched_shift_id | whole number, may be empty |
matched_shift_status | text, may be empty |
matched_shift_begin_at | date and time (UTC), may be empty |
matched_shift_end_at | date and time (UTC), may be empty |