facetoe / zenpy

Python wrapper for the Zendesk API
GNU General Public License v3.0
340 stars 162 forks source link

Can't assign form id when creating a ticket #529

Open tomeroszlak opened 1 year ago

tomeroszlak commented 1 year ago

Hey, I'm creating a ticket with the following options: crash_ticket: Ticket = Ticket( ticket_form_id=EMERGENCY_FORM_ID, requester=requester, subject="new crash ticket", comment=first_comment, )

But it doesn't open the ticket with the form id, this is what ZenPy is sending to ZenDesk: {'json': {'ticket': {'custom_fields': [{'id': 1500002836061, 'value': 'Yes'}, {'id': 1500002887542, 'value': 'Yes'}, {'id': 360024121454, 'value': ['us', '1003', '134']}], 'id': None, 'requester_id': 399773503114, 'subject': 'new crash ticket', 'tags': ['crash', 'noc-team'], 'comment': {'body': "A ZenDesk ticket was created by tomer.oszlak \nTicket subject - testing \n Service affected - ['Create rider', 'Cannot Access VOC', 'Rider page'] \n City name - ['us', '1003', '134'] \n Multiple users affected? - False \n Can you recreate the issue? - Yes \n More information - testing new flow", 'id': None, 'public': True}, 'requester': {'email': 'viacrashbot@mail.com', 'id': 399773503114, 'name': 'via crash bot'}}}, 'timeout': 60.0, 'headers': None}

There is another option to open a ticket with a specific form id?

ahmedsabriz commented 1 year ago

Although multiple forms are available on Suite Growth and above, the API reference mentions this is an enterprise only property.