Webhooks v2 custom field values have "id" and "value" keys depending on type

With Webhooks v2 all custom fields are inside the custom_fields object but the actual value of each custom field is an object/dictionary with the keys “value” and “type” or “id” and “type” apparently depending on if “type” has a value of “emun”. Is it intended to have different keys depending on the custom field type? Examples below

"89172871238d182..."{
     "id": 131,
    "type": "enum"
},
"89172871238d182..."{
    "type": "varchar",
    "value": "my_text_string"
}

I ask because one would expect for the dictionaries have consistent “type” and “value” keys. If this is intended, are there any other keys that would appear on these custom field dictionaries? The documentation does not specify this.

Hi @jp-apps,

We don’t have an answer to your question just yet, but I wanted to let you know that we are investigating this. I will come back as soon as I can.

1 Like

Hi @jp-apps,

Thank you for being so patient.

I had the relevant team look into your query, and yes, it is by design.

We’ve since updated our migration guide and added a section on the custom fields format in webhooks v2.

I hope this helps. Please let me know if you have any questions!