I created a Webhook with a JSON body that creates a ticket by copying some values from the original ticket.
This is the code:
{
"ticket": {
"status": "open",
"group_id": 24993349,
"requester_id": 947291444,
"tags": ["{{ticket.tags}}", "ticket_clone_task"],
"subject": "{{ticket.title}}",
"custom_fields": [{"id": 23079830, "value": "{{ticket.ticket_field_23079830}}"}],
"comment": {"body": "{{ticket.comments_formatted}}"}
}
}
However, I need to copy ALL the CUSTOM FIELDS from the original ticket.
In the community I found how to individually copy the custom fields with this line of code:
"custom_fields": [{"id": 23079830, "value": "{{ticket.ticket_field_23079830}}"}],
My question is: Is there a way that copies all the custom fields? Or do I have to insert all the individual custom fields?
Thank you for your help.