Back-to-Back (B2B) Builder
The Back-to-Back visualizer helps you find same-day connecting sailings and save multi-leg chains into your Favorites for later planning.
How to use
- Open the Offers table on the Club Royale or Celebrity offers page.
- Click the small chevrons/pill in the B2B column for any sailing to open the Back-to-Back Builder modal.
- Review suggested Next Connections (filtered by port & exact same-day arrival/departure).
- Add one or more connections to the chain using Add to chain.
- When your chain has two or more sailings, click Save Chain to Favorites to persist it.
Side-by-side connections are allowed when the UI indicates it; otherwise connections must be on the same ship and same day.
Developer notes
- Implementation: `features/backToBackTool.js`
- Depth calculation: `utils/b2bUtils.js` (exposed as `B2BUtils.computeB2BDepth`).
- Favorites integration: uses `Favorites.bulkAddFavorites` or `Favorites.addFavorite` and tags saved sailings with `__b2bDepth` and `__b2bChainId`.
- Row binding: the tool expects rows to expose `data-b2b-row-id` on the row and `.b2b-depth-cell` for rendering depth badges.
- Matching rules: requires exact same-day adjacency (lag === 0) and matching embark/disembark ports. Offer codes cannot be reused inside a chain.
Quick example (developer)
Programmatically open the tool for a row ID:
if (window.BackToBackTool && typeof BackToBackTool.openByRowId === 'function') {
BackToBackTool.openByRowId('b2b-');
}
Saved chains are visible from the Favorites tab and are tagged with a short chain ID displayed in the table when present.