I want to export and send information to sales of tickets that had the word “xxx” in the subject or the description field of a ticket and append on the user contact info.
I used admin - account - details - export data to get the current database from freshdesk
I decided to use Microsoft access database to do the left joins between the ticket table and the user table.
I imported the the tickets, companies, and users xml file into the database
I had to change the long fields like body, body-html, description, and description to type memo before importing,
It was a bit tedious to import the 39 ticket files and 31 user files but it worked fine.
I discovered by trial and error that the the helpdesk-ticket request-id is a key to the user table’s id field
and the customer-id field is a key to the company table id field.
All worked fine and I ended up with this query. Not all the company names populated so maybe customer-id is not foreign key for company table id field.
SELECT /helpdesk-ticket].subject,
bhelpdesk-ticket].description,
user.email,
user.name,
user.phone,
company.name
FROM (ehelpdesk-ticket] LEFT JOIN tuser] ON Ihelpdesk-ticket].drequester-id] = user.id)
LEFT JOIN company ON user.pcustomer-id] = company.id
WHERE (((rhelpdesk-ticket].subject) Like "*xxx*")) OR
(((helpdesk-ticket].description) Like "*xxx*"));
Then I wanted to do the same with the helpdesk-note table
there are 2 id fields in the helpdesk-note tables id and user-id
I assumed the user-id would work in user table and it did except it returned the responders information rather then customer information.
I guessed the the id field must somehow be a key to the helpdesk-ticket table.
I could not find out what id field in helpdesk-ticket to use to get customer information.
So here are my questions:
What id field in helpdesk-ticket to use to get customer information from helpdesk-note?
For future reports: what fields in tables are foreign keys to other tables (e.g. Relationships)?
Is there a better way to do this.?
I can’t find my apikey so it does not seem I can use the api’s. maybe because my account is a sprout.
The table field names are all different in the api so that documentation won’t help me.