Create an SLA based off a variable date entered after request creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 07:40 AM
I am trying to find a way to create a custom SLA based off of the field my resource fills in after checking with the person who requested the work.
Scenario:
Our Servers team is requested to build a specific server setup for a project coming. It will not be accomplished within our normal base SLA.
The resource follows up with the person who requested the work, they agree on a delivery date. I want the resource to be able to go back to the request, change the "Agreed Date" variable and that trigger a new SLA based off of the date selected.
I've created the SLA definition in my dev environment and the business rule with my script.
But I feel I am missing something in connecting them and triggering the SLA change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 07:50 AM
Hello @nhenderson
Instead of start condition as state is not open , give it "State IS-ONE-OF"
You haven't given any pause and stop conditions ? Not giving pause is fine but stop ?
Please make these minor changes and let me know the updates.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 08:08 AM
so you want SLA to start when the Agreed date reaches?
Consider SC Task created on today and Agreed date is 5th March.
If yes then did you try giving this in Start Condition. See if that works
variables -> Agreed Date [ON] Today
OR
If the above doesn't work then try this
1. Create a custom Date field on the sc_task table.
2. Create a before insert business rule that sets the Date field to date with the Agreed date.
BR will run only when it's for your catalog item
current.request_item.cat_item.name == 'Your Item Name'
Script:
var ritm = current.request_item.getRefRecord();
current.u_my_field = new GlideDateTime(ritm.variables.u_agreed_date).getDate;
3. In your SLA start condition add this My Field [ON] Today
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader