Comments (2)
I know the documentation definitely needs work! I hope to get some more done soon.
You can set the tags and description when creating the ticket by passing them as parameters when creating the Ticket object:
ticket = Ticket(subject='test', description='testing', tags=['sometag', 'anothertag'])
Unfortunately my test Zendesk account has expired so I can't test this, however I believe you can poll the JobStatus object to retrieve the ticket ID's as they are created. For example (untested and ugly code):
tickets_created = 10
ticket_ids = []
job_status = zenpy.tickets.create([Ticket(subject="Ticket%s" % i, description="Bulk")for i in range(0, tickets_created)])
loop = True
while loop:
for status in job_status.results:
if status.index == tickets_created -1:
loop = False
break
if status.success:
ticket_ids.append(status.id)
else:
print status.details
sleep(1)
if loop:
job_status = zenpy.job_status(id=job_status.id)
for ticket in zenpy.tickets(ids=ticket_ids):
# Do things with tickets here
Unfortunately Zendesk doesn't return a complete object when using bulk creation, which would make things a little easier.
Also, you might want to pull the latest version as I've fixed a small bug with the Status object.
Let me know if you have any trouble!
from zenpy.
Thank you!
from zenpy.
Related Issues (20)
- zenpy 2.0.27 not installs dependencies of require_installs HOT 4
- Migrate HC APIs to CBP by default HOT 1
- 'async' on ticket creation does not return id of the ticket HOT 6
- CBP update breaking incremental exports HOT 4
- install fails for me on python3.6.15 since zenpy 2.0.26 HOT 6
- CBP update satisfaction_ratings broken HOT 5
- Add more tests to Help Centre objects recently added to ZenPy
- Calling ticket metrics is raising an error HOT 4
- users.incremental() doesn't behave like tickets.incremental() HOT 7
- Fail to create many new users HOT 5
- Add lilnter to Zenpy HOT 3
- Create or Update many users does not work HOT 16
- Incremental API does not work, when passing `datetime.datime` HOT 6
- Ticket cannot be rated HOT 7
- Search export support for page[size] parameter HOT 4
- Users incremental endpoint is missing the cursor attribute HOT 3
- [Feature Request] zenpy to support cache backends HOT 4
- Setting ticket status to "pending" but the UI creates an "open" ticket HOT 14
- Question: Is it possible for me to simulate a conversation between a client and an Agent. HOT 1
- [Question] Facing a weird issue while creating a ticket HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenpy.