Freshdesk Delete contact with trigger webhook

Hi community,

I am trying to delete a contact by using a wehbook automation in Freshdesk.

When I know the ID of the contact, the webhook is working, example: /api/v2/contacts/123456, but I don’t know how to generalize for any contact ID. There is no contact ID on the placeholder list of Contacts

and I have tried with /api/v2/contacts/{{id}} and /api/v2/contacts/[id]

Neither of them delete the contact. What is the correct placeholder for the ID of the contact?

Thank you

1 Like

Hi @sara.gutierrez.lopez,
Good day!
To delete the contact you need to find the contact ID first,
here is the way to find the contact search_contacts or filter contacts with this you can retrieve the Id of the contact then you can refer this doc to soft delete the contact or you can refer this doc to hard delete

Hope it helps :slight_smile:

Thanks

Hi @Santhosh,

Thank you for your answer. The problem is that I need to delete the specific contact after one month that ticket is closed. So I can setup a time trigger for the month to check a checkbox but then I need to delete the contacts which has those checkboxes checked on the ticket. My thinking was, in automations, to setup the rule “for all tickets with the checkbox checked, delete the contact” but then is where I am missing the contact ID in the api request. Maybe what I am trying is not possible at all.

you can try another way, → you can add a custom property on the ticket and when the contact is assigned, add the contact Id to that custom property, in your automation, you can get the contact Id.

Hope it helps :slight_smile:

Thanks

Hi @Santhosh ,
but the problem still the contact ID that does not exist as a placeholder, so I am in the same situation as before.
To understand the flow:
When ticket is created, I only have the option to do a trigger webhook, GET or PUT. If I GET by filtering the contact ID, I can not store it. If I do an update on the ticket to update a custom field, I don’t have the contact ID. So there is no option I think, to get the contact ID and post it on a custom field.

It won’t but you can add it as a custom placeholder and add the contact Id via the app, using product events.