R3ECEM Posted February 21, 2020 Posted February 21, 2020 Hi, I've been tasked to automate some ticket logging in regards to our third party suppliers. The way I've been asked to do it is for when email comes into our hornbill mailbox beginning with 7 numbers at the start of subject title. Automatically log it in a specific naming convention that would be something along the lines of STORE - (all information in the subject header apart from the 7 numbers at the start) - (7 numbers at the start of the email subject). Where can I begin with this? thanks Reece
SamS Posted February 21, 2020 Posted February 21, 2020 Hi @R3ECEM, You might find what you want here: https://wiki.hornbill.com/index.php/Routing_Rules_-_Call_Logging
R3ECEM Posted February 21, 2020 Author Posted February 21, 2020 15 minutes ago, SamS said: Hi @R3ECEM, You might find what you want here: https://wiki.hornbill.com/index.php/Routing_Rules_-_Call_Logging Thank you for this, it seems like a lot of what I need is in here. If you are aware of any SQL syntax i can use to pull just the 7 digit integer at the front of the subject line of the email. That would be amazing, i should be able to work out the rest.
SamS Posted February 21, 2020 Posted February 21, 2020 And in addition to that, @R3ECEM , you might also find relevant info in: https://wiki.hornbill.com/index.php/Email_Routing_Rules
SamS Posted February 21, 2020 Posted February 21, 2020 @R3ECEM LEFT(subject, 7) will give the first 7 characters.
R3ECEM Posted February 21, 2020 Author Posted February 21, 2020 6 minutes ago, SamS said: @R3ECEM LEFT(subject, 7) will give the first 7 characters. Is there a way to then take that and apply is so it can only be numbers rather than characters. I had something similar to yours which was subject SUBSTRING (subject, 7)
R3ECEM Posted February 21, 2020 Author Posted February 21, 2020 15 minutes ago, SamS said: @R3ECEM LEFT(subject, 7) will give the first 7 characters. Here is my attempt. mailbox="IT Service Desk" SELECT SUBSTRING (subject, 1, 7) FROM mailbox WHERE ISNUMERIC(SUBSTRING (subject, 1, 7))
R3ECEM Posted February 24, 2020 Author Posted February 24, 2020 Following testing, I can unfortunately see this has not worked. Though in my mind I can't see why it hasn't. Any ideas? thanks Reece
SamS Posted February 24, 2020 Posted February 24, 2020 Hi @R3ECEM, You can use SQL expressions for any rules - there is NO database behind the scenes though, so the use of SELECT is not going to do anything other than cause errors. You might be able to try: subject REGEXP ('^[0-9]{7}') which should returns either true or false depending on whether the first 7 characters of the subject are digits or not.
R3ECEM Posted February 26, 2020 Author Posted February 26, 2020 On 2/24/2020 at 5:07 PM, SamS said: Hi @R3ECEM, You can use SQL expressions for any rules - there is NO database behind the scenes though, so the use of SELECT is not going to do anything other than cause errors. You might be able to try: subject REGEXP ('^[0-9]{7}') which should returns either true or false depending on whether the first 7 characters of the subject are digits or not. Sadly this didn't work either. I sent an email with 7 digits at the start and this didn't automatically log the ticket. I've switched the email rule to be from just one particular email address now so all emails from @ helpdesk now and got it set to either log/update existing request based on email subject from that specific email address. However i'm seeing emails being moved to the success folder (the deleted items) however no tickets are being logged, and no tickets are being updated. thanks Reece
Steve Giller Posted February 26, 2020 Posted February 26, 2020 @R3ECEM You'll want to check the Service Manager Settings section of the wiki article, and ensure that the Service, Priority etc. are correctly set. We recommend using the more recent raiseNewRequest and updateRequest operations in conjunction with Routing Rule Templates to take advantage of the improved functionality.
R3ECEM Posted February 28, 2020 Author Posted February 28, 2020 On 2/26/2020 at 2:30 PM, Steve Giller said: @R3ECEM You'll want to check the Service Manager Settings section of the wiki article, and ensure that the Service, Priority etc. are correctly set. We recommend using the more recent raiseNewRequest and updateRequest operations in conjunction with Routing Rule Templates to take advantage of the improved functionality. Thanks for this. I have set the available settings suggested, service , priority etc. I have moved over to use both the raiseNewRequest and UpdateRequest functions. If i want to update requests based on the subject line can I leave the reference as subject like below? In my head this would look at the title of all tickets. See if any match the subject of the email then update that request or pass on to rule 2 which logs the new request. thanks Reece
Steve Giller Posted February 28, 2020 Posted February 28, 2020 @R3ECEM You've not configured the Reference field correctly: There's a note right at the foot of the documentation that states: Note: For ... updateRequest operations the Reference field is a mandatory parameter. You will need to specify the Regex Syntax that matches your call reference. E.g. for the standard out-of-the-box reference use: [a-zA-Z]{2}[0-9]{8} You'll need to update that field accordingly in order for it to recognise the Request Reference for updates. You will also need to change the UPDATE rule to ensure there is a reference in the subject line:fromAddress = 'test@email.com' AND REGEX_MATCH(subject, '.*\b[a-zA-Z]{2}[0-9]{8}\b.*') which will pick up all emails from that email addresses that have a request reference in the subject (and therefore are an update) then follow with a LOG rule of:fromAddress = 'test@email.com' which will pick up any without a valid reference and log a new request. Finally, please remember these forums are visible to the public and be mindful of any personal information you post
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now