Deep linking


Leverage the Betterez platform to provide customers with booking shortcuts for specific schedules on any given day.

For instance if you'd like to up-sell a holiday trip running on December 24, 2017, you can get a custom URL from the Betterez websales page - with origin, destination, travel date and fare type pre-selected - and post it directly on your website, so that all the customer has to do is select the trip that's right for them then enter their name, email and payment information to complete the purchase.

Open your websales page, select the proper product, the desired O&D, one-way/round-trip, travel date, fare type and promo code.

Vue 1

In the following page, copy the URL in the trip selection page so that you can direct anyone back to this page.

Vue 1

You can create similar links for any combination of origin & destination, ticket type, fare types, and even promo codes!

If you wish to point your users to a trip result from an external source, say, a homepage widget then there are a set of rules you would need to apply to your online form to generate a deep link.

Our deep links rely on the root URL where trip results are located:

https://.betterez.com/cart/572ca2836aaf4d9618001f07/trip-results?

The Query string needs the following properties and values:

  productFamily  // is the product.family property from the /inventory/products api
  productId      // is the product._id property from the /inventory/products api
  type           // it should be either 'oneway' or 'roundtrip'
  channel        // is should always be 'websales'
  departureDate  // should be in the yyyy-mm-dd format
  returnDate     // should be in the yyyy-mm-dd format (ignore for type=oneway
  from           // the station._id of the departure station from the /inventory/stations api
  to             // the station._id of the arrival station from the /inventory/stations api
  fares          // a comma separated list of fare._id + | + qty. ex: 59ea2856615dceba0a79d077|2 indicates to passengers for that fare_id, fares id come from the /inventory/fares api

So, if an operator called ‘Red Sox Express” wants to point users from New York to Boston on the Beantown Shuttle, one way on New Year’s Day then the map should look like this:

https://redsoxexpress.betterez.com/cart/572ca2836aaf4d9618001f07/trip-results?productFamily=reservation&productId=59ea005d98aa8bbd0c00168a&type=oneway&channel=websales&departureDate=2019-01-01&from=59ea1e1fd5e30fb40a73e526&to=59ea26ae615dceba0a78d076&fares=59ea2856615dceba0a79d077%3A1&promo=
  1. productFamily: reservation
  2. productId: 59ea005d98aa8bbd0c00168a
  3. type: oneway
  4. channel: websales
  5. departureDate: Jan 1st, 2019
  6. returnDate: (ignore for oneway)
  7. from: 'New York' -> id is 59ea1e1fd5e30fb40a73e526
  8. to: 'Boston' -> id is 59ea26ae615dceba0a78d076
  9. fares: 'Standard' -> id id 59ea2856615dceba0a79d077

Values should be properly URL encoded and for a detailed, technical guide please visit Btrz engineering