Setting up different rates for different days through rules
Automatic swapping of fare tables based on day of the week
If you have different rates on different days, for example Rate 1 on Monday to Friday and rate 2 during the weekend, then it can be useful if these rates are automatically calculated when a booking comes in. Learn here how to set this up!
Guide on adding fare tables
Unsure of how to add different fare tables? Check here to learn how to create your 2 separate fare tables for weekdays and for weekend.
Note on the day's value digits
Programming languages are 0 - based. This means that the first day of the week has the number zero. Note that in the Gazoop system, the first weekday is a Sunday. For this reason we use the 0 in values.
The steps below will explain the process. The next image shows the fully filled in rule for weekdays.
- Make sure that you have the fare tables set up. Check the guide on fare tables just above if needed.
- Go to LocalisationRules.
- Click Create a New Rule
- Enter a clear Rule Name and Rule Description. Rule Status can stay on active, Rule Priority can be 1.
- Set Event Trigger to Before Placing a Booking.
- Leave the Check Conditions on Check all of the following conditions
- Set the frequency to TRIGGER THE RULE UNLIMITED TIMES. This is important, otherwise the rule will only work one time.
Now we will add the variables and actions.
- Under Variable, select Pick-up Time - Day of Week.
- The Operator should be Greater than.
- In Value, enter 0.
- Add another Variable by clicking the next to the line we have just created.
- Under Variable, select Pick-up Time - Day of Week.
- Under Operator, choose Less than.
- Under Value, enter 6.
- Under Action, select Change Fare Table.
- Under the Option, select your fare table for weekdays.
- Click Create New Rule.
Ready to learn a pro-tip? We will now create the rule for weekend days too, but by using the rule we just made.
- After the rule has been created, do not click out of the page. Instead, work in the same page.
- Change the rule name and descriptions to reflect that we are now working with weekend days.
- Change the Check Conditions to Check ANY of the following conditions
- Change the Operator next to both Variables to = Equals and assign values of 0 to the first line, and 6 to the second line
- Next to Action, change your fare table to your weekend fare table.
- Click Add As New Rule. This is important; if you click the blue button saying Modify Existing Rule, the one we created previously will no longer exist.
When your customers book by themselves, the rates will now automatically be chosen based on the day. Good job!