User Tools
Writing /app/www/public/data/meta/onboarding/digportal/email_parse_rules.meta failed
onboarding:digportal:email_parse_rules
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| onboarding:digportal:email_parse_rules [2016/08/24 10:55] – [CBYD Email Parsing Rule Project] 1carew1 | onboarding:digportal:email_parse_rules [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Ticketer - Email Parse Rules ====== | ||
| + | Email parsing rules are groovlets associated with Dig Ticket Call Centers. | ||
| + | A Call Center will send an email to an inbox we monitor and if the sender email address matches an email address belonging to a Call Center, it will parse the email into a ticket based on the rule associated with that Call Center. | ||
| + | |||
| + | ===== CBYD Email Parsing Rule Project ===== | ||
| + | Obtain the CbydEmailParsing project from bitbucket and get it running on local machine. If you are having issues with this feel free to ask a co-worker or your mentor to assist. | ||
| + | |||
| + | When taking a rule from production, to import it make sure to take the code from production between | ||
| + | |||
| + | < | ||
| + | // Determine type of email (i.e. Normal, Emergency, Update, Notification, | ||
| + | |||
| + | and | ||
| + | |||
| + | log.info "Dig Ticket ' | ||
| + | </ | ||
| + | |||
| + | and in the Parsing project paste the code between | ||
| + | < | ||
| + | // Determine type of email (i.e. Normal, Emergency, Update, Notification, | ||
| + | |||
| + | and | ||
| + | |||
| + | // ***************** Rule ends here ***************** // | ||
| + | </ | ||
| + | |||
| + | You may get an error in the project for DateLocalizer. If this occurs replace | ||
| + | \\ // | ||
| + | \\ with | ||
| + | \\ //def dateLocalizer =new DateLocalizer// | ||
| + | \\ remember to undo this change before placing the rule back on production | ||
| + | ===== Writing the Groovlet ===== | ||
| + | |||
| + | |||
| + | Examples can be found by clicking into a Call Center (Ticketer/ | ||
| + | |||
| + | It should be in the format : | ||
| + | |||
| + | ^ RULE FORMAT | ||
| + | | Imports | | ||
| + | | Email, Workflow and Visibility | ||
| + | | Is the email Ticketable and what severity | ||
| + | | Split String to obtain desired data | | ||
| + | | Assign data to ParsedDigTicketEmail object| | ||
| + | |||
| + | Rules may differ greatly from one another due to how different Dig Centers format their emails. A different email format means a different parsing rule. | ||
| + | |||
| + | The key to extracting information from strings is the utils.retrieveTokenResult method. This takes in a string, the first string to look for and the seconds string to look for and returns what is in between such that | ||
| + | utils.retrieveTokenResult(" | ||
| + | |||
| + | This method will mostly be used on the emailBody which you will pull back most information from | ||
| + | |||
| + | An important point to note is that emails may come in from the same Dig Center however the format is slightly different so your rule will need to accommodate this. Also emails of different severities may have slightly different formats such as an Emergency may be different to a Routine. | ||
| + | |||
| + | Try to use Regex for finding data where possible as whitespace can cause issues with different emails having a different number of whitespace at the same locations. | ||
| + | |||
| + | The overall goal is to populate as many field in ParsedDigTicketEmail as possible. | ||
| + | |||
| + | ===== Tips and Tricks ===== | ||
| + | |||
| + | The following tips and tricks may come in useful when parsing emails: | ||
| + | |||
| + | * Always make a backup of the original parsing rule before you make any changes! This allows the original rule to be reinstated if need be | ||
| + | * When copying the email body into IDEA for testing don't forget to also copy in the subject line - this dictates whether the email is ticketable or not | ||
| + | * Set breakpoint/ | ||
| + | * When you are happy that the issue has been fixed, attempt to parse older emails from the same call center to ensure that the changes work | ||
| + | * Don't forget to reparse the original email that caused the issue - this is done by marking the email as ' | ||
| + | ===== Assessment ===== | ||
| + | Try and write the parsing rule for this by taking the first email parsing rule in the list of dig ticket call centres and making it work for this email format instead. | ||
| + | |||
| + | Please do not just copy the appropriate rule for this email and try write it manually. | ||
| + | |||
| + | **Email Subject** | ||
| + | |||
| + | < | ||
| + | Errigal Hotline Ticket 20163504815 | ||
| + | </ | ||
| + | |||
| + | **Email Body** | ||
| + | |||
| + | < | ||
| + | Errigal Hotline, Inc. (San Francisco) | ||
| + | |||
| + | Ticket #: 20163504815 | ||
| + | |||
| + | Header: | ||
| + | This ticket has been relocated | ||
| + | Start Date : | ||
| + | |||
| + | Call Date : 08/ | ||
| + | Transmit Date: 08/ | ||
| + | |||
| + | |||
| + | Caller: NICOLE FAREWELL | ||
| + | DAVID J FRANK LANDSCAPING | ||
| + | N120W21350 FREISTADT RD | ||
| + | GERMANTOWN | ||
| + | WI 53022 | ||
| + | nicole.farewell@davidjfrank.com | ||
| + | |||
| + | Field Rep.: JEFF MILLER | ||
| + | |||
| + | County : MILWAUKEE | ||
| + | Place : MILWAUKEE CITY | ||
| + | At : 745 | ||
| + | Street : N PROSPECT AVE | ||
| + | Intersection 1: E WISCONSIN AVE | ||
| + | Intersection 2: | ||
| + | On the W side of street and approximately 0.00 FT N of Intersection 1 | ||
| + | Latitude NW 43.04043100 | ||
| + | Latitude SE 43.03901400 | ||
| + | |||
| + | Type of Work: LANDSCAPING | ||
| + | Working For : HOMEOWNER | ||
| + | Explosives: | ||
| + | |||
| + | Marking Instructions: | ||
| + | MARK AREA FROM CURB TO FENCE ALONG N PROSPECT/E WISCONSIN FROM E MASON | ||
| + | TO N VAN BUREN. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Remarks: | ||
| + | CALL MARK SCHUTZ ON SITE WITH QUESTIONS: 262-894-1336 OR MIKE MAURER: | ||
| + | 262-894-7005 | ||
| + | |||
| + | |||
| + | Members Notified: | ||
| + | *CROWN CASTLE | ||
| + | WE ENERGIES - WE31WG | ||
| + | WE ENERGIES | ||
| + | CITY OF MILWAUKEE | ||
| + | MCI MCI01 | ||
| + | CTLQN - CENTURYLINK | ||
| + | </ | ||