Skip to main content

Manage Capacity Rules for Ticket Services

The Bookla platform offers a flexible system for defining capacity rules for ticket services. This documentation outlines the key concepts and best practices for implementing effective capacity management strategies for services that offer different types of tickets for events or venues.

Core Concepts

Capacity Definition

Capacity rules for ticket services can be set in two ways:

  1. Total capacity per slot: Defines the maximum number of tickets available for a given time slot, regardless of ticket type.
  2. Per-ticket capacity: Defines the maximum number of tickets available for each specific ticket type.

Rule Components

Capacity rules for ticket services include:

  • Maximum capacity (total or per ticket type)
  • Priority level
  • Optional limitations (days, hours, resources)
  • Active period (start and end dates)

Rule Priority and Selection

When a booking is made, the system applies the capacity rule with the highest priority that matches the booking conditions. If multiple rules with the same priority match, the most recently created rule is selected.

Implementing Capacity Rules

Basic Structure

price
{
"id": "077890d3-5acc-48a5-bc62-efd529fb68d7",
"createdAt": "2024-01-01T00:00:00Z",
"limitation": {},
"spots": 10,
"priority": 1,
"serviceID": "a118dfd3-95b0-4635-895c-4e06d22f5dbc",
"ticketID": "a2cf45c2-283b-43e3-8cca-13280843557a",
"type": "ticket"
}

Capacity API Documentation

Using Limitations

You can apply the same types of limitations as with price rules to create more specific capacity rules:

  1. Days: Specify days of the week when the rule applies using a 7-bit bitmask. Each bit represents a day of the week, starting from Monday.
  • 1111111 (127 in decimal) represents all days
  • 1111100 (124 in decimal) represents Monday through Friday
  • 0000011 (3 in decimal) represents Saturday and Sunday
  1. Hours: Define time ranges for rule application.
  2. Resources: Apply the rule to specific resources, enabling different capacities per venue or instructor.
  3. Activity Period: Set a start and end date for the rule's validity.
limitation
{
"limitation": {
"dates": [
{
"start": "2021-01-01T00:00:00Z",
"end": "2021-02-01T00:00:00Z"
}
],
"daysOfWeek": 127,
"resourceIDs": [
"6c5cba5e-52da-4ca3-8f86-25b3d09e0fb5"
],
"times": [
{
"start": "09:00",
"end": "18:00"
}
]
}
}

Best Practices and Considerations

  1. Cover All Scenarios: Ensure your capacity rules cover all ticket types and possible booking scenarios to avoid unlimited availability.
  2. Rule Hierarchy: Organize rules from most specific (highest priority) to most general (lowest priority) for each ticket type and total capacity.
  3. Seasonal Adjustments: Use activeFrom and activeTill dates to implement seasonal capacity changes.
  4. Event-Specific Capacity: Utilize the resource limitation to set different capacities for different events or venues.
  5. Testing: Thoroughly test your capacity rules with various booking scenarios, including different combinations of ticket types.
  6. Documentation: Maintain internal documentation of your capacity management strategy for easier management and troubleshooting.

Booking Behavior

  • When a booking is attempted, the system checks both the total capacity (if set) and the specific ticket type capacity.
  • If the booking would exceed either the total capacity or the specific ticket type capacity, the tickets will not be available for purchase.
  • If the last available ticket is booked just as another client attempts to book, the latter client will receive an error message.

Important Notes

  • There is currently no built-in waitlist feature for fully booked events.
  • You can combine total capacity rules with per-ticket capacity rules to create complex availability scenarios.
  • Ensure that the sum of per-ticket capacities does not exceed the total capacity of the venue or event.

API Reference

For detailed information on implementing and managing price rules through our API, please refer to the Capacity API Documentation.

By leveraging these pricing capabilities, you can create sophisticated pricing strategies that adapt to your business needs while ensuring a smooth booking experience for your clients.