Automatically adding Custom Ticket Field data to a new ticket | Community
Skip to main content

Automatically adding Custom Ticket Field data to a new ticket

  • March 22, 2021
  • 2 replies
  • 0 views

Casey12

Hello,

I've followed the instructions over here and have created a new ticket automatically using the http target + JSON method:

JSON body:

{"ticket": { "subject": "DealDash FedEx Claim Request: {{ticket.ticket_field_27729152}}", "public": true, "comment" : {"body": "Test Test Test \n Testing testing testing"}, "priority": "high", "status": "new", "requester":
{"name": "{{ticket.requester.name}}", "email": "{{ticket.requester.email}}"}}}

However I have Custom Ticket Field data that I want to copy over from the existing ticket to the new ticket into the same Custom Ticket Field when using the assigned trigger - I'm quite noob with coding so I've no idea if this is possible or not - any information would be hugely appreciated.

Thank you in advance :)

2 replies

Integriq
  • March 22, 2021

Hi @Casey,

Try this

 { "ticket":
{ "subject": "DealDash FedEx Claim Request: {{ticket.ticket_field_27729152}}",
"public": true,
"description": "this is my content.",
"priority": "high",
"status": "new",
"custom_fields": [{"id": 27729152, "value": "{{ticket.ticket_field_27729152}}"}]
} }

Replace id's with correct custom field id

Hope this helps!!

-sushant


Casey12
  • Author
  • March 23, 2021

Hi @Sushant Awalekar

Thank you! This helps immensely! I appreciate you taking the time to look into this for me - I may be back to ask more questions in future XD

Have a great day!