Skip to main content
Question

Correct webhook for company_id in Freshdesk ticket API?

  • August 29, 2025
  • 4 replies
  • 48 views

Forum|alt.badge.img

I am attempting to set up a Webhook Freshdesk automation to PUT ticket data into my CRM. I need the company_ID in the data but cannot get anything to come through with the other fields.

I have tried all of the following:

  • {{ticket.contact.company_id}}
  • {{ticket.contact.companyid}}
  • {{ticket.company.id}}}
  • {ticket.company_id}}
  • {{company_id}}
  • {{ticket.contact.department_id}}

None of these returns any value at all. What is the correct tag for pushing the ID of the company?

4 replies

mrsimon007
Community Debut
Forum|alt.badge.img+1
  • Community Debut
  • October 25, 2025

In Freshdesk, the company ID isn’t exposed directly as a liquid placeholder in automation webhooks. That’s why none of those variables work. The best workaround is to use {{ticket.company.name}} (which is supported) and then have your CRM look up the ID based on that name.If you really need the numeric ID, you’d have to use the Freshdesk API to fetch the ticket details (GET /api/v2/tickets/{{ticket.id}}) — that response includes "company_id". Unfortunately, automations alone can’t pass it directly in webhook payloads.


Forum|alt.badge.img
  • Author
  • Contributor
  • October 27, 2025

In the end what I did was use the contact_id and then and then looked up the company in our CRM that the contact was associated with. Unfortunately not every name in our system has a Freshdesk ID because clients have new employees all the time, and Company Name in Freshdesk doesn’t always match the way it gets entered into the CRM either. It is definitely a bummer not to be able to pull the ID, as that would be rock solid.


Alvaoep
Community Debut
  • Community Debut
  • October 30, 2025

Having trouble pulling company information via those ticket variables! Anyone else face this? I found that sometimes relying on a custom field on the ticket directly, populated by a workflow based on the requester's email domain, works. Messy, but effective for my use case. Anyone else have better luck with any of those out of the box? Feels random, a bit like Basket Random .


Robert William
Community Debut
  • Community Debut
  • October 30, 2025
 

It sounds like you’re very close — Freshdesk’s placeholder structure can be tricky, especially for nested fields like company data. In most cases, the correct variable should be {{ticket.company.id}}, but this only works if the company field is actually populated in the ticket context. You might want to confirm that the ticket has a linked company record and that the automation event has access to that object. If not, a pre-processing step (like an API call to fetch company info before the webhook) could solve the issue.

hope it will sole the issue. By, the way im enjoying coffee.