Populate RITM variable values through inbound action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 04:23 AM
Hi All,
I am triggering a service request through inbound email action.
Where in I need to populate values in RITM variables with the content in email body.
I am using below script, but it is not working. Kindly suggest me any modifcations.
var ritmRec = new GlideRecord("sc_req_item");
ritmRec.addQuery("request", rc.sys_id);
ritmRec.query();
if (ritmRec.next()) {
ritmRec.short_description = email.subject.toString();
ritmRec.description = email.body_text.toString();
ritmRec.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.employee_no = email.body.employee_number.toString();
current.employee_name=email.body.employee_name.toString();
ritmRec.update();
employee_no and employee_name are not populating. Sending email as below.
Employee Number:12345
Employee Name:Test
And also noticed REQ's are not generating in order.
REQ0017421,REQ0017423,REQ0017425
One number is getting skipped. Kindly suggest what is missing here

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 04:27 AM
HI
Refer the below links may helpful to you.
How to launch Catalog Items from Email
Create Request from Inbound Email Action
Submit a catalog item through Email inbound action
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2022 04:06 AM
Hi Sandeep,
My request number skipping issue resolved after enabling preventing numbering gaps property.
Is this issue occurs only when we use inbound email actions?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 04:30 AM
Hello Renu,
value pairs in the message body of a recieved email. You should be able to pull the value using something like:
current.variables.<variable_name> = email.body.information_from_email;
Please update the bold lines with the below code & try
current.variables.employee_no = email.body.employee_number.toString();
current.variables.employee_name=email.body.employee_name.toString();
Mark it as helpful or correct, If Applicable
Cheers..!
Happy Learning:)
Tushar
Cheers..!

Happy Learning:)

Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 05:28 AM
Hi Tushar,
Now I can get variables filled up with data from email body. But request numbers are not generating in order, alternate request numbers are getting generated.How to chck this