# Openfront Travel Agent

> Inquiries, proposals, itineraries, supplier bookings, client payments and commission tracking in source you own.

From the first inquiry to the commission received.

## At a glance

- 40 models from the inquiry to the advisor ledger
- 10 MCP tools, one of them running 19 operator mutations
- 24 operator mutations, each under an advisory lock

## Links

- [Product overview](https://spec.openship.org/travel-agent): every area and feature on one page
- [Live demo](https://travel-agent.openship.org)
- [Documentation](https://docs.openship.org/docs/openfront/travel-agent)
- [Source code](https://github.com/openshiporg/openfront-travel-agent)
- [Feature film](https://spec.openship.org/travel-agent/video): a 27-second walk through every area

## Areas

### Inquiries

- **From an inquiry to a trip**: Website inquiries arrive with the trip type and travellers. Qualifying one creates the client, the travellers and the trip in one step.
- Trip types include honeymoon, family, group, corporate, cruise and adventure.
- Inquiries are new, qualifying, proposal, won or lost.
- Destinations are published for the public site.
- Traveller passport details are not readable through the generic API.

### Proposals

- **A proposal the client accepts by name**: Advisors build versioned proposals with options and items. The client opens a tokenised link, chooses an option and accepts with their name.
- Proposals are draft, sent, viewed, accepted, superseded or declined.
- Links carry a random token stored only as a SHA-256 hash.
- Itineraries are built day by day and shared the same way.
- Clients find a booking by email and trip code.

### Bookings

- **Every supplier component, booked and tracked**: Hotels, cruises, tours, flights, transfers, rail and insurance are booked as trip components with confirmation numbers, payment schedules and an expected commission.
- Components are quoted, held, booked, ticketed or cancelled.
- Cancelling a component can start a refund.
- Suppliers keep their contacts and commission terms.
- Trips move from planning to completed through named transitions.

### Client payments

- **Client money with a balance that cannot go negative**: Clients pay invoices by card. Each trip keeps a client funds ledger, and a trip only reaches paid in full with a zero balance.
- Invoices carry planning fee, deposit, final and insurance lines.
- Refunds go back to the original card, never above what was paid.
- Payments are confirmed by checking the payment intent with Stripe.
- A planning fee moves to the agency only from a paid invoice.

### Commissions

- **Commission from expected to received**: Expected commission is stored when a component is booked. Receipts allocate to components, and a short payment opens a follow-up task.
- Boards for expected, invoiced, received, short-paid and written-off.
- Over-payment is refused unless approved.
- The advisor and host-agency split is an append-only ledger.
- Advisor payouts come from the ledger.

### Approvals

- **Refunds and write-offs need a second person**: Refunds above the agency threshold and every commission write-off need a manager approval from a different user.
- The default refund threshold is $500.
- An approval is consumed in the same transaction as the action.
- Every operation writes an audit event.
- Tasks cover deposits due, finals due and expiring passports.

### Developer

- **An agency back office in your repository**: Next.js and Keystone 6 on PostgreSQL, with Stripe and manual payment providers. Status fields change only through custom mutations, and each runs in a transaction under an advisory lock.
- 40 models from the inquiry to the advisor ledger.
- 17 role permissions.
- One MCP tool, travelOperation, runs 19 operator mutations with the same rules.
- Money is integer minor units with an ISO currency code.
