NextGen FSM
2026 Wave Two 2026 Wave Three 2026 Wave One
2026 Wave Two 2026 Wave Three 2026 Wave One

First Date Request

The FirstDate web service is the primary entry point for the Booking Module. It is invoked by external systems (e.g., CRM, customer portals) to request an initial appointment proposal for a customer service request.

When called, the service cross-references the input parameters to prevent double-booking, manage duplicate API calls, and determine whether to run the booking optimization algorithm or return an existing appointment.

Input Validation & Routing Logic

Every incoming FirstDate call evaluates two mandatory input fields: requestCode (the external request ID) and activityTypeCode (the Work Order Type). The system determines the workflow based on whether these keys already exist in the database and the current status of the associated appointment:

requestCode

Appointment Status

System Action & Behavioral Impact

Not associated with an existing WO

N/A (New Request)

  1. Triggers the core booking algorithm.

  2. Generates a new Work Order.

  3. Reserves a slot and creates an appointment in TEMPORARY status.

  4. Returns the appointment details.

Already associated with a WO

TEMPORARY

Bypasses the algorithm. Returns the exact same appointment data (ID, dates, and times) generated by the previous call. This prevents duplicate slot consumption during page refreshes or active sessions.

Already associated with a WO

CANCELLED (Via direct Cancel call after a confirmation)

Aborts execution. Returns an error message: "Error: the appointment already exists". The external system must invoke the FurtherDate web service instead to negotiate a new slot.

Already associated with a WO

CANCELLED (Via System Task “Cancel Temporary Expired Appointments in Agenda”)

Applies the algorithm again. Since the previous slot was cleared due to expiration or manual cancellation right after a First Date call, the system calculates and returns a brand-new appointment proposal.

Automated Session Cleanup

To keep the forecasting grid clean and prevent ghost reservations from abandoned user sessions, a system background task “Cancel Temporary Expired Appointments in Agenda" monitors temporary records:

  1. This background process automatically scans for appointments stuck in a TEMPORARY status.

  2. If an appointment is not confirmed (ConfirmDate) within n minutes of its generation (this timeframe parameter is fully configurable via company parameter), the task systematically cancels it.

  3. The capacity token is instantly returned to the local Time Slot pool, making it available for other customer requests.

Successful Response Output

Upon successful execution, the FirstDate service returns a structured payload containing the following key data points required by the external system:

  • Next-Gen Platform ID: The unique database identifier for the newly generated appointment.

  • Start Date/Time: The exact starting timestamp calculated for the appointment slot.

  • End Date/Time: The exact ending timestamp calculated for the appointment slot.

  • Time Slot ID: The specific capacity container identifier within the NextGen routing grid.