Agent Assist Dynamic Filtering Conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 05:52 AM
Greetings fellow developers. 👋
After reading through a number of SNOW Product Docs (e.g., Set up a dynamic filter for Agent assist Set up Agent Assist) as well as a post from a Daniel R2 (How to add a dynamic filter on agent assist to display knowledge articles from specific categories), I realized that there were no online resources that matched my use case requirements.
In a nutshell:
- Filter Agent Assist knowledge articles only applicable to Service Desk Agents' job responsibility
- List of applicable Knowledge Bases were provided that support our Service Desk Agents
- List of applicable groups that align with the Service Desk team provided
- Incident, Problem, Change, Interaction short description key words match on respective filtered knowledge article's Article Body
Using the "Script" option under the "Filter Configuration" of the existing out-of-the-box "Contextual Search" -> "Table Configuration" ("Agent Assist [kb_knowledge]") in comparison with what I found online, this is what I produced (where gs.property "service_desk_agent_assist" contains a list of Knowledge Bases' sys_ids):
(function(current, query_table){
/**
* current: A GlideRecord representing the Form or Record producer
* query_table: The table to compare value on
*
* Use the standard query features of GlideRecord to add conditions to query_table.
* Current prepresents the current values on the user's form or record producer that
* can be used to add live conditions to the query.
*
* E.g. query_table.addQuery("active", current.active);
*
* The return value should always be the encoded query, usually query_table.getEncodeQuery()
*/
var sysIDs = gs.getProperty('service_desk_agent_assist');
query_table.addActiveQuery();
query_table.addQuery('kb_knowledge_base.sys_id', 'IN', sysIDs);
query_table.addQuery('short_description', 'LIKE', current.short_description);
// Return the encoded query
return query_table.getEncodedQuery();
})(current, query_table);
The result:
May someone in this community be able to assist in coming up with a solution to this real-life use case requirement?
Thank you, in advance, to any and all who can help.
- Matt