diff --git a/Server-Side Components/Inbound Actions/Create Problem from Email/InboundScript.js b/Server-Side Components/Inbound Actions/Create Problem from Email/InboundScript.js new file mode 100644 index 0000000000..69ce2e0509 --- /dev/null +++ b/Server-Side Components/Inbound Actions/Create Problem from Email/InboundScript.js @@ -0,0 +1,21 @@ +(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) { + // Create Problem + var pro = new GlideRecord('problem'); + pro.initialize(); + pro.short_description = email.subject || "No Subject"; + pro.description = email.body_text || "No Description Provided"; + pro.caller_id = email.from; + + // Set default values + pro.category = 'hardware'; + pro.impact = 3; + pro.urgency = 3; + + var problemID = pro.insert(); + if (problemID){ + current.problem_id = problemID; + current.update(); + } + +})(current, event, email, logger, classifier); + diff --git a/Server-Side Components/Inbound Actions/Create Problem from Email/README.md b/Server-Side Components/Inbound Actions/Create Problem from Email/README.md new file mode 100644 index 0000000000..35ba6a1434 --- /dev/null +++ b/Server-Side Components/Inbound Actions/Create Problem from Email/README.md @@ -0,0 +1,13 @@ +Create Problem from Inbound Email Actions + +1. Create a Inbound Email Action for Problem record. +2. Select the Target Table as Problem [problem]. +3. Select Action type as Record Action. +4. In the When to run Tab select Type as "New", we can required roles as well. +5. Add the required conditions - "Subject -> contains -> Problem". +6. Write the script in the Actions Tab. +7. Glide the Problem Table and assign the short_description from the email subject else "No Subject". +8. And assign the description from the email body_text else "No Description Provided". +9. Assign the caller_id from the email.from. +10. Set the default values such category, impact, urgency etc. +11. Followed by it will create the Problem whenever an email subject contains the Problem.