Manage Capacity Rules for Group Services
The Bookla platform provides a flexible system for defining capacity rules for group services. This documentation outlines the key concepts and best practices for implementing effective capacity management strategies for services that accommodate multiple participants.
Core Concepts
Capacity Definition
Capacity rules define the maximum number of spots available for a group service at a given time.
Rule Components
Capacity rules for group services include:
- Maximum number of spots
- 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
{
"id": "077890d3-5acc-48a5-bc62-efd529fb68d7",
"createdAt": "2024-01-01T00:00:00Z",
"limitation": {},
"spots": 10,
"priority": 1,
"serviceID": "a118dfd3-95b0-4635-895c-4e06d22f5dbc",
"type": "group"
}
Using Limitations
You can apply the same types of limitations as with price rules to create more specific capacity rules:
- 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
- Hours: Define time ranges for rule application.
- Resources: Apply the rule to specific resources, enabling different capacities per venue or instructor.
- Activity Period: Set a start and end date for the rule's validity.
{
"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
- Cover All Scenarios: Ensure your capacity rules cover all possible booking scenarios. Failing to set a capacity rule can lead to unlimited spots being available, which may not be desirable.
- Rule Hierarchy: Organize rules from most specific (highest priority) to most general (lowest priority).
- Seasonal Adjustments: Use
activeFrom
andactiveTill
dates to implement seasonal capacity changes. - Resource-Specific Capacity: Utilize the resource limitation to set different capacities for different venues or instructors.
- Testing: Thoroughly test your capacity rules with various booking scenarios to ensure correct application.
- Documentation: Maintain internal documentation of your capacity management strategy for easier management and troubleshooting.
Booking Behavior
- When a booking is attempted, the system checks the applicable capacity rule.
- If the booking would exceed the maximum capacity, the time slot will not be returned in times request as available to the client.
- If the last spot 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 sessions.
- Minimum capacity settings are not currently supported.
- Capacity rules apply to the total number of participants and cannot be set for specific participant types within a group service.
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.