I am moving this thread to the Heat community as it relates to Heat Service Manager.
3 of 3 people found this helpful
It is possible to grab the Emails To field and insert it in to the Incident description. You will need a new relationship on the Incident Object to Journal.Email (this is so we can access the records stored there) now if this is the first incoming email i.e the one creating the incident then it makes life easier. Relationship example:
Add a new relationship called IncidentContainsJournalEmail
- Relates to Journal.EMail
- Relationship Type: Contains
- Incident Object
- Cardinality: Zero or One 0..1
- Field: RecId
- Journal.EMail Object (RecId)
- Cardinality: Zero or Many 0..N
- Field: ParentLink
You can then use a quick action to grab the email addresses using this function $(ForEachChild("Incident#", RecId, "Journal#Email.Rev2", $(ToAddrList)))
Now it will grab all the To: email addresses from the attached emails. there are a few ways to manage and automate this below, if you just want the first email address at the point of triage you can set the relationship condition to Incoming == True and the relationship will only be created for Incoming mails.
I first tried and failed to use the relationship update features to set a new field called IncommingToAddress to the ToAddress field from Journal.Email and then run a business rule to add the email addresses to the email description. The ToAddress feild never copied to the Incident record, as seen in this thread: https://community.ivanti.com/thread/59860
The solution that did work was to use a workflow, especially if you are triggering directly from an incoming mail (possible time delay in saving the record not too sure). So add a workflow to the incident object that runs when a new ticket is created and the Created By == Email Listener. Then add a wait block to wait for 1 minute then call the quick action to grab the ToAddress field using a ForEachChild command.
Run up an example in your staging tenant and have a play.
Thank you very much for this. Good write up on how to make this work.
I did something very similar, but instead of adding it to the subject line I added a new field to the Incident that is visible only if the ticket was created by an email listener. My only issue is that it grabs all email addresses from the To: section on the initial email. I do have some users who send an email to a listener but also include other To addresses, so the listener address can get lost in the result. I'm thinking I may need another constraint where it would only display if the address matches an active email listener but I'm assuming that would take another relationship. Any ideas on how to go about doing that?
Yes, you then need to write a loop which extracts each email address in turn to its own field and then compares it to a value or lookup table. If a match is found exit the loop if not then grab the next email address from the string and push it through your test.