Claim rewards each day for 7 days in a row then reset to day 1

Hey everyone!

I’m building an app with “Diamond” rewards. The function is to claim a database amount of diamonds each day.

I have a database with 7 days of rewards & different amount of diamonds each day. When you claim day 1’s diamonds, you have to wait 24 hours till you can claim day 2’s diamonds. If you miss a day, you start over at day 1. On day 7, it will restart at day 1 again. You can spend the users diamonds on different rewards after claiming.

This is the database

Do you guys know how to build this up with both database & backend?

There is a button beneath to claim current days diamonds.

Spend diamonds

Hope you understand!


1 Like


So you can best do this with scheduling workflows. When the user clicks a button they get their diamonds, then it schedules in 24 hours to reset the timer to day 0.

If the user clicks the diamonds again whenever you want cancel that scheduled workflow, and make a new one.

As for how much diamonds they get per day, you could do it in the database like you’ve set up, or there are a bunch of other ways. So I don’t have much input for you there unless you run into issues.

Edit: just might want to have that reset timer be 48 hours, because they can’t click it again for 24 hours… :grinning:

1 Like

Thanks you!
That gives me a little bit more to think about :slight_smile:
I’ll try to figure it out