Update case status when outbound email is sent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I have a requirement in CSM.
When the case state is 'Awaiting Info' and an outbound email is triggered from the workspace by the agent then the state should automatically update to 'Open'.
Any suggestions how can this be implemented?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hey @gourabhishe
You can implement this by monitoring outbound emails created from the Case workspace.
A common approach is to create an After Insert Business Rule on the sys_email table and check:
target_table = sn_customerservice_case
email type = send-ready or sent
Then retrieve the related Case using current.instance and update the state from Awaiting Info to Open.
Table
sys_email
When
After Insert
Condition
current.type == 'send-ready' || current.type == 'sent'Script
(function executeRule(current, previous) {
if (current.target_table != 'sn_customerservice_case')
return;
var caseGr = new GlideRecord('sn_customerservice_case');
if (caseGr.get(current.instance)) {
if (caseGr.state == '<Awaiting Info value>') {
caseGr.state = '<Open value>';
caseGr.update();
}
}
})(current, previous);
You can also implement the same using Flow Designer with:
- Trigger: Record created on sys_email
- Conditions for outbound Case email
- Update Case state to Open
****************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
hey @gourabhishe
Did my previous reply answer your question?
If it was helpful, please mark it as correct ✓ and close the thread . This will help other readers find the solution more easily.
Thankyou & Regards
Vaishali Singh
Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb