- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2020 01:48 PM
I want to restrict the chat history shown on the bot to 2 days instead of the whole history. How to do this?
Solved! Go to Solution.
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2020 12:05 AM
Hi there,
Out-of-the-box, you only can completely disable the history, or show all.
It depends on how you added you Virtual Agent widget to your Service Portal. Through older methods like (1) dragging/dropping the widget onto a SP page, (2) embedding it to the header footer. Or (3) using the current preferred ServiceNow method of applying Agent Chat configuration.
NO need to clone and edit the widget.
The widget has a instance option "va_url_params". If you are using (1), you could just add sysparm_skip_load_history=true to the this option. If you are using (2) see my recent article on Adding instance options to directly embedded Service Portal Widgets. If you are using (3), on the Service Portal Agent Chat Configurations record, you could just add skip_load_history: true.
This will give you either no or all history.
Concerning just 2 days... you could cleanup history records or restrict them through ACL's. Though that would be customization and where changing out-of-the-box Access Controls be aware that then you will own them, this will have consequences for futher patches/upgrades. That's up to you if you want that.
What's the actual need to having 2 days of history, instead of all or no history at all?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2021 02:32 AM
Hi Sriharsha, did you get a reply on this question or figured the way to do it? I am following the same option.