We have a setup where customer e-mails are send to a shared mailbox and from that mailbox, e-mails that require a ticket to be created are forwarded to the Jira Service Management solution.
These e-mails has the person forwarding it in the requester field, but we need to assign it to the customer responsible team, which is based on the customer e-mail domain.
How do I pull out that customer e-mail domain from the Description field and automate the assignment to the responsible team?
Pulling out the customer email domain from the Description field is easy but it may also come with other problems, e.g. if there are multiple emails in the description field, etc.
I'd suggest
- create a custom field to store the domain (say it is Domain: customfield_12345)
- then create an Automation rule and set the trigger (e.g. Issue Created)
- add an action to extract the email domain with a regular expression something like the below
{
"fields": {
"customfield_12345": "{{issue.description.match("(?<=@)[a-zA-Z0-9.-]+")}}"
}
}
- add an action to assign to the team (you can use the Domain custom field or the regular expression directly here)
On the other hand, there is the free app, SnapAssign on the Markeplace which you can use to offload some of the burden. I am one of the folks behind, if you have any questions please do ask, I will gladly answer.
Thank you very much for your answer, it's highly appreciated.
I might be a bit too much of a new-be to this, but I can't really get the above suggestion to work.
I have created the customfield called "Customer", where I wish to find the customer e-mail in ticket, that has been assigned by forwarding a mail from shared mailbox to the Jira Service project.
It seems that the customer e-mails are incapsulated in <> in the Description field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let me try to boil it down. My solution requires using Automation.
- Create an Automation rule (Project settings > Automation > Create Rule)
- Choose Issue Created as the trigger
- Add a branch/action and choose edit issue fields > more options (advanced json)
use the json I provided replacing the 12345 with your Customer custom field.
{
"fields": {
"customfield_12345": "{{issue.description.match("(?<=@)[a-zA-Z0-9.-]+")}}"
}
}
- add if/else block
Condition: Compare the extracted email domain. Use Advanced Compare Condition:
{{issue.description.match("(?<=@)[a-zA-Z0-9.-]+")}}
customer1.com
(replace with the actual domain you want to compare).Action: Assign the issue.
And repeat for Other Domains adding additional "Else If" branches for each customer email domain and assign to the corresponding team.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.