Skip to main content

Our design calls for displaying the prices of our packages in a value proposition screen before the user has signed in. We want to avoid creating anonymous users at all costs, since this causes issues for our backend in handling RC webhooks. Unfortunately it seems like the RC SDK requires us to have configured Purchases before we can query offerings, and if the user has not signed in then configuring purchases will result in creating an anonymous user ID.

 

Is there a recommended approach to this? It seems like an unnecessary restriction to have a user ID in order to query product offerings. Shouldn’t an API key suffice?

Hey @Matt Robertson ,

 

As of now, you will need the app user ID to fetch offerings and you are correct in the thinking that configuring without an identified app user ID will cause an anonymous ID to be generated. 

 

If you dont want any anonymous ID’s, you will have to wait until the app user ID is identified in your app first, then call configure with that app user ID, also make sure you dont call logout() because calling logout() will cause an anonymous app user ID to be generated. 

 

Two recommendations that I could think of to help out here would be either creating a custom “package screen” to display to users which doesn't grab the actual packages from our SDK, but is more of a hardcoded package screen on your end. Then, once the users login, you can call configure with their app user ID that you defined early on and you can show them the real offers/real packages. Another option would be calling configure without an app user ID allowing an anonymous ID to be created, and then allowing your users to login as quickly as possible once they see the packages/want to buy them. Once this is done, based on your transfer behavior, calling login will just merge that anonymous ID to your defined app user ID so that the defined app user ID will still be the main app user ID once it has been made and merged with the anonymous. 

 

Let me know if that helps!