- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 02:29 AM
Hi
Using an inbound action I am trying to populate the short description with a line from the inbound email but my attempts have failed (again) I have tried using a script provided previously to be used in a record producer however thats failed. The email body will have the following lines, I want to pull the answers and add them to the short description stating New starter request for.....
First Name
Last Name
Any help would be greatly appreciated.
Regards
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2014 05:22 PM
Have you tired using email.body.first_name (in lower case not upper case)
I think they may change the variables to all lower case when setting up the inbound integration.
Cheers,
Cameron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2014 08:07 AM
Hey Marc,
That was a really obvious error that I should have spotted however its still not working. Script is below along with body of the email. The ticket is created but the short description remains blank, it would seem the script is running but not picking up that there is an entry after First name. Any Thoughts?
current.u_type = 'Request';
current.caller_id = GetIDValue('sys_user', 'New-Starter-Process');
current.u_category_level_1 = GetIDValue('cmdb_ci', 'Domain');
current.u_category_level_2 = GetIDValue('cmdb_ci', 'Access');
current.u_category = GetIDValue('u_category_lookup', 'Service Request');
current.priority = '9';
current.contact_type = 'email';
current.assignment_group = GetIDValue('sys_user_group', 'System Admin');
current.delivery_plan = GetIDValue('sc_cat_item_delivery_plan', 'New starter');
current.assigned_to = '';
current.opened_by = GetIDValue('sys_user', 'New Starter Request');
if(email.body.FirstName != undefined) {
current.short_description = email.body.FirstName;
}
current.insert();
Last Name :
Role Title :
HR or MRA Reference No.* :
FirstName Steve
Last Name : ;
New Role Title :
Department Name or RAD :
Base Office :
Start Date :
Is the New Starter a Permenant or Temporary Colleague :
If Temporary, what is the contract end date? :
Is a Ladbrokes Gmail account required? :
Is a Windows User Account required? :
Please provide the name of an existing System User who has the same access
rights required :
Is access to OpenBet Admin and IMS required? :
If Yes, please confirm which OpenBet/IMS systems are required :
Is access to other systems required? :
If Yes, please provide the name(s) of these systems :
Is access needed to Imperial House, Rayners Lane? :
If Yes, please indicate the level of access required :
Set-up and Access Requirements :
Internet Access :
Business Justification :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2014 12:05 PM
Hello Steve,
It seems in the mail body a ":" is missing between FirstName and the name Steve. Without which SN couldn't establish a Name-Value pair.
Please put all such name value pairs as
Name : Value
Then you can use it in your script as
email.body.Name (in above case, it would be email.body.FirstName)
Hope that helps.
Mandar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2014 01:13 PM
Hey Mandar,
Thanks for the help. I have added this to the email and still no joy. Details below
current.u_type = 'Request';
current.caller_id = GetIDValue('sys_user', 'New-Starter-Process');
current.u_category_level_1 = GetIDValue('cmdb_ci', 'Domain');
current.u_category_level_2 = GetIDValue('cmdb_ci', 'Access');
current.u_category = GetIDValue('u_category_lookup', 'Service Request');
current.priority = '9';
current.contact_type = 'email';
current.assignment_group = GetIDValue('sys_user_group', 'System Admin');
current.delivery_plan = GetIDValue('sc_cat_item_delivery_plan', 'New starter');
current.assigned_to = '';
current.opened_by = GetIDValue('sys_user', 'New Starter Request');
if(email.body.FirstName != undefined) {
current.short_description =email.body.FirstName;
}
current.insert();
Last Name :
Role Title :
HR or MRA Reference No.* :
FirstName :Dave
Last Name : ;
New Role Title :
Department Name or RAD :
Base Office :
Start Date :
Is the New Starter a Permenant or Temporary Colleague :
If Temporary, what is the contract end date? :
Is a Ladbrokes Gmail account required? :
Is a Windows User Account required? :
Please provide the name of an existing System User who has the same access
rights required :
Is access to OpenBet Admin and IMS required? :
If Yes, please confirm which OpenBet/IMS systems are required :
Is access to other systems required? :
If Yes, please provide the name(s) of these systems :
Is access needed to Imperial House, Rayners Lane? :
If Yes, please indicate the level of access required :
Set-up and Access Requirements :
Internet Access :
Business Justification :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2014 05:22 PM
Have you tired using email.body.first_name (in lower case not upper case)
I think they may change the variables to all lower case when setting up the inbound integration.
Cheers,
Cameron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014 02:37 AM
Hi all.
thanks you all very much for your help with this script. It is now working and I have also added last name and "new starter request for" in the short description so when it comes to audit all starters will be easily located. The actualy answer seems to have been that it was in upper case (on both the script and email) changing to lower case got it working.
thanks again, this script will be most useful in a lot of inbound actions and will help automate a lot of ticketd!