This post describes the use of custom function scripts to create a service request through email based on keywords in the subject. When a request is created with specific keywords in the subject of a incoming mail , the Business Rule will be invoked. The keywords and the matching service template name will be provided in the script. The script will create a service request with the information from the incident request.
UseCase: Over 70 % of service requests are raised through Emails and all of them are logged in as incidents then those are converted manually into service requests.
This script will create service requests if the subject line contains the configured text. When the configured text is found, service request will be created using the configured template.
Steps to configure
1. Download and extract the zip file contents.
2. Goto Admin > Request Custom Function > Global Function > New > Paste the contents of global_function_14_childJson.txt and save it with a name. Update the service template name and the UDF fields.
3. Update the global function numbers in the custom function as per your build installation.
4. Goto Admin > Request Custom Function > Global Function > New > Paste the contents of global_function_4 - Configuration.txt Update the build URL and Technician Key.
5. Goto Admin > Request Custom Function > Global Function > New > Paste the contents of global_function_11_findAllDynamicKeysMultiLevel.txt and save it with a name.
6. Goto Admin > Request Custom Function > Global Function > New > Paste the contents of global_function_7_createChildRequest.txt and save it with a name.
7. Goto Admin > Request Custom Function > Global Function > New > Paste the contents of global_function_12_getDynamicFieldValue.txt and save it with a name.
8. Goto Admin > Request Custom Function > Global Function > New > Paste the contents of global_function_16_createChildJson.txt and save it with a name.
9. Goto Admin > Request Custom Function > New Custom Function > Paste the contents of custom_function.txt
10. Configure the created custom function in a Business Rule to get executed every time a request is created.
11. This will negate the Incident Ticket being created, instead create a Service Request.
For a simpler configuration, you can refer to "Create Service request using BusinessRule_Deluge_Basic.zip"