Manage prices for fixed services
The Bookla platform offers a flexible and powerful system for defining price rules for fixed services. This documentation outlines the key concepts and best practices for implementing effective pricing strategies.
Core Concepts
Price Rules
Price rules determine the cost of a service based on various conditions. Each rule consists of:
- A base price
- A compared price (optional, used to display original price before discounts)
- Priority level
- Active period (start and end dates)
- Optional limitations (days, hours, resources)
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. If multiple rules with the same priority match, the most recently created rule is selected.
Currency
Before creating any price rules, you must select the currency for your company. This setting applies to all price rules.
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",
"type": "fixed"
}
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"
}
]
}
}
Activity Periods
Use dates.start
and dates.end
dates to create smooth transitions between pricing periods. This is particularly useful for seasonal pricing or promotional periods.
Best Practices and Considerations
- Avoid Empty Spots: Ensure that your price rules cover all possible booking scenarios. If no price rule matches the booking parameters, an error will occur during the booking process.
- Rule Hierarchy: Organize your rules from most specific (highest priority) to most general (lowest priority). This allows for special case handling while maintaining a default price.
- Regular Review: Periodically review and update your price rules to ensure they align with your current business strategy.
- Testing: Before implementing new price rules, test various booking scenarios to ensure the correct prices are being applied.
- Documentation: Maintain internal documentation of your pricing strategy and the corresponding rules 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 that adapt to your business needs while ensuring a smooth booking experience for your clients.