Solved

How to get a list of subscription events within a given period of time?

  • 30 September 2021
  • 3 replies
  • 197 views

Badge +5

Hey all! I’m researching different ways to do our next feature and I have some doubts about if RevenueCat can handle the following use case: 

We want to build a cashback feature with certain rules based on the app usage of the user in a given period of time. To be able to do that we need to know all the payments received in a given period of time to be able to calculate the amount of money to cashback and to whom.

Is there a way to easily do that with RevenueCat? 

An example flow that might be enough: 

Every first of the month, we can download a .csv file with a list of events occurred in a given period (past month) including: 

userId - amount ($) - event (renewal/initial_purchase) - timestamp - duration (monthly, annual) - productId
 

icon

Best answer by sharif 1 October 2021, 23:01

View original

3 replies

Userlevel 5
Badge +9

You can use our ETL export feature to get a daily CSV file in your AWS bucket/GCP Storage containing all of your app’s transaction data. You’d be able to query the CSV file (you can import it into BigQuery or any other database) for every transaction a user made and be able to calculate the sum of their payments. Let me know if you have any other questions!

Badge +3

@sharif  If I set this up today, will I only be able to get data from today onward? Or will I have access to my previous data as well?

@Michael Jajou in the RevenueCat config for the data export, you can choose to send incremental updates or the whole lot every time - in either case, it’ll do the latter for the first export it does

Reply