Recent searches


No recent searches

Zenpy - Port content from Sandbox to live environment



Posted Aug 27, 2021

Hi,

I am using Zenpy in an effort to port data from my Sandbox to live environment. My goal is port over:

  • Ticket Fields
  • Ticket Forms
  • Triggers
  • Automations

When I attempt to create the TicketField, I get the following error:

zenpy.lib.exception.APIException: {"error": "RecordInvalid", 
"description": "Record validation errors", "details": {"title": 
[{"description": "Title: cannot be blank", "error": "BlankValue"}]}}

Some code for what I am trying:

field = zenpy_box.ticket_fields(id='1900000103174') 
created_field = zenpy_prd.ticket_fields.create(field)

When I print the serialised object, I get the below output:

{'id': 1900000103174, 'custom_field_options': [{'id': 
1900000392114}, {'id': 1900000392134}, {'id': 1900000392154}, {'id': 
1900000392174}, {'id': 1900000392194}]}

Based on that, I can see that the serialised object doesn't have any of the fields required.

This may be down to a lack of Python knowledge on my part, but I would appreciate if anyone could let me know if what I am trying to achieve is possible?

Best regards
Stephen


1

1

1 comment

image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Stephen! I haven't done any work with zenpy, but I see that you posted on the dev's repo which is what I was going to recommend if the next thing I said didn't work.

It seems that you're trying to create a new ticket field, however you're passing in an ID value which means that it's trying to update a ticket field that doesn't exist. I'm not entirely sure how to pass the title in zenpy, however based on this, it may be that you pass the title instead of the id. Could you give that a shot and let me know what happens?

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post