Unable to see company realted info in MSP acc in New ticket and contact pages for Freshservice

Hello,

I’m developing an app for the MSP Freshservice account to display company information in New ticket and contact detail page but unable to see the required information about the company.
Below is the payload I’m receiving in Contact details page
active: false
address: null
created_at: “Jul 24th 2019”
custom_field: “cf_type_of_contact: N/A”
deleted: false
description: null
email: “andrea@freshservice.com
external_id: null
helpdesk_agent: false
id: 14000244900
job_title: “Manager”
language: “en”
mobile: null
name: “Andrea”
phone: null
time_zone: “Eastern Time (US & Canada)”
updated_at: “Jul 24th 2019”

Below is the payload response for new ticket page

1. active: false
2. address: “”
3. background_information: “”
4. can_see_all_tickets_from_associated_departments: false
5. created_at: “2018-03-02T02:59:50Z”
6. custom_fields: {call_classification: null, cluster: null, sub_cluster: null, sla_days: null, function: null, …}
7.department_ids: []
8. first_name: “Andrea”
9. has_logged_in: false
10. id: 8000465455
11. job_title: “Manager”
12. language: “en”
13. last_name: null
14. location_id: null
15. mobile_phone_number: “”
16. primary_email: “andrea@freshservice.com
17. reporting_manager_id: null
18. secondary_emails: []
19. time_format: “12h”
20. time_zone: “Eastern Time (US & Canada)”
21. updated_at: “2020-01-06T06:16:07Z”
22. work_phone_number: “”

Can you let us know how to fetch company details in both pages?

1 Like

Hello Soujanya,

Could you share API’s that you used to fetch the payloads for Contact details page and New ticket page?

This is the API that is used for fetching the details of a single company:
Retrieve the Department (or Company in MSP Mode) with the given ID from Freshservice

GET  /api/v2/departments/[id]

Thank you!

2 Likes

Hi @Anand_Chandran
I’m using data API to retrieve contact info

 client.data.get('contact').then(function(data) {
      var req_data = data.contact;
           callback(req_data);
       }).catch(function() {
            displayErr("Unexpected error occurred, please try after some time.", client);
       });

There is no information about company details at least id also not present. In the initial conversation, there is a response payload for the contact page, please refer.

And in the New ticket page I’m using search API to get selected contact details, As mentioned in the previous conv there is department_ids but it’s returning an empty array even though a company is associated with that requester/contact.
So no where I’m getting info about company names/ids to make the API call that you mentioned.

Regards,
Soujanya.

Hi @soujanya,
Can you try using the department object in data API to fetch the company-related information?

Also, Search API returning empty results can be a bug if the relevant company presents in the portal and relevant filters are applied. We will report it to the Freshservice product team. We may not get an ETA for the bugs immediately.

Could you please share the sample request and results along with x-request-id that can help the team troubleshoot the API?

1 Like

Hi @soujanya ,

Hope you were able to solve this. Feel free to share the solution(s) that worked. Let us know if you would require any assistance :slight_smile: