Skip to content

Booking Lifecycle Management -- Configuration Reference

Covers: M1 through M9

This document is the consolidated configuration checklist for deploying and operating the Booking Lifecycle Management module. It covers database migrations, configuration properties, ERP baseline data, API roles, and scheduled jobs.


1. Database Migrations

Run in order on each environment:

# Script Milestone Tables/Changes
1 0044-booking-core.sql M1 booking, serviceline, bookingpassenger, bookingstatushistory, bookingamendment, bookingactivitylog
2 0045-booking-cart.sql M2 bookingcart, bookingcartitem
3 0046-booking-actions.sql M5 actiontemplateset, actiontemplate, actionitem
4 0047-booking-payment-fields.sql M3 ALTER booking: payment fields
5 0048-booking-payment-fields.sql M3 Additional payment fields
6 0049-booking-cancel-tc.sql M4/M6.5 cancellationrecord, termstemplate
7 0050-booking-actions.sql M5 Action framework extensions
8 0051-booking-vouchers.sql M6 vouchersectiontemplate, bookingdocument
9 0052-booking-terms-items.sql M6.5 bookingtermsitem
10 0053-outbound-group-sales.sql M8 grouppricing, grouppricingvariation, groupsale, groupsalevariation, groupsalepax; ALTER bookingpassenger (grouppaxid)
11 0054-group-flights-expenses.sql M8 grpflightblock, grpflightleg, grpexpense
12 0056-triphotel-hotelname.sql M8 ALTER triphotel (hotelname); backfills from hotel catalog
13 0057-maintenance-tables.sql M9 maintenancejoblog, notificationstatus

All scripts are idempotent (IF NOT EXISTS / IF NOT EXISTS).


2. Configuration Properties

2.1 tourlinq-config.xml (AppProperties)

Property Default Description Milestone
payment.gateway com.perun.tlinq.pgw.telrj.TelrJPgw Payment gateway implementation class M3
default.sales.agent natalia@peruntours.com Default agent for unassigned bookings M1
local.currency AED System local currency for conversions M1
group.outbound.default.product GENACTVOUT Default product code for outbound group activities (set on CTripService when productId is null) M8

2.2 erp-booking.properties (in config/properties.d/)

ERP Product Codes

Each service type maps to an Odoo product default_code. These products must exist in Odoo with correct UoM and tax configuration.

Property Default Code Odoo Product Required Description
erp.default.product.HOTEL LHSTAY Yes Hotel accommodation
erp.default.product.FLIGHT AIRTIX Yes Air tickets
erp.default.product.TRANSFER LOCXFER Yes Ground transport
erp.default.product.ACTIVITY LOCACT Yes Tours and activities
erp.default.product.CRUISE CRUISEPACK Yes Cruise packages
erp.default.product.VISA VISAFEE Yes Visa processing
erp.default.product.INSURANCE INSPAK Yes Travel insurance
erp.default.product.OTHER OTHRMAN Yes Miscellaneous services
erp.default.product.MANUAL OTHRMAN Yes Manually entered items
erp.default.product.SERVICE_CHARGE SVCFEE Yes Payment surcharges
erp.default.product.GROUP_TRAVEL GRPTRAVEL Yes Outbound group trip package

Payment Channel Mapping

Maps TQPro payment methods to Odoo journal channel names.

Property Value Odoo Journal Required
erp.payment.channel.CARD_ONLINE TELRAED Yes
erp.payment.channel.BANK_TRANSFER BANK Yes
erp.payment.channel.TABBY TABBY Yes
erp.payment.channel.POS_TERMINAL POS Yes
erp.payment.channel.CASH CASH Yes

Service Charges

Per-payment-method surcharges applied at checkout.

Property Type Value Label
service.charge.CARD_ONLINE percent 2.5 Card Processing Fee
service.charge.BANK_TRANSFER fixed 0 Bank Transfer Fee
service.charge.TABBY percent 3.0 Tabby Service Fee
service.charge.POS_TERMINAL percent 2.0 POS Processing Fee
service.charge.CASH fixed 0 (none)

Agency Information (for T&C templates)

Property Description
tqpro.agency.name Agency name for communications
tqpro.agency.phone Agency phone
tqpro.agency.email Agency email

Service Defaults (for T&C templates)

Property Default
service.default.hotel.checkInTime 15:00
service.default.hotel.checkOutTime 12:00
service.default.flight.baggageAllowance 30kg checked + 7kg cabin
date.format.template dd MMM yyyy

2.3 tlinqapi.properties

Property Description Notes
dev-mode Enable dev mode (bypasses auth) Never enable in production
dev-user-roles Roles for dev mode user e.g., admin,agent

3. ERP Baseline Data (Odoo)

The following must exist in the Odoo ERP before the booking module can create Sales Orders and invoices.

3.1 Products (product.template)

Create these products in Odoo with the specified default_code:

Default Code Product Name UoM Notes
LHSTAY Hotel Stay Night For hotel service lines
AIRTIX Air Ticket Unit For flight service lines
LOCXFER Local Transfer Unit For ground transport
LOCACT Local Activity Unit For tours/activities
CRUISEPACK Cruise Package Unit For cruise bookings
VISAFEE Visa Processing Unit For visa service lines
INSPAK Insurance Package Unit For travel insurance
OTHRMAN Other Service Unit Catch-all for manual/other items
SVCFEE Service Fee Unit For payment surcharges
GRPTRAVEL Group Travel Package Unit For outbound group sale bookings
GENACTVOUT Generic Outbound Activity Unit For outbound group activities (set in tourlinq-config.xml)

3.2 Payment Journals

Ensure Odoo has payment journals matching the channel names:

Channel Odoo Journal
TELRAED Credit Card (Telr)
BANK Bank Transfer
TABBY Tabby BNPL
POS POS Terminal
CASH Cash

4. API Roles (config/api-roles.properties)

Role Definitions

Role Access Level
guest Public/unauthenticated
agent Logged-in travel agents
admin Administrators (all access)

Endpoint Summary by Module

Module Endpoints Agent Access Admin Only
Core Booking (M1) 28 Most Delete
Cart (M2) 8 All --
Checkout/Payment (M3) 6 All --
Cancellation (M4) 2 All --
Actions (M5) 10 Items Templates (admin)
Vouchers/Documents (M6) 8 All Templates (admin)
Terms (M6.5) 6 All --
Group Pricing (M8) 8 All Variation remove (admin)
Group Sales (M8) 6 All --
Group Flights/Expenses 9 All --
Maintenance (M9) 20 -- All (admin only)

5. Scheduled Jobs

Job Class Schedule Lock Description
Option Expiry OptionExpiryRunner Every 15 min blm-option-expiry Expires OPTION_HELD bookings past their expiry date
Cart Cleanup CartCleanupRunner Daily blm-cart-cleanup Expires stale ACTIVE carts (7d), abandons PARKED carts (30d)
Booking Health BookingHealthRunner Daily blm-booking-health Monitors zombies, missed expiries, ERP failures; logs to maintenancejoblog

Jobs use Hazelcast distributed locks to prevent duplicate execution in clustered deployments.


6. Entity Configuration Files

File Entities
config/entities/booking-entities.xml Booking, ServiceLine, BookingPassenger, BookingStatusHistory, BookingAmendment, BookingActivityLog, BookingCart, BookingCartItem, CancellationRecord, TermsTemplate, BookingDocument, BookingTermsItem, ActionTemplateSet, ActionTemplate, ActionItem, MaintenanceJobLog, NotificationStatus, GroupPricing, GroupPricingVariation, GroupSale, GroupSaleVariation, GroupSalePax
config/entities/group-entities.xml TripFlightBlock, TripFlightLeg, TripExpense (plus existing group entities)

All entities use NTSServiceFactory with NTSEntityReadService / NTSEntityWriteService.


7. Deployment Verification Checklist

After deploying all migrations and configuration:

  • [ ] Application starts without entity mapping errors in logs
  • [ ] All DB tables exist: SELECT table_name FROM information_schema.tables WHERE table_schema = 'nts' AND table_name LIKE 'booking%' OR table_name LIKE 'group%' OR table_name LIKE 'maintenance%' OR table_name LIKE 'notification%' ORDER BY table_name;
  • [ ] API roles loaded: test POST /blm/booking/create with agent session (should succeed) and POST /blm/maintenance/health/summary with agent session (should fail with ACCESS_DENIED)
  • [ ] ERP products exist: verify all 11 product codes resolve via ProductFacade.getProductByCode()
  • [ ] Payment gateway configured: test checkout flow creates Telr payment link
  • [ ] Scheduled jobs running: check logs for OptionExpiryRunner, CartCleanupRunner, BookingHealthRunner
  • [ ] Maintenance dashboard accessible: navigate to Bookings → Maintenance (admin only)
  • [ ] Group sales accessible: navigate to Groups → Group Sales