Computing availabilities for a season ticket sale

Use case

When selling a sport competition or a season ticket for live shows, user may want to know how many seats, and which seats are available for a given season ticket.

In some cases, there will be specific contingents available for season tickets, in some cases no.

Season tickets availabilities

For fixed price season tickets, there are two kinds of availabilities :

  • Season ticket availability (how much season tickets are authorized to be sold) that must be determined through a call to getProductAvailability
  • Availabilities for the performances/products included in the season ticket.

To compute season ticket availabilities, user must first call getProductAvailability (to know how many season tickets remain to be sold), then call availability methods for each performance/product and integrate the results.

Specific case

If the organization is selling season tickets by using dedicated contingents on the performances, the same seat will be attributed on all the performances. In that case, calling the availability method for the first performance should be enough, the other performances being supposed to have the same seats contingented for the season ticket.

What methods to call?

The normal availabily methods (getPerformanceAvailability, getSeatsAvailability), with one specific trick : all those methods allow to pass a composedProductId.
For that value, user must pass the productId of the season ticket.