Skip to content

Add support for idempotency keys when creating tickets#808

Open
aleksei-averchenko-wise wants to merge 6 commits intocloudbees-oss:masterfrom
aleksei-averchenko-wise:create-ticket-idempotency-key
Open

Add support for idempotency keys when creating tickets#808
aleksei-averchenko-wise wants to merge 6 commits intocloudbees-oss:masterfrom
aleksei-averchenko-wise:create-ticket-idempotency-key

Conversation

@aleksei-averchenko-wise
Copy link

@aleksei-averchenko-wise aleksei-averchenko-wise commented Mar 19, 2026

This change implements support for Zendesk's idempotency key
feature
when creating tickets. I happen to need to use this feature myself :)

What's Changed

  • Clients can now set an idempotency key on Ticket objects before creation
  • The client automatically sends the Idempotency-Key header to the API
  • The response is parsed to determine if this was a new ticket creation or a duplicate request
  • New fields on Ticket:
    • getIdempotencyKey() / setIdempotencyKey(String) - the idempotency key
    • getIsIdempotencyHit() / setIsIdempotencyHit(Boolean) - whether this was a duplicate request

See the usage example in the README.

Caveat

The current implementation doesn't properly update idempotencyKey and isIdempotencyHit when creating a ticket via queueCreateTicketAsync. I don't know what the best approach would be here, any comments are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant