Manage prices for ticket services
The Bookla platform provides a flexible system for defining price rules for ticket services. This documentation outlines the key concepts and best practices for implementing effective pricing strategies for services that offer different types of tickets for events or venues.
Core Concepts
Per-Ticket Pricing
In ticket services, prices are set per ticket. When a client purchases multiple tickets, the total price is calculated by summing the individual ticket prices.
Ticket Types
Ticket services can have multiple ticket types (e.g., adult, child, senior, VIP) with different pricing for each type.
Price Rules
Price rules for ticket services include:
- A price per ticket
- 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 selects the price from the rule with the highest priority that matches the booking conditions for each ticket type. If multiple rules with the same priority match, the most recently created rule is selected.
Implementing Price Rules
Basic Structure
{
"id": "077890d3-5acc-48a5-bc62-efd529fb68d7",
"createdAt": "2024-01-01T00:00:00Z",
"limitation": {},
"price": {
"comparedPrice": 200,
"price": 100
},
"priority": 1,
"serviceID": "a118dfd3-95b0-4635-895c-4e06d22f5dbc",
"ticketID": "a2cf45c2-283b-43e3-8cca-13280843557a",
"type": "ticket"
}
Pricing Calculation
The total price is calculated by summing the prices of all tickets in the booking.
Example:
- Adult ticket: $50
- Child ticket: $25
- Client books 2 adult tickets and 1 child ticket
Resulting price: $125 ($50 + $50 + $25)
Limitations
You can narrow the applicability of a price rule using the following optional limitations:
- 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. For example:
- 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 (e.g., 10:00-12:00, 17:00-20:00).
- Resources: Apply the rule to specific resources, enabling different pricing per resource.
- 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 price rules cover all ticket types and possible booking scenarios to avoid pricing gaps.
- Rule Hierarchy: Organize rules from most specific (highest priority) to most general (lowest priority) for each ticket type.
- Seasonal Pricing: Use
activeFrom
andactiveTill
dates to implement seasonal pricing strategies. - Event-Specific Pricing: Utilize the resource limitation to set different prices for different events or venues.
- Testing: Thoroughly test your pricing rules with various booking scenarios, including different combinations of ticket types, to ensure correct calculations.
- Documentation: Maintain internal documentation of your pricing strategy for easier management and troubleshooting.
API Reference
For detailed information on implementing and managing price rules through our API, please refer to the Pricing API Documentation.
By leveraging these pricing capabilities, you can create sophisticated pricing strategies for ticket services that accommodate various ticket types and booking scenarios, while ensuring a smooth experience for your clients.