Runbook: [Repush ARI When Complete Invoice Down]
| Service | [Channel Manager / tripla Link v1] |
|---|---|
| Owner Team slack handle | [@bnl-team-a] |
| Team's Slack Channel | [#bnl-teams-a - https://tripla-team.slack.com/archives/C08DWH5N4CR] |
Table of Contents
Important Links
- hxxps://admin.bookandlink.com/index.php/bookingbutton/complete_invoice?checkin=05/07/2025&checkout=06/07/2025&roomid:rateid=202:11640&propertycode=64&action=decrement&bookingrowid=43218252&callingLoc=booking&numroom=1×tamp=2025-05-22%2019:44:34&token=43218252_682f1c322034e
- Note: The link above is a sample Complete Invoice endpoint.
- For verification purposes, make sure to replace
hxxpswithhttpsbefore accessing the URL.
This prevents the link from being triggered multiple times automatically.
This section links to the most relevant resources for an engineer responding to this alert.
| Alert | [-] |
|---|---|
| Logs | [-] |
| Dashboard | [-] |
| Dependency | [Database Channel Manager - bookandl_bookandlink] |
| Admin Dashboard | [] |
1. Triage
The issue or error in the Complete Invoice endpoint can be quickly identified using the two methods below:
-
Check Complete Invoice Endpoint Directly
-
Step: Connect ke VPN Perimeter81 and access to the link below:
- hxxps://admin.bookandlink.com/index.php/bookingbutton/complete_invoice?checkin=05/07/2025&checkout=06/07/2025&roomid:rateid=202:11640&propertycode=64&action=decrement&bookingrowid=43218252&callingLoc=booking&numroom=1×tamp=2025-05-22%2019:44:34&token=43218252_682f1c322034e
- Replace
hxxpskehttpsbefore open the URL
-
Expected Result:
-
-
Check Booking Dates Count from Database Query
-
Step: Connect to the main Channel Manager / Tripla Link database (bookandl_bookandlink), then run the following query:
SELECT
T0.id,
T0.booking_status,
COUNT(T1.id) AS 'booking_dates_count',
T0.booking_date,
T0.ota_name
FROM
Bookings T0
LEFT JOIN Booking_dates T1 ON T1.booking_id = T0.id
WHERE
T0.id > 47579505
AND created_at >= '2026-01-23 13:20:00'
AND created_at <= '2026-01-23 14:09:00'
AND booking_status = 'confirm'
GROUP BY
T0.id
HAVING booking_dates_count = 0
ORDER BY
T0.id DESC -
Expected Result:
- After running the query, the result should return 0 rows.
-
2. Decision Point
-
IF all triage checks pass (the Complete Invoice endpoint is accessible and the query returns no records)
- ➡️ Go to: False Alarm
-
IF any triage check fails (the Complete Invoice endpoint returns 5XX errors and the query shows multiple reservation records with
booking_dates_count = 0)- ➡️ Go to: True Incident
3. False Alarm
A false alarm occurs when a report from the Support Team indicates that OTA reservations did not decrement inventory in Channel Manager, but investigation confirms that the Complete Invoice endpoint is functioning properly.
This situation may happen due to:
- Delay in synchronization
- Temporary OTA service latency
Immediate Action Plan
- Verify the reported reservation ID in Channel Manager.
- Check whether the inventory has already been decremented.
- Manually test the Complete Invoice endpoint to ensure it is accessible.
- Confirm that the endpoint does not return any 5XX error.
- Validate booking_dates records in the database (if necessary).
- Monitor the system for the next 15–30 minutes to ensure no recurring issue.
If all validations show normal behavior and no system malfunction is detected, classify the case as a false alarm.
4. True Incident
A true incident is confirmed when OTA reservations fail to decrease or increase inventory in Channel Manager and validation shows that booking dates were not generated due to a failed Complete Invoice process.
Identification Criteria
- Reservation from OTA does not reduce or increase the inventory.
- booking_dates_count = 0 in database validation.
- Complete Invoice endpoint fails or was not triggered from OTA Service.
4.1. Recover the System
The fastest way to restore booking dates and inventory synchronization is to manually trigger the booking date regeneration cron.
Run the cron URL:
- hxxps://admin.bookandlink.com/api/v1/cron/booking-date-issue
- Replace
hxxpswithhttpsbefore executing.
If the issue affects a specific reservation date:
- hxxps://admin.bookandlink.com/api/v1/cron/booking-date-issue?date=2026-02-20
- Replace
hxxpswithhttps.
This process will:
- Generate missing booking dates
- Regenerate XML
- Send the update back to the OTA service
Potential Cause: Code update on the Complete Invoice Endpoint
Diagnostic Steps:
- Check the following repository: https://bitbucket.org/bookandlink/channel-manager/src
- Verify whether there are any updates in the file
application/controllers/Bookingbutton.php, specifically in the functionpublic function complete_invoice(). - If changes are found, review the modifications carefully to identify potential causes of the issue.
Remediation Plan:
- Perform testing in the local environment to verify whether the file returns a 500 error when accessed locally.
- Apply a fix or revert the code changes that are causing the 5XX error.
Verification:
- Re-check the affected reservation in Channel Manager by navigating to:
Channel Manager → Monthly Deals → Last 10 Log Update. - Confirm that booking dates are successfully generated by running the query mentioned in point no. 1.
- Monitor the system for 15–30 minutes to ensure there is no recurring issue.
4.2. Clean Up
Once the system is stable, the next priority is managing the incident's aftermath. This includes assessing the blast radius, communicating the impact, correcting affected booking data, and ensuring no residual inconsistencies remain.
1. Impact Assessment
Objective: Quantify how many reservations were affected during the incident window.
- Use the previously validated database query from the Triage section to determine the number of affected reservations.
- Record:
- Total number of affected reservations
- Time window of impact (start time – end time)
- List of affected reservation IDs
2. Verification
- Manually verify several previously affected reservations in Channel Manager.
- Confirm: - booking_dates records exist - Inventory is correctly decremented - No 5XX errors are occurring - Monitor the system for 15–30 minutes to confirm no recurring issue.
