Predict PI result as a message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 12:18 PM
Hi Everyone,
I have a requirement where -
When a agent creates a new incident ticket the prediction result should display as a message instead of auto populating the assignment group.
As a agent i want whenever i select a CI in CI field and enter short description and description it should show the prediction result as a message "The predicted assignment group for the CI is XYZ group"
Please let me know how to achieve this requirement. Also this is a valid requirement or not.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 05:22 PM
Hi @arpita roy, can you explain why it is a requirement to suggest an assignment group instead of auto-populating it?
To actually build this, you would need to have some kind of trigger to run the prediction. There are a couple ways you could accomplish this.
You could add something like an onChange client script (probably a couple) that can trigger an AJAX call to return the predicted assignment group and present it in either a field message, or as a form message.
Or, you could create a new UI Action called "Predict Assignment Group" that when clicked it gets the prediction result and returns it in a field message or form message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 02:55 AM
Hi Prinssi,
Thank you for your response. I want to write a Business Rule where variable will be stored in scratchpad and then want to use the on load client script to populate the field message. can you help me with that ? currently i have below BR -
How to store the predicted value and use it further in CS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 08:02 PM
Hi @arpita roy,
I assume you are using a Display Business Rule? It looks like you are most of the way there.
The scratchpad is an object. To store something in scratchpad, it is as simple as setting a value in any other object:
g_scratchpad.predictedAssignmentGroup = predictionValue;
From there, you would be able to call the scratchpad value from the CS:
g_form.addInfoMessage("The predicted group is: " + g_scratchpad.predictedAssignmentGroup);
I found a great Community article, and a YouTube video that give similar examples of using scratchpad.