Getting wrong ticket id for Freshservice ticket in custom app

I am working on a custom app to get the ticket data and update the ticket field.
I am getting the wrong data for the ticket id while using client.data.get('ticket').id.

Ticket: https://letsdemo.freshservice.com/helpdesk/tickets/68?dev=true
getting data as:

{"id":27003967588,"requester_id":27000441472,"responder_id":null,"status":2,"source":3,"spam":false,"deleted":false,
"created_at":"2021-08-16T17:26:12-11:00","updated_at":"2021-08-16T17:26:12-11:00",
"subject":"test ticket for kyvos software version update - 3","display_id":68,"owner_id":null,"group_id":null,"due_by":"2021-08-17T05:00:00-11:00","frDueBy":"2021-08-17T01:15:00-11:00","isescalated":false,"priority":1,"fr_escalated":false,"to_email":null,"email_config_id":null,"cc_email":{"cc_emails":[],"fwd_emails":[],"reply_cc":[],"tkt_cc":[]},"ticket_type":"Incident","urgency":1,"impact":1,"department_id_value":27000064599,"category":null,"sub_category":null,"item_category":null,
"description":"test ticket for kyvos software version update - 3","description_html":"<div style='font-size: 14px; font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;'>\n<div>test ticket for kyvos software version update - 3</div>\n</div>","status_name":"Open","requester_status_name":"Being Processed","priority_name":"Low","source_name":"Phone","requester_name":"Rupendra Sharma","responder_name":"No Agent","to_emails":null,"department_name":"Alcatel Lucent","assoc_problem_id":null,"assoc_change_id":null,"assoc_change_cause_id":null,"assoc_asset_id":null,"urgency_name":"Low","impact_name":"Low","custom_field":{"raised_type_312751":null,"ticket_type_312751":null,"issue_type_312751":null,"role_312751":null,"kyvos_version_312751":null}}

Code:

function onAppActivate() {
 client.data.get("ticket")
  .then(function(data) {
	  console.info(JSON.stringify(data));

Hi @Rupendra.Sharma, Welcome to the Developer Community! :grinning:

Could you share the expected ticket data as well. By wrong data, do you mean it gives a different existing ticket’s data?
Also, could you share the App ID if you have published your custom app?

2 Likes