reply emails shall be copied to associated child cases and incidents.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 03:33 AM
I have a requirement that when the client replies to some cases from the email method the reply email must be copied to associated incident.
The same content email received must be copied to the incident also. Can anyone help ?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 04:09 AM
Are you using inbound actions, or inbound email flows?
You can just script or configure your flow to get your related records and update the email body to the work notes of those tasks. You can't associate the same email to multiple records, but you can just copy the content from the inbound email.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 04:25 AM
I don't think you can attach the emails to associated records. You can copy the email content to the comments in associated incidents. Pls check and make changes in the following inbound action-
(function runMailScript(email, template, table, record) {
var inc = parseIncidentNumber(email.body);
var emailBody = email.body_text; // Assuming plain text email
var incGR = new GlideRecord('incident');
if (incGR.get('number', inc)) {
incGR.comments = "Client reply:\n" + emailBody;
incGR.update();
sendEmailToIncident(incGR.sys_id, emailBody);
}
})(email, template, table, record);
function parseIncidentNumber(emailBody) {
// Logic to parse incident number from email body
// Return incident number
}
function sendEmailToIncident(incidentSysId, emailBody) {
// Logic to send email copy to associated incident
}
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 10:16 PM
This shall be done on inbound actions ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 10:32 PM