Connecting Random String To Use for Registering Points

Hi there,
I am creating an app that will have business accounts and users that can access and “follow” each business. Users can follow any of the businesses. The businesses can send users codes which they can register to convert into points.

I want to enable a shorter ID for each business which can be included in this code, say around 4 or 6 characters. I want the business to also subcategorize the points, so each category too could have an ID of say 4 characters. The code itself (again 4 characters) would have a specific value, given to it by the business. The idea is that when the user registers that 12-14 character code, the points would be associated with the business they are following, registered against that business and sub category.

My problem is understanding how to group three random strings into one and then making sense of it at the other end, through one input? If that makes sense? Can it be done? How? Are there any examples maybe?

Ah!! Or the other way, - would I just generate one unique code for that point, that cannot exist anywhere else, so that when the user registers that code, the point value goes to the user and the registration is logged for that user for the specific Business/Campaign?

The key point here is that a user will have separate points for different businesses that they are following all accessible from their account.

A huge thanks in advance if anyone can point me on the right path here. Thanks.

I recently needed to learn about “product keys” for keeping track of products in the database. From what I took away from it, a product SKU is created by taking the different keys and combining them.

For example Large Red T-shirt may have an SKU of LRG_R_TS with a key of LRG for large, R for Red and TS for T-shirt.

In your database you would need a data type for business and a data field for KEY…this could be accomplished in various ways, but up to you what makes sense to keep track ( ie: could be random letters and numbers or the first 3 letters of the business name ).

Then for each user you could have a key

Then for each type of point category have a key as well.

The datatype of code would then have a SKU ( or whatever you want to call it ) that combines the keys from the business name, user and point category to create the “random” string for that particular code.

You can make use of this set up the way I have as well if you want to track product images. I recently used the croppie plugin to create an image uploader that allows me to change the file name…I use the product SKU for the image file name…I also added in the database the alt text for the image and used the keys to generate this alt text for each product as well as the “view” ( I have back, front, top etc. views ).

You can also use this to analyze data by referencing components of SKUs ( ie: SKU contains this businesses key to find all codes sent out by a specific business )

Hey Boston85719, that definitely sounds interesting. I’ll definitely look into this and it sounds like a great angle to look at this from because I do, eventually, want to add some kind of monetary value to some elements so this could very well work a treat.

Thank you for the response and thank you for putting a different angle on my problem. It sounds like it could be a winner!!!