POS Sync & Processing Logic

flaik logic for sales processing, assignments, additional guests, and series

Private and Group Lesson Sales Processing

The flaik system currently fetches private and group lesson sales from the POS in the frequency outlined below.

11pm to 4am local time: No processing of private or group lessons occur during the hours of 11pm to 4am local time. This is to reduce load on flaik servers and resort servers when a high volume of sales being created/changed/cancelled isn't anticipated.

There are 6 types of sale processing that occur:

  1. Lessons occurring on the current day

    • Every 10 minutes we fetch day of private and group lessons, aka for the current date.

  2. Private Lessons in the next 3 weeks

    • Every 10 minutes we fetch private lesson sales occurring 1 day in the past up to 21 days in the future.

  3. Private Lessons more than 3 weeks in the future

    • Every 60 minutes we fetch private lesson sales occurring 22 days in the future upto the end of the season.

    • They do not all fetch at once, it is staggered in groups of 45 days to give the system enough time to process the sales.

      Example; if we start processing Private Lessons on the 1st November 2024 we will have the following processing windows:

      • 1st Hour: 1st November 2024 - 16th December 2024

      • 2nd Hour: 17th December 2024 - 31st January 2025

      • 3rd Hour: 1st February 2025 - 17th March 2025

      • 4th Hour: 18th March 2025 - 2nd May 2025

      • This will continue in groups of 45 days until we hit the resort end date where we will reset back to the start of the season or the current date if the season start date is in the past.

  4. Group Lessons in next 3 days

    • Every 60 minutes we fetch group lesson sales from tomorrow and 2 days into the future.

  5. Group Lessons 3 or more days in the future

    • Every 60 minutes we fetch group lesson sales from the start of the season, or current date if the start of season is in the past, to the end of the season.

    • They do not all fetch at once, it is staggered in groups of 15 days to give the system enough time to process the sales. Example; if we start processing Group lesson on the 1st November 2024 we will have the following processing windows:

      • 1st Hour: 1st November 2024 - 16th November 2024

      • 2nd Hour: 17th November 2024 - 2nd December 2024

      • 3rd Hour: 3rd December 2024 - 18th December 2024

      • This will continue in groups of 15 days until we hit the resort end date where we will reset back to the start of the season or the current date if the season start date is in the past.

  6. Lesson Cancellations

    • 3am - 9pm

      • Every 30 minutes we perform a Delete Check and determine if lessons up to 5 days in the past to the end of the season have been cancelled

      • Local time day hours we only perform this delete check for private lessons.

    • 9pm - 3am

      • Every 30 minutes we perform a Delete Check and determine if lessons up to 5 days in the past to the end of the season have been cancelled

      • Local time night hours, we perform this check for private and group lessons.

Same day privates stopped being processed as of 8pm local time. They will be processed the following day as they fall into the range of 1 day in the past to 21 days in the future.

Assigned and Requested Instructors

Each sale fetched from the POS includes the unique identifier in the POS of the assigned instructor and requested instructor.

  • This unique identifier in the POS will check if it matches the Staff Id for an employee in the flaik system. If we can't find a matching employee profile based on the unique identifier from the POS, then the sale won't be specified with a request instructor and/or an assigned instructor in flaik.

  • Due to potential race conditions occurring when private lessons are fetched from the POS and it not reflecting a recently assigned or requested instructor in flaik, there is a 10 minute cooling off period that the request and/or assigned instructor in flaik won't be overwritten by the information fetched from the POS.

Additional Guest Logic

We outline a sale as an additional guest for a private lesson if:

  • The resort product the lesson was sold under is specified as an additional guest product in private lesson mapping, and

  • The primary lesson is already in flaik, has the same Product Order Id and is on the same day, and

  • The guest is unique, isn't the primary guest or an additional guest already specified based on the unique identifier for the guest in the POS.

Additional guests follow the sales processing sync pattern of a group lesson depending on how your resort is configured.

Private Lessons - Multi-day series logic

A series of private lessons is linked together if:

  • They have the same primary guest, and

  • They have the same flaik task, and

  • The number of days between the private lessons is less than or equal to 7 days

If a guest is booked to a 1hr private and a half day private, each with different flaik tasks, it is not considered a series. If a guest is booked on a Sunday, Wednesday, Friday Full day private - those are considered a series if they are all mapped to the same flaik task.

Programs

Programs have additional unique sales processing logic:

  • Additional processing will occur nightly between 8pm - 7am

  • Looks for any sales associated with program tasks with dates from July 1st - yesterday (Northern hemisphere) or January 1st - yesterday (Southern hemisphere)

  • Handles all new sales, cancellations, & program date changes

Note

  • This is only available on resorts on POS Integration API version 2.5.0 or higher

  • This step only looks for products mapped to a program task

Last updated

Was this helpful?