- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2014 09:18 AM
Hello
Creating a service catalog item called New Server Request.
From time to time a customer at one of our hospitals says:
"Hey where is that server I ask you to build?" Often as not
the customer forgot to send the email or make the request.
So we are creating a method to make the request. On the
Service Catalog item there is textbox that displays
'Delivery time' beneath 'Order this item' See gif copied below.
We would like this to go away or default to ten days.
(The purpose of the form is communicate the existence
of the request not necessarily to set a certain date for the
build completion.) But right now it says 36 days which
is somewhere between not right and stupid.
In "Defining a Service Catalog Workflow" it was found:
"Because workflows cannot calculate the end time
(not all of the activities within the workflow have defined times),
the Expected time on the workflow becomes the
Delivery Time on the catalog request."
So we set the Expected Time to the workflow to zero
(see screenshot gif below) but it stills says 36 days on the Catalog item.
Even weirder, yesterday the Delivery Time in new Catalog Items displayed 37
Today it displays 36.
Any idea on how to either eliminate or set the Delivery Time to 10 days?
Thanks.
Allen Pitts
LHP Hospital Group
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014 07:37 AM
Hello forum,
We were able to get away from the 37 day thing by
removing the value from the textbox labeled 'Schedule".
We then set the 'Expected time:' to ten days.
This got the Delivery time to '10 Days'.
Not optimum but better than 37 days.
Thanks.
Allen Pitts
LHP Hospital Group

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2018 12:12 PM
Yes removing the schedule from workflow properties, just took the expected time for me(5 days). It is including saturday sunday also. I am only looking for 8am-5pm business days. did you get that?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2015 01:27 PM
Hi Allen,
I just ran into this myself, your post helped me find the answer. If you are still working with this.. it is indeed your schedule which was affecting Delivery Time.
If you check the schedule you may find that there is a child schedule which is excluding time (for example a US Holiday) which ServiceNow is using to calculate when something can be worked on.
For mine a Blackout window was incorrectly entered instead of one day recurring every day for months. Telling sn know work will be completed until the blackout window completes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016 10:20 AM
Hi All,
Now i have an issue, My client requirement is to set the delivery time dynamically for different items. And we have achieved it through the business rule but not able to run it across business days as we couldn't specify the schedules. Any idea to skip the (Saturdays and Sundays) and to run it across specific timing?
Thanks and Regards,
Seenu Rajendiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2016 07:01 AM
I also have the requirement of setting different delivery times for different items. Would you be able to share an example of how you accomplished this via business rules? Thanks!
Will
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2016 11:16 PM
Hi Will,
Here is the code for setting different delivery times for different items. I have delivery times like (2.5 days, 3.5 days) hence i have added the days in seconds
This business rule runs "Before Insert" on requested item table:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gdt = new GlideDateTime(gs.nowDateTime());
if(current.cat_item.getDisplayValue() == 'Modify VLAN details'){
if (current.variables.lorl_gq_vlan == "1 to 5") {
gdt.addSeconds(86400);
current.due_date = gdt.getValue();
}
if (current.variables.lorl_gq_vlan == "6 to 15") {
gdt.addSeconds(172800);
current.due_date = gdt.getValue();
}
if (current.variables.lorl_gq_vlan == "More than 15") {
gdt.addSeconds(216000);
current.due_date = gdt.getValue();
}
}
if(current.cat_item.getDisplayValue() == 'Modify VLAN association'){
if (current.variables.lorl_gq_vlan == "1 to 5") {
gdt.addSeconds(86400);
current.due_date = gdt.getValue();
}
if (current.variables.lorl_gq_vlan == "6 to 15") {
gdt.addSeconds(129600);
current.due_date = gdt.getValue();
}
if (current.variables.lorl_gq_vlan == "More than 15") {
gdt.addSeconds(216000);
current.due_date = gdt.getValue();
}
}
if(current.cat_item.getDisplayValue() == 'Create one or multiple new standard LUN(s)' || current.cat_item.getDisplayValue() == 'Add disk space to one or multiple existing LUN(s)'){
if (current.variables.lorl_gq_luns == "1 to 5") {
gdt.addSeconds(129600);
current.due_date = gdt.getValue();
}
if (current.variables.lorl_gq_luns == "6 to 10") {
gdt.addSeconds(172800);
current.due_date = gdt.getValue();
}
if (current.variables.lorl_gq_luns == "11 to 20") {
gdt.addSeconds(259200);
current.due_date = gdt.getValue();
}
}
if(current.cat_item.getDisplayValue() == 'Add server to backup policy'){
gdt.addSeconds(259200);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Virtual server installation' || current.cat_item.getDisplayValue() == 'Create / Modify / Delete object' || current.cat_item.getDisplayValue() == 'Database creation / deletion'){
gdt.addSeconds(216000);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Reboot server'){
gdt.addSeconds(7200);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Install / Uninstall database software on a server'){
gdt.addSeconds(388800);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Create / Modify / Delete database users accounts'){
gdt.addSeconds(43200);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Create / Modify / Delete database users accounts'){
gdt.addSeconds(43200);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Non-standard request'){
gdt.addSeconds(432000);
current.due_date = gdt.getValue();
}
if(current.cat_item.getDisplayValue() == 'Modify CPU/RAM on server' || current.cat_item.getDisplayValue() == 'Database restoration' || current.cat_item.getDisplayValue() == 'Run database script on server' || current.cat_item.getDisplayValue() == 'Create / Modify / Delete database jobs' || current.cat_item.getDisplayValue() == 'Import / Export object' || current.cat_item.getDisplayValue() == 'Create / Modify / Delete maintenance plan'){
gdt.addSeconds(86400);
current.due_date = gdt.getValue();
}
})(current, previous);