Skip to main content
Question

Webhook JSON set dependent field value

  • 1 July 2024
  • 4 replies
  • 61 views

Good Day! Hi, i just want to ask if how can we set value of dependent field in custom fields via JSON Format.

“custom_fields”: {
      “cf_cm_territory”: “{{tickets.cf_cm_territory}}”
}

how do i declare the cf_cm field?

4 replies

Userlevel 1
Badge +2

The request is absolutely poorly described and it is unclear what needs to be done. There is some screenshot from nowhere and it is unclear what fields there are.

 

that's why there's silence in this thread..

Userlevel 7
Badge +13

Good Day! Hi, i just want to ask if how can we set value of dependent field in custom fields via JSON Format.

“custom_fields”: {
      “cf_cm_territory”: “{{tickets.cf_cm_territory}}”
}

how do i declare the cf_cm field?

What I do is to do a GET to a ticket with the value is set and then just mimic that in the POST/PUT


To set the value of a dependent field in custom fields via JSON format, you need to ensure that you correctly reference the dependent field and its corresponding value. Here's an example of how you can declare and set the value for the cf_cm_territory field:

 

{
  "custom_fields": {
    "cf_cm_territory": "YourDesiredValue"
  }
}
In this example, replace "YourDesiredValue" with the actual value you want to assign to the cf_cm_territory field. If you want to dynamically assign the value from an existing ticket field, you can use a placeholder like {{tickets.cf_cm_territory}}, provided that the system  you're working with supports such placeholders.

Badge

Hi @djherrera211 and @Daniel Söderlund 

Greetings from Freshworks Community. :)

As per my understanding you have a dependent field in the account and you would like to pass a static value for the same instead of using a dynamic placeholder. 

As mentioned by @Alfiehenry  to have this achieved in the account we can directly pass the value that we would like to set.

For example :- 

{
  "custom_fields": {
    "cf_cm_territory": "the value that your expecting to have"
  }
}

 

Let me know if this helps.

 

Reply