Question

Migrating to RevenueCat, aliasing not working as expected for custom user ids

  • 9 October 2022
  • 0 replies
  • 60 views

Badge +5

Is there some reason why app provided user IDs don’t alias to one another like anonymous IDs do? (I seein the chart on this page: https://www.revenuecat.com/docs/user-ids only anonymous ids will alias, not app provided ids)

 

I want to transfer our existing billing data to RevenueCat, we give each user a user ID e.g. user1234 however this is stored locally, so if the user delete/reinstall the app they will get a new user ID e.g. user5678.

 

In order to migrate all our data and port over our iOS code I need to:

  1. Add a hook in our backend code so all new purchases are sent to RevenueCat

Once that is in production then I can:

  1. Run a script that loops through all of the records in our DB and inserts them into RC

 

When running step2 if the same user has multiple userIDs associated with them due to delete/re-install this will be fine because I will iterate from oldest to newest, so the newest userid will get all the purchases transferred to them by RC.

 

However … running step2 that calls the /receipt endpoint would mean that if a user has made a purchase and we inserted it in step1. then old records executed in step2 will grab the purchases back, because I am running the script after the latest event happened so the latest user ID will end up with no purchases.

 

If the is_restore=true option worked for app provided IDs and not just anonymous IDs then this would work.

 

I guess I can keep running the script in step2 over and over until there are no new records since the last time I ran it, which means all records are upto date, but it seems like just being able to alias app provided user ids would be easier.

 

Hopefully that makes sense.

 

 


0 replies

Be the first to reply!

Reply