how to generate a req,ritm and sc task via inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 01:30 AM
hi can anyone please help me with scenario for the inbound email action i created when receipient contains ****.com,
i have given the email condition when the recipients contain for email address and action type as 'record action' and type as new and in the actions tab i have written the below code , i have created a ctalog item and workflow for this.. below the code:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 01:40 AM - edited ‎03-05-2024 01:43 AM
Hi @raj765_32 ,
I've made a couple of videos about it, maybe they will help, please check them:
https://youtu.be/3vX-I3gt4Ps?si=jocoaslUOKc0WsL0
https://youtu.be/pbFzD1dNfpg?si=fbf-cNozmaJbt5e-
Regards, Ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 01:44 AM
hi ivan surely i will follow the videos, but for a time being can you please tell me the defect in my code and why it is not creating a req and ritm

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 02:10 AM
Hi @raj765_32 ,
This part should place request, and it is correct:
var cart = new Cart();
var item = cart.addItem('9710702cc3840210669f9e8f05013154');
cart.setVariable(item, 'additional_info_noc', email.body_text.toString());
var rc = cart.placeOrder();
If that is not happening then your Inbound Action is not getting triggered. What is shown in the email log itself when it comes in? Is the order correct?
What are you trying to do in this part? Associate an email with a target record? What is the sys_email? There is no such a parameter in Inbound action => this should give you an error at least.
var gr1 = new GlideRecord("sc_req_item");
gr1.addQuery("request", rc.sys_id);
gr1.query();
if (gr1.next()) {
sys_email.target_table = "sc_req_item";
sys_email.instance = gr1.sys_id;
sys_email.update();
}
Regards, Ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 03:11 AM
im not getting any error anyhow and i have watched your video on flow designer and is not working for me..