The applications queue

Programs marked as “Require approval” route every submission into the queue at /loyalty/applications. Open programs auto-approve on submit; their applications still appear in the recent-decisions list for audit, but you don't need to act on them.

What approval does

  1. Looks up or creates the customer in DK using their kennitala. If DK already has a record, it's reused.
  2. Mirrors the DK customer into Stokk's customers table.
  3. Creates a pass holder row and generates a tenant-branded email with the link to add the card.
  4. Marks the application approved with the deciding user and timestamp.

What rejection does

Marks the application rejected and stores the optional reason. No DK customer is created. Rejection is terminal — to give the same person a pass later, they need to submit a new application.

Watch for duplicates

A customer can legitimately apply for multiple programs (Breeder Club + Food Club). The unique constraint is per (program, customer), not per customer. If you see two applications from the same kennitala for the same program, only one will succeed when approved — the other returns an error.