Service Catalog Service Portal. Triggering price recalculation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2018 10:16 AM
So I've been trying for a while to add a custom component to catalog items to do a quantity in service portal. Not an item quantity, an option quantity.
Our console solution was to have a lookup select box on the catalog items that pointed to a custom table that held prices we could manipulate. We would then flip that select box from the value with the price to "" and back to the value which would trigger a price re-calculation. Doing that in script does not trigger the price calculation. We've found that by doing it in a setTimeout it will but the time varies. Clearly we don't want to rely on that.
What i would REALLY like to do is to modify the catalog widget to add a record watcher for our custom price table and have that record watcher trigger a price re-calculation but I can't figure out for the life of me how to do a "calcPrice" in service portal. (It doesn't appear to be available anymore in console either in kingston)
Does anyone out there know how to trigger price recalculation in a way that works in portal? bonus points if it also works in console.
Edit: Found another person with the same basic issue, no answer: https://community.servicenow.com/community?id=community_question&sys_id=4fdacb6ddb5cdbc01dcaf3231f96197e
- Labels:
-
Service Catalog
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2018 10:22 AM
Why not just use a onChange Client script on Quantity field, which would make it much easier?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2018 10:27 AM
I need the options to have a quantity not the entire catalog item.
The use case is: 1 printer can have x number of color copies and y number of B&W copies. We want to show the price appropriately based on how many of each sub-option is selected.
There IS an on change on that field... but a text field doesn't trigger price re-calculation.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2018 10:40 AM
Then you need a price tagged to those quantity. In your choice there will be a Price field, which you can use.
For ex.
I had done similar implementation for a New Server Build Service Catalog. We used to store price in a separate table.
Based on the selection of the RAM, Disk Space etc, I was running an onChange client script and doing the price calculation in the background based on my Price table and then create a record in another custom table. with the final price.
Then associate that record as a reference variable in the Service Catalog. That reference variable should have the Pricing Implication checkbox checked.
This is a solution I could think of. You may write a Javascript in your widget if you want to use widget only, but then all the other service catalog will also have to use the same widget.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2018 10:45 AM
wait "has pricing implications" what does that mean? We've got what i think is the same setup you describe but we've only used "lookup select boxes" with the prices specified there.
(I'll dig some more on that)