Hey all,
Wondering what might be the best practise for this, not necessarily Wappler specific, but in general.
The two ways I can think of doing this:
- Use of a table to capture each single credit use. Then on page load that displays credit use, count over the current month time period, and subtract from a static number in the table that shows how many credits they get each month.
- Pro, I can then provide more analytics, credit use over a quarter and so on.
- Con, this table can get into the 100’s of thousands, if not millions rapidly as these credits are used in high volume - so I imagine performance will be an issue.
- 1 Table field = credit quota, renewed with a Cron each month, or renewed with the Stripe renewal workflow.
- 1 Table field = current month used quota, accumulated with the workflow when credits are used each month.
Pro - Simpler, more performant.
Con - Lost the ability to run future analytics
This is an experiential question really, so really appreciate feedback from any pro’s who done this and can provide a smarter more future proof way of doing this.
Community Page
Last updated:
Last updated: