Hi,
i have a question regarding the response received after calling the endpoint for viewing a specific contact ( https://developers.freshdesk.com/api/v2/contacts/[id] ) and the usage of ID’s in lookup fields when creating a custom object record.
In the response for viewing a contact there are 3 ID’s:
- “id”: which is the freshdesk contact ID
- “visitor_id”: no idea what that is, any info on this?
- “org_contact_id”: thats an interesting one. More on that below
So in the documentation ( Freshdesk ) there isn’t that much info on the fields in the json response to this API call.
The reason this came to my attention was the following. We have created a custom object, which is connected to contacts and companies via a lookup field. I then tried to populate the custom object with records via import CSV and also via POST request to https://developers.freshdesk.com /api/v2/custom_objects/schemas/schema-id/records/
There was a problem with, what information has to be added to the lookup fields so the endpoint is accepting the payload and a new record is created.
So for contacts, it was not the “name” and not the “id” but funny enough this ominous “org_contact_id”.
For company this org_contact_id field was absent from the response for “view a company”: Freshdesk , so i tried other things and what worked was the company name.
So, really, i don’t get it. Why? Why not use the freshdesk ID which is also available from the url in the contact but use some ID nobody knows about?
Would greatly appreciate some more information on this. The only thing i could find about creating a record for a lookup field on custom objects was from this article: Adding Custom Object records in Freshdesk : Freshdesk
but here it says that that “Lookup field to Contact must have the email ID” , well yet another ID which i do not know about ^^
Thanks for your help!
Bye, Ramon