- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 09:07 AM
I'm working on an inbound action where ideally it is searching the body of the email for a certain string as part of the condition. I've created the conditions as seen below, but for some reason the IA is getting skipped over. I'm wondering if maybe it's not possible to do the way I'm trying. Has anyone had any luck with this?
Conditions
(email.recipients.toLowerCase().indexOf("techadmin@xyz.com") > -1) &&
(email.body.toLowerCase().indexOf("newrepcomm") > -1)
The inbound emails will all have the following line in the body, this is what I'm looking for in the condition.
"There is a new NewRepComm Set Up case (123456789) for user..."
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 09:39 AM
In your conditions field try this
(email.recipients.toLowerCase().indexOf("techadmin@xyz.com") > -1) && (email.body_text.toLowerCase().indexOf("newrepcomm") > -1)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 09:11 AM
Your condition looks fine to me. There may be some other reasons why iot is skipped. What exactly the inbound action should be doing here? Can you post the code of your IA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 09:15 AM
Here is the IA:
gs.log(email.subject + " Start Create NewRepComm TECHA - NEW Inbound Script");
current.short_description = email.subject;
current.work_notes = "New email received from: " + email.origemail + "\n\n" + email.body_text;
current.description = "New email received from: " + email.origemail + "\n\n" + email.body_text;
gs.log(email.recipients + " Email Address");
var sid = gs.createUser(email.from);
var sepm = sys_email.user;
current.u_requested_for = sepm;
current.opened_by = sepm;
current.u_request_type = 'User Management';
current.u_sub_type = 'Permissions';
current.state = -5;
current.assignment_group.setDisplayValue('Technology Administration');
current.contact_type = "email";
current.insert();
gs.log(current.number + " TECHA Number");
gs.log(email.subject + " End Create Tech Admin Request - NEW Inbound Script");
event.state="stop_processing";
current.state = -5;
current.assignment_group.setDisplayValue('Technology Administration');
current.contact_type = "email";
current.insert();
gs.log(current.number + " TECHA Number");
gs.log(email.subject + " End Create Tech Admin Request - NEW Inbound Script");
event.state="stop_processing";
I believe that the IA is being skipped entirely, as I'm not getting any of the gs.logs I entered in the Script Statement Log. It's like it's not even starting.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 09:17 AM
Can you check the order of the IA. Make sure there are no other IA on this table with lesser order and can you post a screenshot of IA which captures the conditions on IA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 09:25 AM