From 8f1a5310d370266a516181d55eabcde90b1f4224 Mon Sep 17 00:00:00 2001 From: chaitaliKundu Date: Thu, 16 Oct 2025 07:40:03 +0530 Subject: [PATCH 1/3] README.md --- .../Inbound Actions/Reply HR TASK/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Server-Side Components/Inbound Actions/Reply HR TASK/README.md diff --git a/Server-Side Components/Inbound Actions/Reply HR TASK/README.md b/Server-Side Components/Inbound Actions/Reply HR TASK/README.md new file mode 100644 index 0000000000..365a3619c1 --- /dev/null +++ b/Server-Side Components/Inbound Actions/Reply HR TASK/README.md @@ -0,0 +1,12 @@ +#Contribution 3 + +I want to reply from sc_task(TASK) via Out look. In sc_tasK, reply information will be auto populated in "sc_task" table custom field. + +Reply Template : +Are you good to Processed ? Yes +Date : 20/10/2025 + +Those template info will be set in Custom fields(Good to Processed, Effective Date) in sc_task table . + +By reply email inbound email action. + From 56b983ebd3d12152b0ea4e55046ab9f1b3f365c6 Mon Sep 17 00:00:00 2001 From: chaitaliKundu Date: Thu, 16 Oct 2025 07:58:43 +0530 Subject: [PATCH 2/3] README.md --- .../Inbound Actions/Reply TASK/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Server-Side Components/Inbound Actions/Reply TASK/README.md diff --git a/Server-Side Components/Inbound Actions/Reply TASK/README.md b/Server-Side Components/Inbound Actions/Reply TASK/README.md new file mode 100644 index 0000000000..409f186e3c --- /dev/null +++ b/Server-Side Components/Inbound Actions/Reply TASK/README.md @@ -0,0 +1,9 @@ +#Contribution 5 + +I want to reply from sc_task(TASK) via Out look. In sc_tasK, reply information will be auto populated in "sc_task" table custom field. + +Reply Template : Are you good to Processed ? Yes Date : 20/10/2025 + +Those template info will be set in Custom fields(Good to Processed, Effective Date) in sc_task table after reply & task should be closed. + +By reply email inbound email action. From edc932ef543b151cede7b24cd47ab9ea03dcbec3 Mon Sep 17 00:00:00 2001 From: chaitaliKundu Date: Thu, 16 Oct 2025 07:59:51 +0530 Subject: [PATCH 3/3] replytask.js --- .../Inbound Actions/Reply TASK/replytask.js | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Server-Side Components/Inbound Actions/Reply TASK/replytask.js diff --git a/Server-Side Components/Inbound Actions/Reply TASK/replytask.js b/Server-Side Components/Inbound Actions/Reply TASK/replytask.js new file mode 100644 index 0000000000..e173e1f0af --- /dev/null +++ b/Server-Side Components/Inbound Actions/Reply TASK/replytask.js @@ -0,0 +1,62 @@ +//Reply Inbound Email Action +// Table - sc_task + +// Type - Reply +//Order - 100 + +// Condition - Subject - has been assigned for Satiesfiction + +//Script + +gs.include('validators'); + +if (current.getTableName() == "sc_task") { + + // Update comments on current sc_task and save it + current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text; + + + // Parse Date (YYYY-MM-DD) + var DateMatch = email.body_text.match(/Date:\s*([\d]{4}-[\d]{2}-[\d]{2})/i); + + var DateStr = DateMatch ? DateMatch[1] : null; + + // Parse "Are you good to Processed " + var process = email.body_text.match(/Are you good to Processed\?\s*:\s*(Yes|No)/i); + + var proceeStr = process ? procee.match[1].toLowerCase() : null; + + + if (DateStr) { + var gd = new GlideDate(); + gd.setValue(DateStr); + parentCaseGR.setValue('u_date', gd); // replace with your field + + } + + // Update "Are you good to Process" if found + if (proceeStr) { + + var normalizedInput = proceeStr.toLowerCase(); + + var choiceValue = null; + if (normalizedInput === 'yes') { + choiceValue = '1'; // choice value for Yes + } else if (normalizedInput === 'no') { + choiceValue = '2'; // choice value for No + } + + if (choiceValue) { + parentCaseGR.setValue('u_processed', choiceValue); + + } + } + + + + } + + current.state = 3; + current.update(); +} +