InnerWeb
Skip to main content

Event time in the KD webhook: delays and bulk sending

The integration with the KD system is built on events sent in real time, with the reader event time, the direction and the event identifier. As long as the line works, the reader time and the sending time almost coincide. After a line outage, the KD system often sends buffered swipes in bulk, so the rules of sending are worth agreeing with the vendor. Below are notes for the IT team.

2,000
swipes per working day at a large plant, the scale of a batch after an outage
4
points to agree with the KD vendor for sending after an outage
Source: integration specification

Requirement: the reader event time

The integration specification assumes that the KD system sends every card swipe in real time, with the reader event time, the direction (entry or exit) and the event identifier attached. InnerWeb receives them through an authenticated webhook. The rules for pairing entries and exits and for rejecting duplicates are set in the specification together with the KD vendor, not assumed in advance.

The practical reason is simple: a swipe made at 5:58 should carry 5:58 in the record, even if it arrived at 6:20. For the training alert the difference usually does not matter, but for working time records and the evacuation list it does, which is why the reader time is the basis of every event.

Scenario: a line outage and bulk sending

After a line outage, the KD system often buffers events and sends them in one run once the connection is restored. For the receiver this looks like a sudden rise in traffic. In a plant with many staffing agencies the volume can exceed 2,000 swipes per working day, so a batch after an outage can be large.

Two requirements for the specification follow from this scenario. First, each event carries its own reader time and identifier, so that a batch of buffered swipes keeps the correct order. Second, the rules for rejecting duplicates have to be described so that two genuine swipes by one person, sent one after another in a batch, are not mistaken for a repeated scan. The exact rules are agreed with the KD vendor.

Example calculation: swipes sent within an hour after an outage

Example calculation: swipes sent within an hour after an outageLine chart: normally 25 swipes per quarter hour; after a three-hour outage, the KD system sends 250 swipes at once in the first quarter hour.050100150200250swipes0-15 min15-30 min30-45 min45-60 minNo outage (0-15 min): 25 swipes25No outage (15-30 min): 25 swipes25No outage (30-45 min): 25 swipes25No outage (45-60 min): 25 swipes25After a 3 h outage (bulk sending) (0-15 min): 250 swipes250After a 3 h outage (bulk sending) (15-30 min): 25 swipes25After a 3 h outage (bulk sending) (30-45 min): 25 swipes25After a 3 h outage (bulk sending) (45-60 min): 25 swipes25
  • No outage
  • After a 3 h outage (bulk sending)
Source: Example calculation: illustrative assumption of 100 swipes per hour during the day and 3 hours buffered ( gives a daily scale above 2,000).

What to agree with the KD vendor

These points are worth recording in the integration specification and in the acceptance protocol. The aim is for it to be clear on the KD side how the sending behaves in an emergency.

The first question concerns order: are the events sent after an outage in time order, from the oldest. The second concerns pace: is the bulk sending spread over time so as not to overload the receiver. The third concerns retries: how the KD system reacts to a rejected submission, for example after the token has been renewed. The fourth concerns reporting: whether KD gives the number of events sent after an outage.

  • sending after an outage from the oldest event
  • spreading the bulk sending over time
  • retrying rejected submissions after the token is renewed
  • a report from KD on the number of events sent after an outage

A token with a limited validity period

The integration authenticates with a token of limited validity, renewed automatically. If the outage lasted a long time, the token used before the break may have expired, and after the connection is restored the first submissions will be rejected until the token is renewed. A good integration logs in again and repeats the rejected submissions, while a poor one drops them without a trace.

That is why the acceptance test should simulate a token expiry during a batch send, and check whether the number of submissions on the KD side matches the number of swipes accepted in InnerWeb.

How to reconcile the numbers after an outage

After every outage the IT team compares two numbers: the swipes recorded in KD during the outage window and the swipes accepted in InnerWeb after it ended. The difference points to submissions lost or rejected as duplicates. A zero difference also has to be confirmed, because silence is not proof of health.

People whose swipes arrived late may have exceptions in their working time records. The exception queue in mRCP lets them be corrected and closed, and a reminder call about an unscanned exit fills the remaining gap.

Recommendation: the specification as the basis

If delays are frequent at the plant, it is worth recording real-time sending as the overriding requirement in the specification with the KD vendor, and the reader event time, the direction and the event identifier as mandatory fields of every submission. Such a specification is part of the integration design and the basis of the acceptance test.

Video

Frequently asked questions

What data should a swipe submission from KD contain?

The reader event time, the direction (entry or exit) and the event identifier. The submission reaches InnerWeb through an authenticated webhook.

What happens to swipes after a line outage?

The KD system sends buffered events once connectivity returns, preferably from the oldest, each with its own reader time. It is worth comparing the number of swipes in KD and in InnerWeb.

Who sets the rules for pairing entries and exits and for duplicates?

These rules are set in the integration specification together with the KD vendor. This way bulk sending after an outage does not confuse two genuine swipes with a repeated scan.

Want to test sending after an outage?

Book a call with the InnerWeb team. We will prepare a test scenario for bulk sending and token renewal for your KD vendor.

Let's talk