Jira automation check customer exist or not. If not create new customer to be issue reporter

Urmo
Contributor
September 25, 2023

Hi

I'm trying to create automation what check is e-mail sender exist in jira as customer or not.

into jira service management come in e-mail where in description is end user name and e-mail address. i extract from e-mail Reporter e-mail address to customfield.

Now i like to check with jira automation is this e-mail reporter allready in JSM or not. To create new it is simple with automation.

image.png

but how i should write If matches when i need to check that customer.x@mail.com is allready in customers or not. if exist, then don't create new but if don't create new customer and set it as Reporter.

1 answer

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2023

It looks like you are using 'legacy' automation but, as you are on server, that is all you have unless you have installed an automation add-on. I can't recall if this option exists in the 'legacy' automation or not but what I have used in cloud which has Automation for Jira is to insert a JQL condition to check for issues where reporter = customer.x. Can you see if that is possible? If in face you are using A4J then you can certainly do this.

Urmo
Contributor
September 25, 2023

I use Automation on DC. This is taken from Automation not Legacy automation.

Idea is this. User write problem on random website form. From there it is sended to JSM as support e-mail with Summary and Description field. In Description field is customer name, e-mail and problem explanation. From there i take out customer e-mail and extract it to another custom field.

But how i can write automation what check over is this e-mail allready in customers list or not. If it is then just add e-mail to Reporter field but if not then Add new Service managent customer from customfield e-mail.

I was testing one or another way but did not find solution.

This error is when it try's to create new customer with e-mail what allready is in system.

image.png

so i understand that i have to compare new with allready in system customers email.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2023

you mentioned the following...

From there i take out customer e-mail and extract it to another custom field.

now, are you trying to check a new incoming request for the existence of the email in the description against that custom field or are you trying to see if the email is associated with an existing customer?

either way, you should be able to use a JQL condition as I mentioned before.     You just need to use JQL to see if the results equate to no issues returned or not. Here is an article I previously wrote that explains the concept. While the purpose of the article is different I think the underlying concepts will apply.

please do pardon me if I am still missing your point here.

Urmo
Contributor
September 27, 2023

Yes, i try to use if else to check is customer e-mail allready in JSM customer list or not. If not then add and if it is, then take e-mail from custom field and add it into Reporter field.

Still i have not figure out how to build this up or is it possible with Automation Jira.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2023

If the article I provided is not working for you please share an image of your rule and explain where it is failing.

Urmo
Contributor
September 27, 2023

failing part is there where it should match is custom field Reporteri e-mail allready in Service Management customer or not. If it is then just add custom field Reporteri e-mail value to Reporter field, if not then create new Service Management customer and then after add this value into Reporter field.

image.png

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2023

to be honest, it is hard for me to follow your approach here. I think the best thing I could do is attempt to create an automation that would achieve your desired goals. I won't be able to get to that until late today if then, as I have other engagements. With that said, let me be sure that I have her use case correct. Please confirm the below information.

  • you have an incoming email issue creation request
  • in the description Of the request exists an email and you wish to assess if that email is associated with a current customer or not.
  • if the email/customer exists and then set that customer as the reporter.
  • If the email/customer does not exist then add them as a customer, and then set them as the reporter.
Like Pascal Suppers likes this
Urmo
Contributor
September 27, 2023

from email@email.com arrive issue into JSM where in description field one value is ticket raised user e-mail. With automation i but this into custom field.

and yes, your understand is correct.

Like Pascal Suppers likes this
Pascal Suppers
Contributor
November 11, 2023

Hi, I'm searching a solution for exactly the same issue. Please keep me informed about the progress. Cheers, Pascal

Urmo
Contributor
November 13, 2023

Hi

Because we like to add from form e-mail and name, then we take both out from description field.

image.png

image.png

Then Add new customer into system

image.png

And then over webhook had to send because i'll understand right now there is no better solution.

image.png

And after then edit issue for last step.

image.png

Yes, probably somebody can create better solution. But right now it works for me.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events