Skip to main content
Question

Migrating from glassfy


Show first post
This post has been closed for comments

39 replies

Forum|alt.badge.img+5

@MarcosC if you’re still offering a look-over, I’d love to take you up on it. How do I get you my account details?


Forum|alt.badge.img+5
  • Author
  • Active Member
  • 13 replies
  • August 20, 2024

Though things feel a bit disjointed and like you have to jump all around, and the code samples are really lacking in how to actually interpret the data, I managed to get both my apps converted over. 


Forum|alt.badge.img+5
  • Author
  • Active Member
  • 13 replies
  • August 20, 2024
potatocat666 wrote:

@MarcosC if you’re still offering a look-over, I’d love to take you up on it. How do I get you my account details?

if you have a lot of receipts, definitely see if they will import.  It took hours and hours to do 12,000 receipts here, it seemed to rate limit to about 2 seconds per receipt.  I had a network failure at some point about 4,500 in.  I then amended my import script to take a --start-index param to resume.

This version has --start-index as an optional param: https://gist.github.com/foerster/9b2b93b571791d9293c78747f1c2cee7


Forum|alt.badge.img+5

@snapdown you rock -- thank you for sharing.

The export I got from Glassfy had slightly different columns, so it required a few edits, but the script worked well!

What sucks has nothing to do w/ the script, but the export Glassfy gave me -- I have custom user ids as well as anonymous users for when they purchase without login, and Glassfy unfortunately did not export the anonymous app_user_ids (the “Subscriber ID” they use in their system) and left them as blank.

Which meant a lot of data was skipped on import because blank ids are understandably not allowed.

I’m not sure what the best practice is here to be honest, or whether I was never supposed to have both anonymous and custom IDs at the same time. 😞


Forum|alt.badge.img+2

I have the same issue with the Glassfy export csv file.
The  app_user_id (e.g. “Subscriber ID”) field is empty.
I’m not sure how to handle the import in Revenuecat.


MarcosC
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 167 replies
  • August 20, 2024

>if you’re still offering a look-over, I’d love to take you up on it. How do I get you my account details?

I’ve checked your app and at a first glance, all looks good. I see both android and apple apps configured, both with notifications configured and we are getting them and I can see production purchases.

 

> I’m not sure what the best practice is here to be honest, or whether I was never supposed to have both anonymous and custom IDs at the same time. 

You can create an anonymous ID for those users and import them. When those users open their app, they could restore purchases which should merge both accounts

 

If you want anything in particular you want me to review, send me a DM 


MarcosC
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 167 replies
  • August 20, 2024

Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • August 21, 2024
MarcosC wrote:

> I’m not sure what the best practice is here to be honest, or whether I was never supposed to have both anonymous and custom IDs at the same time. 

You can create an anonymous ID for those users and import them. When those users open their app, they could restore purchases which should merge both accounts

 

Hi, what would be the difference between importing from Glassfy and then the user still needing to restore purchases, and the user just restoring their purchases?

I also need to migrate from Glassfy to RevenueCat and also got an export from Glassfy without any user id:s.. wondering if I should use that or syncPurchases..

What would be the best way to only run syncPurchases once? Saving the syncPurchases run in local storage? But then it would be run again if the user re-installs the app (or maybe that wouldn’t be a big issue?)..

Thanks!


MarcosC
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 167 replies
  • August 21, 2024

> Hi, what would be the difference between importing from Glassfy and then the user still needing to restore purchases, and the user just restoring their purchases?

The only difference is that if that user never opens the app, you won’t have that data and that the user would need to restore (unless you force a sync purchase)

 

>What would be the best way to only run syncPurchases once? Saving the syncPurchases run in local storage? But then it would be run again if the user re-installs the app (or maybe that wouldn’t be a big issue?)..

As long as you don’t call it on every launch, it should be fine. You can also force a sync only if the user does not have a purchases


Forum|alt.badge.img+5
  • Author
  • Active Member
  • 13 replies
  • August 21, 2024
trabdin wrote:
MarcosC wrote:

