Hi, Can the isinstock field be added as a facet? I...
# suitecommerce
c
Hi, Can the isinstock field be added as a facet? I cant see it in the list but can see it in the field set
s
No. It is a synthetic field and cannot be indexed.
I don't know the best workaround, but a couple of thoughts: 1. You should be able to create a custom field and use that as a facet. The value of that custom field could be a true/false value, which is calculated regularly based on a scheduled script. This is obviously a potential performance overhead. 2. Some sort of custom work that uses Available (aka
quantityavailable
). In my experience, this field isn't very reliable when it comes to matrix products but I've not spent enough time mucking around with it to see if I could get it to work.
👍 1
c
Thanks Steve, Yeah i have a script that is using the AggregateItemLocation to get the last quantity updated and setting a field based on that. It was just incase i was missing something out of the box