Freshservice: Updating a custom field on a requester record with webhook

We are looking to automate the process of updating a custom field in the Requestor record.

I created a checkbox field on the requestor record so that it is either true or false (clicking on it manually set the field as “Yes”).
I created a Service Request where a user can “agree” to a ticket.
Then I created a workflow automator to look for that specific service request and what I’m looking to do is create a webhook that would set this flag for lack of a better word to true.

What I’ve tried so far:
I’m using a PUT type API webhook.
The callback URL is /api/v2/requesters/{{ticket.requester.id}}
Using JSON encoding.
If I use Simple content, I can see my custom field, but selecting it doesn’t seem to do anything. However it gives me the name of my custom field ( {{ticket.requester.cf_mobile_phone_stipend_recipient}} )
I have tried a couple of ways using advanced content such as the following examples:
Example! 1:
{
“requester”: {
“id”: {{ticket.requester.id}},
“Mobile Phone Stipend Recipient”: true
}
}
Example 2
{
“requester”: {
“id”: {{ticket.requester.id}},
{{ticket.requester.cf_mobile_phone_stipend_recipient}} : true
}
}
Example 3
{
“id”: {{ticket.requester.id}},
“Mobile Phone Stipend Recipient”: true
}

Example 4

{
{{ticket.requester.cf_mobile_phone_stipend_recipient}} : true
}

All failed. I’m not sure if it is my syntax, if it’s setting the checkbox flag as “true” or if I need to set it as something else, or if it’s something else entirely.

Hi @jimstojkov

Welcome to Freshworks developer community!

Can you try without cf_ ?

Also, Can you let me know whether you get the requester id from tickets API? If so, the ticket object will have requester_id field so you can use ticket.requester_id

Hi Mughela,
thanks for the reply! Just for clarification, which example would you like for me to test with?
Also, using the ticket.requester_id, do you mean in my API url string, or in one of the examples where I am setting the “id”:? I got the ticket.requester.id from the placeholders that freshservice provides.

I assume that I will get the requester id from the ticket once the automator activates based on the ticket creation.

Just as a note, I tried the following and it failed:

{
{{ticket.requester.mobile_phone_stipend_recipient}} : true
}

And several variations on the examples above with id and removing the cf