> I’m not sure what the best practice is here to be honest, or whether I was never supposed to have both anonymous and custom IDs at the same time. 

You can create an anonymous ID for those users and import them. When those users open their app, they could restore purchases which should merge both accounts

 

Hi, what would be the difference between importing from Glassfy and then the user still needing to restore purchases, and the user just restoring their purchases?

I also need to migrate from Glassfy to RevenueCat and also got an export from Glassfy without any user id:s.. wondering if I should use that or syncPurchases..

What would be the best way to only run syncPurchases once? Saving the syncPurchases run in local storage? But then it would be run again if the user re-installs the app (or maybe that wouldn’t be a big issue?)..

Thanks!

I don’t have real answers as I’m navigating this as well.

I load a didSyncPurchases flag from my storage, defaults to false.  If they did not sync yet, I call syncPurchases once per user in the app and then save the didSyncPurchases to storage locally so the next time it doesn’t sync again.


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • August 21, 2024

Thanks for the answers, I just tried syncPurchases (with the capacitor library)..

So I first call configure(), then syncPurchases() if I haven’t already done it in a previous app init, and then getCustomerInfo() to check if the user has an active subscription for a specific entitlement.

But I noticed that when I call syncPurchases() and then getCustomerInfo(), it doesn’t return that the entitlement is active, but it does so the next time I open the app and getCustomerInfo() is called..

Is it possible for the getCustomerInfo() to return that the entitlement is active directly after running syncPurchases()? Or do I need to do something else in between? I noticed that syncPurchases() should return a CustomerInfo object but it doesn’t for the capacitor library?


Forum|alt.badge.img+5
  • Author
  • Active Member
  • 13 replies
  • August 21, 2024

This is what I have.  I have people upgraded and using it, haven’t heard any issues -- I think it all worked seamlessly.

I have a customer info update listener -- maybe you need this?

 

      await Purchases.setLogLevel({ level: LOG_LEVEL.DEBUG }); // Enable to get debug logs
      await Purchases.configure({
        apiKey: this.getRevenueCatKey(),
      });

      const hasSynced = await this.storage.getPref('RC_PURCHASES_SYNCED');
      if (!hasSynced) {
        await Purchases.syncPurchases();
        await this.storage.setPref('RC_PURCHASES_SYNCED', 'true');
        console.log('RevenueCat purchases synced');
      }

      await this.getRcOfferings();

      const ci = await Purchases.getCustomerInfo();
      this.handleRcPermissions(ci.customerInfo);

      await Purchases.addCustomerInfoUpdateListener((customerInfo) => {
        // console.log('customerInfoUpdateListener', customerInfo);
        this.handleRcPermissions(customerInfo);
      });

 


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • August 21, 2024
snapdown wrote:

This is what I have.  I have people upgraded and using it, haven’t heard any issues -- I think it all worked seamlessly.

I have a customer info update listener -- maybe you need this?

 

      await Purchases.setLogLevel({ level: LOG_LEVEL.DEBUG }); // Enable to get debug logs
      await Purchases.configure({
        apiKey: this.getRevenueCatKey(),
      });

      const hasSynced = await this.storage.getPref('RC_PURCHASES_SYNCED');
      if (!hasSynced) {
        await Purchases.syncPurchases();
        await this.storage.setPref('RC_PURCHASES_SYNCED', 'true');
        console.log('RevenueCat purchases synced');
      }

      await this.getRcOfferings();

      const ci = await Purchases.getCustomerInfo();
      this.handleRcPermissions(ci.customerInfo);

      await Purchases.addCustomerInfoUpdateListener((customerInfo) => {
        // console.log('customerInfoUpdateListener', customerInfo);
        this.handleRcPermissions(customerInfo);
      });

 

Thanks, that did it. I thought CustomerInfo would already be updated if waiting for the syncPurchases function to resolve, but it looks like it takes a little time after syncPurchases for CustomerInfo to be updated.


Forum|alt.badge.img+5
  • Author
  • Active Member
  • 13 replies
  • August 21, 2024

@trabdin great, glad it worked!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings