I’m using airtable as a way to keep a product catalog for my company, both out of stock, and currently available products are listed, as to help customers compare products they like but may be out of stock, against our current inventory. Is there a way to script some code to identify specific markers (Flavors, similar categories, etc.) based on user selection/input, and for airtable to automatically recommend a similar product? I’m not well versed in coding, so any assistance would be appreciated!
Out of stock product suggestion script?
Best answer by TheTimeSavingCo
Thank you @Adam_TheTimeSavingCo
I am absolutely open to automations as well if you think that route might be easier, but let me explain the best I can how I currently have my Airtable set up.
Currently I have every product that we carry (even if it’s not in stock) as our stock changes at least somewhat every few days. I have all of the products in our catalog tied to simple checkbox, to indicate whether or not I have a product on hand. I also have 9 different attributes for each product (flavor, smell, type, vendor, ect). The task my sales team has each day, is to conduct a consultation to determine which product is best for them based on those 9 different attributes.
What I imagine is that if my sales team narrows down to a product we don’t currently have on hand, could they (either through code or an automation run) select X product, and then airtable find the closest comparable item that’s in stock, and has as many similar attributes as the one selected?
Any and all suggestions would be most appreciated!
Ah, hmm. I think it’s possible to use an automation for this actually
I would:
- Create a new table called
Search Helperor something - Create a link between the
Productstable andSearch Helperand call it “Rollup” or something - Link all the records in
Productsto a single record inSearch Helper - Create a new link field between the
Productstable andSearch Helperand call it “Item to match against” - Create lookups in the
ProductsandSearch Helpertables to pull the attributes of the product we want to match against through - Use formulas to match the attributes and output the total number of matches in
Products - Use a rollup field to find the highest match number in
Search Helper - Use a lookup with a conditional based on the previous step to output the highest matching products
The workflow for the sales team would then be:
- Go to the
Search Helpertable - In the
Item to match againstlink field, select the item that’s out of stock that they want to find the next closest thing for - Look at the lookup field mentioned in step 8 above

I’ve put it together here for you to check out and you can duplicate it to see formulas, automations etc
Pros: It’s all automations, so you can make changes yourself
Cons: It’s a pretty intense setup, and involves linking all your Product records to a single record. This might slow down your base, but you generally should be fine unless you’ve got tens of thousands of products?
If you’re using the scripting extension for this, the workflow would pretty much be a button in the Products table that said “Find Matches” or something, and then you’d click it and it’d output a list of the highest matches possible
I can’t really provide much advice for this bit as it’s just code, really. Sorry about that
Pros: No set up (since you’d be paying someone to do it)
Cons: You’d be paying someone to do it heh. And if you ever needed changes you probably would need to pay someone too unless you learned JavaScript yourself
If you’d like to go down the script route, you could hire me to do it! (If you’d rather use the non-script solution I linked above instead and don’t want to set it up yourself you can hire me to do that for you too!)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
