Skip to main content
Solved

Can I get originalAppUserId even before the user has subscribed?

  • 15 August 2024
  • 1 reply
  • 14 views

Hi,

The “Checking Subscription Status” page in the documentation says “It's important to note that CustomerInfo will be empty if no purchases have been made and no transactions have been synced. This means that entitlements may not exist in CustomerInfo even if they have been set up in the RevenueCat dashboard.

“originalAppUserId” is on CustomerInfo, and I’m using “originalAppUserId” to identify customers who want to remain anonymous before they purchase a subscription (I use “originalAppUserId” as the key to store data in Firebase which they will need to have access to before and after subscribing). Will this property be empty too?

  • If it is, is “originalAppUserId” available anywhere else prior to CustomerInfo being created, or can I force the creation of CustomerInfo (by calling syncPurchases for example)?
  • Failing that, am I safe to assume that where “originalAppUserId” isn’t available I can use “appUserID” and assume that will become the “originalAppUserId” once the user has subscribed? (I guess not since I assume this may get aliased even prior to a purchase?).

Help much appreciated!

Hey There,

 

The original app user ID field will be available and in your case this will just be the anonymous app user ID that was made for this user when the app first configured. When calling customerInfo, if no purchases have been made you will not see any purchases/entitlements, but will still be able to call this and gather the app user ID. If purchases have been made, you will see this in the object as well. 

 

I recommend looking into our guide on identifying users which can be found here: https://www.revenuecat.com/docs/customers/user-ids

 

Let me know if that helps and if you have any other questions!