Mandatory Rule Base in Order Guides
A common request on the community is the ability to make an item on an order guide mandatory so end users are unable to toggle it off. I'm surprised ServiceNow still hasn't included this as a capability and I do hope, with the new UI around the corner, that it's introduced.
For now, I've made a small customisation that can be applied to an instance without too much effort! The below Developer Share will allow you to set a rule base on an order guide as mandatory.
How do I make an item Mandatory?
On the order guide, you'll have rules setup which will define when an order guide should show a particular catalog item. This update set will add a checkbox to the form which, when checked, will make the toggle read-only in the service portal widget.
So, how does it work?
The SC Order Guide widget has been cloned and the server-side script updated to lookup the rule base to determine whether the item is mandatory or not. There is then an ng-disabled directive added to the toggle element which will disable the ability to toggle the inclusion of the item if a rule base is found.
To make this update set as seamless as possible, a new service portal page has been created (order_guide) with a route map setup to redirect any requests to sc_cat_item_guide (the OOB order guide page) to the customised widget.
This doesn't work for my portal?
The route map has only been configured for the default "sp" service portal. If you would like this to run for your custom portal, modify the sp_page_route_map entry and include your portal in the list.
If you found this helpful, I'd appreciate a thumbs up and subscribe to this article for future updates!
https://www.servicenow.com/community/itsm-articles/mandatory-rule-base-in-order-guides/ta-p/2304911