How would you approach this?

Hi there!

I’m creating a platform where gamification is the main feature. I don’t have much experience with complex conditions, do you have suggestions on how to approach this?

The system will have coins, rewards etc. Coins can be earned with achievements.
My main concern is how to make “achievements” that are customisable, and how to trigger them.

An achievement can depend on:

  • Time (e.g. Made an early morning sale, between 6am and 9am)
  • Quantity (e.g. 3rd sale of the day)
  • Amount (e.g. 1K+ Euros worth of sale)
  • Target (e.g. User reached 100% of target)
  • Day (e.g. made a sale on sunday)

Each achievement has it’s custom amount of coin rewards
Each company needs different settings for their achievements

1. After a sale, how does the server action check trough all achievement types if it should be awarded? (A company can have 100+ achievement types)

2. How can the company set up new achievement types with custom conditions?