Field Set and Facet Performance Tips

Performance is a key factor in ensuring your shoppers stayed engaged and convert browsing into purchases. As many ecommerce blogs and professionals will tell you: the slower your site is, the lower your conversions will be.

You may be aware that we have a section on performance on this site, but there are so many aspects of performance, including NetSuite-specific, that you may not be aware of.

In order to find out more about them, I asked Senior Developer at NetSuite, Pablo Zignani for more information about how to optimize field sets and facet fields to improve performance and here's what he said.

Remind us, what are field sets and facets?

Field sets are things you define in the backend that determine what item data is exposed to the frontend. You use them, for example, on a product detail page to pull in information about the product the shopper is looking at. Facets are used on searches to filter the results and include things like price, availability and color.

So how can they affect performance?

Some fields are heavier than others. For example, stock fields such as quantityavailable and quantityavailable_detail request live stock data. Therefore, if you use these fields on a long list of products, it becomes an intensive operation and performance will take a hit. You may add them on the details field set but you should avoid using them if you're not using them to show the stock counts. If you just want to show whether something is in stock or not (i.e., a boolean value), you can just use the instock field instead.

We include quantityavailable in the Minimum Setup Requirements but you could configure your site differently.

When creating a fieldset, what advice can you give people?

The best advice is to keep your field sets trimmed to minimum required. For field sets used for lists, you are requesting the same information for multiple items — this builds up. You can get away with it, to some extent, on details field sets, but you have to be careful.

For example, the Order field set is a very important, standard field set used by the shopping cart. If you modify it and add in additional fields, you can impact the add to cart action and the response time when you request its contents.

Merchandising zones should never use expensive field sets like details, try the search or order field sets instead.

What about facets?

Think about how useful the facet is that you're adding. A facet that has a lot of unique options isn't very useful. For example, a facet that generates a list of SKUs or unique IDs isn't going to help a shopper drill down their search results. Also keep in mind that we don't allow a site to have more than 40 facets — once you go beyond that, you get noticeable performance problems, which is why we locked it down.

You mentioned the quantityavailable and quantityavailable_detail fields as potential troublemakers, are there other fields to watch out for?

There are a few:

  • correlateditems_detail, relateditems_detail are two fields that shouldn't be used in the search, details, order or typeahead field sets. They have very specific uses and shouldn't be used in more general circumstances.
  • matrixchilditems_detail is expensive and should be used sparingly. It generates the details of all of the child products under a parent product, and shouldn't be used in the search or typeahead. It may be used in the order field set, but if performance suffers that you might want to consider removing it.
  • itemoptions_detail is also an expensive field. As it potentially brings in huge amounts of data, be sure to check the values property of each item option that is a list as you could end up including far too much data. Finally, if your search results are slow, consider whether you need it in your search field set.

What do you mean by 'expensive'?

It's a way of talking about an application's ability to perform specific operations and return the results to the user in a timely manner. If you think about, say, generating a list of items as having a 'cost' then it should make you stop and think about whether that cost is worth it, or whether it's too much. When you only have a limited amount of 'money' to spend, as it were, then you need to be careful with what you choose. Too many expensive choices and you'll lose your shopper's attention and they'll take their business (and their actual money) elsewhere.

OK, thanks for catching up with me.


Further Reading