> For the complete documentation index, see [llms.txt](https://kb.theloops.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.theloops.io/agentstudio/skills-library/field-service-and-workforce-scheduling/book-ready-service-appointment.md). Agents can also search and read this documentation through its [MCP server](https://kb.theloops.io/~gitbook/mcp).

# Book Ready Service Appointment

Books one customer appointment for one service request task via the IFS appointment booking engine after gate checks, offer preview, and explicit user approval. Read-back confirms the appointment on the task.

| Business area                          | Action type                                |
| -------------------------------------- | ------------------------------------------ |
| Field Service and Workforce Scheduling | Updates IFS Cloud data after user approval |

## Overview

On the Request Task "Scheduling" page (WorkTaskSchedulingPage, projection RequestTaskHandling), the "Appointment Booking" command (ReqAppointmentBookingCommand, a clone of AppointmentBookingCommand in wrktsk/model/wrktsk/WorkTaskCommands.fragment) is enabled when AppointmentBookingAllowed is TRUE. It calls CheckStartBooking(TaskSeq) (warns if an appointment is already booked, errors if another user is booking the same activity), then StartBooking(TaskSeq), which deletes any old booking for the task's scheduling activity and creates a new SvcschApptBooking row.

IFS Cloud reads request tasks and appointment booking entities, then starts and accepts booking offers when approved.

## How it works

{% stepper %}
{% step %}
Get Task Booking Context (taskseq).
{% endstep %}

{% step %}
Check Booking Eligibility (taskseq). If result BLOCKED, stop. If WARN, confirm rebook before writes.
{% endstep %}

{% step %}
User approval to Start Booking Request (taskseq, approved=true).
{% endstep %}

{% step %}
Get Booking Offers (activityid). Use offersReady and slots for preview.
{% endstep %}

{% step %}
User approval to Accept Booking Offer (activityid, slotrowno, reasoncode if SLA violated, approved=true).
{% endstep %}

{% step %}
Verify Booked Appointment (taskseq).
{% endstep %}
{% endstepper %}

## Key capabilities

* Read one request task with appointment, SLA and scheduling flags.
* Check all booking gates mirrored from IFS (AppointmentBookingAllowed, task state, exclusion, fixed start, request state).
* Detect an existing appointment (rebook warning) and a booking held by another user (APPT\_OTHER\_USER).
* Start a booking and send the request to the scheduling engine.
* Poll for offers and read ranked slots with SLA violation flags.
* Preview the recommended offer and alternatives and require explicit approval.
* Accept one offer. Capture a reason code when the chosen offer violates the SLA.
* Read back the booking state and the appointment on the task.

{% hint style="info" %}
This skill keeps a human in the loop. It previews every change and updates IFS Cloud only after a user approves it.
{% endhint %}

## Requirements

The following IFS Cloud components and projections must be available, with permission sets that grant access to each projection.

| Component | Projection                       |
| --------- | -------------------------------- |
| REQMGT    | RequestTaskHandling              |
| WRKTSK    | SvcschAppointmentBookingHandling |

## Version compatibility

| Projection                       | Supported IFS Cloud releases |
| -------------------------------- | ---------------------------- |
| RequestTaskHandling              | 25R2, 26R1, 26R2             |
| SvcschAppointmentBookingHandling | 24R2, 25R1, 25R2, 26R1, 26R2 |

## Known limitations

* Write paths require explicit user confirmation or authorization where configured.
