- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 06:46 AM
We have a group that goes through somewhere called Condeco - They want this company to send an email to our site and have Service Now somehow parse out and complete a Service Request which then sends a task to our Building Office Service Group. I've never heard of such a thing. I know an inbound email can be used to like populate a table or an incident but never a relationship like the Variables and Requests. Anyone know anything about this and if it's possible and how much work would it be if possible? TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 08:08 AM
Hi,
Variables can be read from template:
i.e:
Email Body should like below:
Event Name: ABC
Building Location: YYZ
While reading email by inbound action use:
email.body.event_name
email.body.building_location
space between works are replaced with underscore.
If the template is in HTML you can read email.body_html and parse using regular expression.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 07:23 AM
Hi,
You can create RITM /REQ/TASK:
Below is script to add in script section
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
//sys_id of catalog item
var item = cart.addItem('f17b8e7f6f472100de7ee1b3dd3ee4fc');
//gs.getProperty('com.swo.catalog.globalacademic'));
cart.setVariable(item, 'u_sub_service',sub_service);
cart.setVariable(item, 'u_block_unblock_reason', 'Requested through Nav');
//Set value of all variables
var rc = cart.placeOrder();
var gr = new GlideRecord("sc_req_item");
// Stop to process next inbound actions
event.state="stop_processing";
// Workaround to set target to REQ
sys_email.instance = rc.sys_id;
sys_email.target_table = rc.getTableName();
sys_email.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 07:39 AM
I would have never thought this is possible. What type of script is that? or where do you put it. So you can Hardcode items on the cart.setVariable? or does it some how parse out their email. So there body of the email would be like probably the "description" in their request? TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 07:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 08:08 AM
Hi,
Variables can be read from template:
i.e:
Email Body should like below:
Event Name: ABC
Building Location: YYZ
While reading email by inbound action use:
email.body.event_name
email.body.building_location
space between works are replaced with underscore.
If the template is in HTML you can read email.body_html and parse using regular expression.
Thanks