> For the complete documentation index, see [llms.txt](https://knowledgebase.flaik.com/flaik-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.flaik.com/flaik-knowledge-base/flaik-admin-settings-setup/for-sups-managers/pos-schedule-sync.md).

# POS Schedule Sync

flaik logic for schedule syncing of shifts, tasks and private lessons.

### Instructor Schedule Sync <a href="#user-content-instructor-schedule-sync" id="user-content-instructor-schedule-sync"></a>

The flaik system sends instructor schedules to the POS in the frequency outlined below. This is the opposite direction to lesson sales processing: sales come from the POS into flaik, while schedules go from flaik to the POS.

{% hint style="info" %}
**What gets sent:** shifts, tasks and private lesson assignments, depending on which of these your resort has turned on in its POS integration settings.

**Instructor-days:** flaik always sends an instructor's whole day (their shift, tasks and private lessons together), never just the part that changed.
{% endhint %}

#### There are 5 steps to every schedule sync: <a href="#user-content-there-are-5-steps-to-every-schedule-sync" id="user-content-there-are-5-steps-to-every-schedule-sync"></a>

1. **Changes are queued**
   * Any change to an instructor's day queues that whole instructor-day to be sent. This includes a shift, a task, a private lesson assignment, or clearing a day.
2. **Sending to the POS**
   * Every minute we send any queued instructor-days to the POS.
   * When many days are queued, they are sent in this order:
     * Days with a private lesson change
     * Days with a task change
     * Days with only a shift change
3. **POS processing**
   * The POS works through the batch one instructor-day at a time and records a result for each: completed, or an error.
4. **Checking the results**
   * Every minute for the first 10 minutes after sending, we check the batch for results.
   * After that, we check every 60 minutes.
   * A batch the POS hasn't finished 30 minutes after it was sent is treated as **stalled**.
5. **Acting on the results**
   * **Completed:** nothing more to do. Any earlier POS Sync issue for that day clears.
   * **Temporary error or stalled:** we send the day again automatically.
   * **An error that needs a change in flaik or the POS:** we show a red **POS Sync** badge on the instructor's day in Scheduling. The day isn't sent again until you resync it or change the day.

{% hint style="info" %}
A day that changes again while it's being sent is simply sent again on the next run, so the POS always gets the latest version of the day.
{% endhint %}

#### Automatic Retries <a href="#user-content-automatic-retries" id="user-content-automatic-retries"></a>

Some errors are caused by the POS or the connection to it, not by anything in your schedule. For example, the POS timed out, was busy, or took a batch but never finished it. We retry these automatically:

* Up to 3 times per instructor-day per day.
* For as long as the day keeps failing. If flaik doesn't get to retry a day for 5 days (for example, because the resort reached its daily retry limit), it stops and shows a "stopped retrying" message. Resync the day, or contact flaik Support.
* Across your resort, up to 1,000 retries per day, so a POS outage doesn't flood the POS when it comes back.

{% hint style="info" %}
If many instructors fail with the same error at the same time (for example, every instructor in a batch reported as not found), the problem is with the POS rather than with each instructor. We treat this as a temporary error and retry, instead of asking you to check every instructor.
{% endhint %}

#### POS Sync Errors <a href="#user-content-pos-sync-errors" id="user-content-pos-sync-errors"></a>

When an instructor-day has an error, Scheduling shows a red **POS Sync** badge on that instructor's day, and the date is highlighted on the calendar. Click the badge to see what went wrong.

| Error                                                      | What happens          | Who fixes it                                             |
| ---------------------------------------------------------- | --------------------- | -------------------------------------------------------- |
| The POS timed out, was busy, or lost connection            | Retried automatically | flaik retries                                            |
| The batch stalled in the POS                               | Retried automatically | flaik retries. flaik Support if it lasts more than a day |
| The instructor's Staff Id isn't found in the POS           | Not retried           | You: fix the Staff Id in flaik or the POS, then resync   |
| The activity code on a shift type or task isn't in the POS | Not retried           | You: choose a current POS activity, then resync          |
| A private lesson is missing or invalid in the POS          | Not retried           | You: check the lesson in the POS, then resync            |
| The POS rejected the day for another reason                | Not retried           | You: check the day in the POS, then resync               |
| The POS had an internal error                              | Not retried           | flaik Support                                            |

For the exact message for each error and what to do, see [POS Sync Issues on the Schedule](https://knowledgebase.flaik.com/flaik-knowledge-base/flaik-admin-settings-setup/for-sups-managers/pos-schedule-sync/pos-sync-issues-on-the-schedule.md).

{% hint style="info" %}
A POS Sync badge clears on its own as soon as the POS completes a later send of that day. That's usually within a few minutes, and at most about an hour.
{% endhint %}

#### Resync to POS <a href="#user-content-resync-to-pos" id="user-content-resync-to-pos"></a>

You can send instructor-days again yourself, for example after fixing a Staff Id or an activity code:

* In **Scheduling › Tasks**, open the **day view**, select the instructors, choose **Resync to POS** (in the panel on the right or the action bar), and confirm. It sends only the day on screen, so repeat it for each day. It isn't available while you're editing the schedule or in Focus mode.

{% hint style="info" %}
You don't need to resync days showing *"flaik will send it again automatically"*. They're already being retried, and resending them while the POS is having trouble only adds to its queue.
{% endhint %}

#### Instructor Matching <a href="#user-content-instructor-matching" id="user-content-instructor-matching"></a>

Each instructor-day is sent with the instructor's **Staff Id** from flaik.

* The POS uses this to find the matching instructor. If the POS has no instructor with that identifier, the day fails with an instructor not found error and isn't retried.
* This is the same Staff Id used to match assigned and requested instructors when lesson sales are fetched from the POS.

#### Activity Codes <a href="#user-content-activity-codes" id="user-content-activity-codes"></a>

Every shift type and task in flaik is linked to a POS activity, and each instructor-day is sent with those activity codes.

* flaik keeps a copy of your POS's activity list. If an activity is removed from the POS, flaik still remembers its name, so the error can tell you which activity it was.
* If a shift type or task still uses a removed activity, every day it appears on fails until the shift type or task is updated to a current POS activity.

{% hint style="info" %}
**Note**

* Schedule sync is only available on resorts on POS Integration API version 2.0.2.0 or higher
* Reach out to the flaik Support team if you're unsure of which version you're on
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://knowledgebase.flaik.com/flaik-knowledge-base/flaik-admin-settings-setup/for-sups-managers/pos-schedule-sync.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
