Custom “In Stock” Field – With Multiple Warehouses

I needed a facet in SuiteCommerce that showed whether an item was in stock or not. The problem: I had multiple warehouses. In order to know whether I had stock or not, I needed to sum across all warehouses. So the quantity available didn’t work in a custom item field. It threw an error. 

First… A huge “Thank You” goes out to Kwini with NetSuite support. She solved this one for me!

Here’s the solution. It was a multi-step process that included a saved search and 2 custom item fields. Yikes!!!

Here’s how it all fit together.

Start with a saved search. Only Inventory Items can have stock. So filter out the rest. They are superfluous.

Saved Search Criteria Tab

Editor’s note: We found later that if you don’t make this search public, it works for everyone. However, only the owner showed items as “In Stock”. Everyone else showed every item as “Not in Stock.”

In the results tab of the same saved search, be sure to sum the quantity available.

Saved Search Results Tab

Same saved search… In order to limit the results to just one item, you need to set the available filter to the internal ID of an item and you need to make sure you check to show the filter in the filter region.

Saved Search Available Filters Tab

This completes the saved search. Save it!

Next, you need to create a custom item field that holds the results of the aforementioned search. It is not necessary, but I marked this interim custom field as hidden. The important things to remember are that it must reference the saved search and it must be free-form text.

custitem_sum_available_inventory

And finally, I created the custom item field that I actually wanted to begin with and plan to make a facet field in SCA. It uses a formula to decide whether the item is in stock or not.

custitem_logicweb_in_stock

Hopefully, this is helpful. I know I’ll be back here reading my own blog post when I forget how to do this in the future.

Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s