Sentiment Analysis not working on Updated Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2024 05:23 AM
Hi,
We have recently configured Sentiment Analysis for one of our customers and it is working when a new Case is created, but the Sentiments does not gets updated when Comments are added on Cases.
Do you have any tips what could be missing?
Regards
Richa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2024 11:02 AM
Hi @Richa2, we were facing the same issue.
The issue was within the 'Task Intelligence Sentiment Case Update' flow.
On line 3 it completes a check if user has role Consumer/Customer, and this flow variable can be found on line 1 within the script it checks if the user has the consumer or the customer role and not the admin role. We edited the 'Role is Consumer/Contact' script within line 1, adding the role of our end users. Once we did this sentiment analysis worked as expected when cases were updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2024 12:04 PM
Hi @Daniel R2 !
Thankyou for your response!
I looked in the flow as suggested by you. I see the following Script for the variable:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2024 02:03 PM
Our users actually just have the snc_internal role, so we added that to the script, and it worked as expected, the sentiment fields were updating based on end user input. We will most likely make an additional adjustment below to ensure users do not have an agent role. But yeah the below worked for us.
return (gs.hasRole('sn_customerservice.customer') || gs.hasRole('sn_customerservice.consumer') || gs.hasRole('snc_internal')) && !gs.hasRole('admin');
hmm I would expect if your users do have the 'sn_customerservice.customer' role then it should work as expected and you dont need to change anything, but could be worth a try adding snc_external for testing purposes.
An issue we were also facing when setting up sentiment analysis was cross scope errors on the restricted caller access privilege table (sys_restricted_caller_access). It was causing issues with sentiment analysis on case creation but didn't face this issue on case updating, but may still be worth checking if you have any cross scope errors which needed to be accepted?
If neither of the above work, I'm out of ideas unfortunately. But I guess it will be something in the flow if that script is returning false there.