Filtering of Product Catalog based on Customer fields

MontooG
Giga Expert

Hi Community,

 

Is it possible to Filter Product Offerings available in the Catalog available inside Quote based on Customer fields or Quote fields?

 

regards

Montoo Garg

4 REPLIES 4

HIROSHI SATOH
Mega Sage

I haven't done it yet, but I think it's possible to achieve this using a catalog client script.

 

Example

Assuming you want to hide a catalog item named "Premium Support" if the customer type is "Standard," here's a basic example of a catalog client script:

 

 
function onLoad() { var customerType = g_form.getValue('customer_type'); if (customerType == 'Standard') { g_form.setVisible('premium_support', false); } }
 
onLoad function: This function executes when the form loads.
  • g_form.getValue('customer_type'): This line gets the value of the "customer_type" field.
  • g_form.setVisible('premium_support', false): This line hides the catalog item named "premium_support".

Thanks, @HIROSHI SATOH for providing the solution and sample code. i am looking for configurable solution as of now.

Tom Schnarr
ServiceNow Employee

We have elibility rules that can be defined on the Product OFfering - coming in our Q3'24 store release (hitting the servicenow store tomorrow).  This is the feature to enable this filtering.

Thanks @Tom Schnarr for letting us know.