import external customer info from external db Edited


I want to use ServiceDesk as my support tool for external users. I need to receive multiple incoming emails and have them open tickets, with the requester being imported from our internal DB (Postgres).

We will need to select by incoming email and import information like user_id, plan, among others.

How can this be achieved? How can i add specific fields to my customer's profile and have it imported from my db? Note that this fields can change anytime. 


3 answers

2 votes
Micky CARITTE Community Champion Jan 15, 2018


I think there's no way to keep user directory in sync with a flat database.

That being said, you might let Jira create users automatically from incoming emails and then fetch some info related to this email through your external DB. There are various addons which can help you, I've used nFeed a lot in the past (I worked for the company editing the addon though) but I know there are many other way to do so (Script Runner, Powerscript...).

Hope this helps!

Thank you for the reply!

Will look into it. But the custom fields created and fetched on the external db will be fed to custom fields on the ticket itself right? not on the customer's info on customers page

Micky CARITTE Community Champion Jan 15, 2018

Yes you're right.

It's definitely not perfect but I think it's the only way to get somewhere close to what you want. 

Another option would be to import your DB into a user directory (AD, Crowd, LDAP...) so that it would become available within Jira easily.

Good luck! Let us know how you'll do :)

ok last question on the topic. Assuming i apply the custom fields (id, plan, etc) into the ticket's custom fields and they get imported on ticket creating through the process stated previously. Is there a way i can access past tickets from that specific user_id inside service desk? How can i manage this?

Micky CARITTE Community Champion Jan 15, 2018

If you have a customfield holding the customer ID for instance you might create a Service Desk Organization and automatically associate it based on that customfield, that should do the trick (based on scripting, maybe even workflow postfunction).

Hope this will work, very curious on the outcome of this!

The easy way would be looking at all the tickets from a specific email. This already can be done in the customers page looking at the previous "closed" tickets.


But on my side we have 1 email which is the main account. So has user_id 3323

And for about 95% of all incoming tickets about this customer, they all come from

But there might be a couple ones coming from with an issue about the user_id 3323 so i need to be able to look at all tickets from this user_id in the future.


I don't know if i explained myself correctly or not.

Hello again!

I'm trying nfeed now. couple of questions:


1 - I have already managed to connect my db and create my custom fields (user_id, balance and plan) which i will fetch from my db using queries. So far so good.

If i open the ticket manually and assign the reporter as "" the info is harvested correctly, but if i send an email directly to servicedesk, the values are not fetched and displayed. How come?


2- Also i am using $issue.reporter to fetch the email i will use in my query (i select user_id by inputing email), but if the user already specified a username the email will not be selected. Is there a way to use the email field from a customer info in the SQL query in nfeed?


Thank you for you help.


Just an update:


I was able to fix issue 1. With the add-on "automation for jira lite". The problem was that the field population was not being triggered on ticket creation, and since the field had null values it did not display. With the add-on i created a custom rule to trigger the fields upon ticket creation and it fixed.


The only issue now is on users that have username defined, for those i'm still figuring out how to extract their email to use on my query.



Micky CARITTE Community Champion Jan 19, 2018

Thanks for the update!

I was able to get 2 fixed.

Instead of $issue.reporter i used $issue.reporter.emailAddress


Thanks again for the assistance

you can find a way to pre-populate all user from your internal DB into JIRA, as service desk doesn't consume license. So with all existing userid and email, your incoming email will be assigned with proper reporter ID.

I would use Crowd + JIRA, which crowd allow you to import/create user from csv file.

let me know if this help.

Thank you all for your replies. I will opt for server instance of Service Desk. Still figuring out how to import data from our internal db.



Micky CARITTE Community Champion Jan 18, 2018

What you can do is importing, etc... as separate accounts and then use Organizations to regroup customers by domain (you might do that manually or through scripting if you're familiar). Using organization is great so that all customers from a same company can see each others Jira tickets!

Hope this helps!

That looks great. However we have over 40k clients in which we don't control which users belong to which organisation (only when a ticket is raised by the user's email, or if the third-party email tells us that they are talking on behalf of X user).

What i am thinking now would be using scripts to automatically create organisations named "user_X" or something like that in which the primary user email is automatically linked to this user_x org and the third party emails are linked manually.


i will keep looking out for the best solutions.



Micky CARITTE Community Champion Jan 18, 2018

all right, thanks for sharing, seems pretty complex indeed.

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Dec 06, 2018 in Jira Service Desk

Looking for teams who switched from email to Jira Service Desk

The Jira Service Desk marketing team is working on a guide to help new Atlassian customers switch from email to JSD and we'd love to hear from you! Please share: - What made you realize that i...

1,182 views 10 13
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you