Building a customer loyalty app; looking for collections advice

Hey guys!

First time posting here! I’ve already learned so much from this forum and really appreciate everyone’s contributions. I’m looking for advice on collection relationships (I think). I’m not very savvy with programming and only just started building with Adalo a couple weeks ago, but I’ll try to be concise.

The application I’m building is a loyalty app for multiple local businesses. I would like to be able to award points to users for each local business based on a QR code scan (I’ll also be utilizing Google Vision for OCR to collect receipt information to calculate the number of points awarded, but that’s for another post). I’m confused about how to set up the proper collections/relationships to save the points awarded from a particular local business to a particular user. I’ve figured out how to create a collection and update points for each local business, but I need to be able to update the local businesses of the user, not the local business itself.

I hope this makes sense to someone. Any ideas on how to set this up are greatly appreciated!

1 Like

Hi @wyttgrvs ,

Welcome to the forum, first post is most likely always heavy.

My general advice is you play around with spreadsheet first and think about leveling, which one is parent, which one is the child.

For QR and OCR, it is better to think about it after finishing the core functions first, even though those 2 features are the ones are critical factors for you to decide to take this journey.

To make a fire started, for your loyalty app to work, the app need customer collection and for considered loyal, the customer need to purchase something, and the more purchased items or value, the more loyal they become which is represented by points.

So in the above sentences, you have at least 3 collections, customer, transaction and master point collections and inside it you can try to imagine what information that you want to fill in.

This process can be exciting if you persist, and need lots of thinking time at the beginning, once you have done that, it is smooth sailing. :grinning:

Hey @Yongki

Thanks so much for your response. I really appreciate your insight and recommendations. Each time I’ve run into a snag in my build, thinking and researching things that I might be able to rework and apply to my own work has helped a ton. Concerning the number of collections, I was working with the user collection and attempting to connect it to a master points collection. I continue to hit a wall when it comes to connecting these to the local business, but I’m sure I’ll sort it out eventually. (I’m almost certain there’s a relationship between collections that I’m overlooking or overthinking, but we’ll see)

Thank you again! I’ll keep this thread updated. Hopefully my experience can help someone else once I have this figured out.

1 Like

Hi Wyatt,

Welcome to the Adalo Community! :partying_face:

Adding onto the Google Vision OCR, there is actually help documentation on how to do it via Integromat.

https://help.adalo.com/integrations/integromat/use-google-vision-to-ocr-an-image-and-store-the-text-results-in-an-adalo-record

1 Like

James!

That’s stellar! I glanced at that documentation briefly and thought it would come in handy, but now I know it definitely will!

I was wondering if you had any insight into the problem I described above. I’ve gotten to the point where I can create a row in my Master Points collection with a button click (updating the name and associated local business and user), then update the number of points in the row based on how many times the user goes through the update screen.

The issue I’m running into now is sort of odd… The Create/Update actions are accessed after clicking through from a list of local businesses. When I click local business A, I can create then update the points for that local business. I’ll go back to the list and click through local business A again to make sure it doesn’t create another instance of that Master Point and just updates the points. It works. Then I click through local business B to move through the same process. BUT, when I go back to local business A, it continues updating local business B! I have no clue what I’m missing. I think it’s something do with the relationships I’ve set up, but I have no clue. Something with the local business relationship? I’m so lost…

Any help would be appreciated, but I understand if it’s too complicated to sort out without actually having your hands on it.

Thanks!

Just for reference, I’ve sort of listed things out logically. Again, any help is greatly appreciated. Thanks!

COLLECTIONS

  • Local Business
    • Users
      • Master Points

RELATIONSHIPS

  • A Local Business can have multiple Users

  • A User can have multiple Local Businesses

  • A User can have multiple Master Points

  • A Master Point can have one User

  • A Master Point can have one Local Business

  • A Local Business can have multiple Master Points

SCREENS

  • Screen 1
    • List of Local Businesses
  • Screen 2
    • Create Master Point
  • Screen 3
    • Update Master Point
  • Screen 4
    • Display Master Point points
    • Return to List

ISSUE

When I click through to update the Master Point of a Local Business that has already been created, the most recently created Master Point gets updated instead of the Master Point for the selected Local Business.

Hello wyttgrvs,
Could you celarly elaborate your above statement?
Wish you success on this journey.

Hi @Omni

I didn’t do a very good job of explaining the issue in my initial posts. I meant that I need to update the Master Points of the Logged In User of the Current Local Business. It seems like the Current Master Point being updated is stuck on the most recently created Master Point.

Any thoughts are great appreciated!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.