Determining the charge date for incoming transactions

Workforce Management generates premiums for each transaction record that is sent by Factory Track. Although these premiums include start and end time values, as premiums these records do not have any direct relationship with each other. Each transaction is an individual entity, unaware of any and all other transactions that may be posted on the same day. This creates a challenge when determining the charge date (work summary) onto which the premium should be placed.

For shifts that do not span midnight, the logic is simple. Each premium is placed on the charge date equal to the start date of the incoming transaction, for example:

Transaction Start Transaction End Charge Date
April 14, 2017 0900 April 14, 2017 1700 April 14, 2017
April 15, 2017 0001 April 15, 2017 0300 April 15, 2017

For shifts that do span midnight, however, this logic is not sufficient. In some cases, transactions that logically should be posted together on a single charge date end up spread across multiple charge dates. Therefore, an improved algorithm must be used.

Algorithm

The algorithm assumes that each new transaction is processed individually, one-at-a-time.

To determine the appropriate charge date for each incoming transaction, this logic is used:

  1. If the new transaction overlaps an existing transaction, the new transaction is placed on the same charge date as the existing transaction.
  2. If the new transaction is adjacent to an existing transaction, the new transaction is placed on the same charge date as the existing transaction.
  3. If no overlapping or adjacent transactions are found, the same logic used to process incoming clocks is used. In this case, the "clock" value is the start date and time of the new transaction. If a clock already exists, the Factory Track transaction is considered a labor-metric clock.

    See "Allocating ON Clock Punches (Type 1)" in the Infor Workforce Management Clock Processing Guide.