LOTS PMS Season Synchronisation

Document Type: Technical + Business Integration Specification

Audience: PMS Vendors, Backend Engineers, Product Owners, QA Teams


1. Executive Summary

The LOTS PMS Season Synchronisation module ensures that Season records created in the Vendor system are accurately reflected in the PMS system.

Key Capabilities:

2. System Architecture

Vendor System (Orders & Seasons)
        |
        v
+---------------------+
| LOTS Integration API|
+---------------------+
        |
        v
+---------------------+
| PMS System          |
| (Season Database)   |
+---------------------+

2.1 Key Components

ComponentResponsibility
Vendor DatabaseStores season orders and status.
LOTS Sync ServiceBusiness logic, filtering, transformation, and orchestration.
PMS APICreate and update season records.
PMS Sync LogAudit trail for all sync operations.

3. Terminology & Glossary

TermDescription
SeasonA valid parking subscription period.
IU NoUnique Season Identifier (season_no in PMS).
Continuous SeasonSeason that extends from a previous season without gap.
Non-Continuous SeasonSeason that starts without continuity.
Complimentary SeasonSeason granted without charge.
PMSParking Management System.
Vendor SystemExternal system managing orders.

4. Season Classification Logic

4.1 Active Season Status

Only seasons with the following statuses are processed:

4.2 Non-Continuous Season

A season is classified as non-continuous if:

4.3 Continuous Season

A season is classified as continuous if:

5. Data Selection & Filtering Rules

RuleDescription
Active CarparkOnly seasons belonging to active carparks are processed.
Batch LimitRecords are processed in limited batches.
Time ConstraintStart date must be ≤ current time.
Status ConstraintSeason must be active.

6. High-Level Workflow

  1. Fetch eligible seasons from Vendor DB.
  2. Convert dates from UTC → SGT.
  3. Group seasons by carpark and IU number.
  4. Fetch existing seasons from PMS.
  5. For each season:
    • Check if season exists in PMS.
    • Decide create or renew.
    • Execute PMS API call.
  6. Update Vendor DB sync status.
  7. Write audit logs.

7. Decision Matrix

ScenarioAction
PMS season existsRenew season
PMS season does not existCreate season
PMS end date = nullAlways renew
New end date < PMS end dateSkip renewal
Carpark group detectedSkip season

8. PMS API Payload Mapping

Vendor FieldPMS Field
IUNoseason_no
seasonStartDatedate_from
seasonEndDatedate_to
buyerNameholder_name
vehicleNovehicle_no
buyerCompanyfull_company
rateTyperate_type

9. Vendor Database Update Logic

10. Logging & Audit Trail

Log TypeDescription
CreateSeason created in PMS.
RenewSeason renewed in PMS.
SkipSeason ignored due to rules.
ErrorFailed PMS operation.

11. Error Handling Strategy

12. Performance & Scalability

13. Idempotency & Deduplication

14. Pseudo-Code Overview

FOR each eligible season:
  IF season exists in PMS:
      IF shouldUpdate:
          renew season
      ELSE:
          skip
  ELSE:
      create season
  UPDATE vendor sync status
  LOG result

15. Vendor Responsibilities

16. Future Enhancements

17. Final Summary

The LOTS PMS Season Sync module provides a robust, scalable, and auditable integration between Vendor and PMS systems, ensuring accurate season lifecycle management across multiple carparks with advanced business logic for continuous and non-continuous seasons.