import external customer info from external db

Gualter Augusto January 15, 2018

Hi,

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. 

Thanks,

3 answers

2 votes
miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 15, 2018

Hi,

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!

Gualter Augusto January 15, 2018

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

miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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 :)

Gualter Augusto January 15, 2018

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?

miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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!

Gualter Augusto January 15, 2018

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 email@company.com has user_id 3323

And for about 95% of all incoming tickets about this customer, they all come from email@company.com.

But there might be a couple ones coming from email2@company.com 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.

Gualter Augusto January 18, 2018

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 "user@company.com" 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.

Gualter Augusto January 19, 2018

Hi,

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.

 

Cheers

miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2018

Thanks for the update!

Gualter Augusto January 19, 2018

I was able to get 2 fixed.

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

 

Thanks again for the assistance

0 votes
Gualter Augusto January 17, 2018

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.

 

Cheers

miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2018

What you can do is importing email1@company.com, email2@company.com 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!

Gualter Augusto January 18, 2018

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.

 

Thanks,

miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2018

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

0 votes
Bryan Bai January 15, 2018

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events