Organization-based assignment rules for tickets created via API | Community
Skip to main content

Organization-based assignment rules for tickets created via API

  • October 12, 2025
  • 1 reply
  • 0 views

Yair11

Hello,

 

We use Zendesk as our backend for ticket management, and we provide end-users the ability to create tickets via our own system. When a user submits a question through our system, we create a corresponding Zendesk ticket using the API. That ticket is created with an API Token belonging to a user within our company, which means that the tickets are associated with our own Organization, rather than with the end-user's Organization.

 

We created a custom text field (called "account") which stores the end-user's organization, and we would like to automatically assign new tickets based on the “account” field. However, as per https://support.zendesk.com/hc/en-us/articles/4408893545882-Ticket-trigger-conditions-and-actions-reference, only the Is Present / Is Not Present conditions are available for custom text fields:

 

Custom fields support a subset of operators that vary by custom field type. For all custom field types, you can check to see whether a value is present or not. Additionally,

  • Date fields support most of the other familiar operators, but only evaluate calendar days. Business schedules aren't considered.
  • For drop-down and lookup relationship fields, you can check whether a certain value is or is not set.
  • For multi-select fields, you can check whether certain values are or are not selected.

All ticket lookup relationship fields can be selected under Lookup relationships. All other types of custom fields on a ticket are available under Tickets.

 

Is there another solution for this, other than creating a drop-down custom field (which will force us to update the list of drop-down values every time a new customer joins)? Is there a recommended way of setting the Organization when creating a ticket via APIs (I saw https://support.zendesk.com/hc/en-us/articles/4408886900506-Updating-ticket-requesters-and-organizations, but this again requires us to manually assign our company's API user to each and every Organization)? Is there another best-practice for this workflow?

 

Thank you!

1 reply

Elaine14
  • January 7, 2026
Hello Yair,
 
Thank you for sharing the details of your workflow and the challenges you’re facing with organization-based assignment rules for tickets created via the API.
 
Because the tickets are created under your company's API user, they are linked to your organization rather than the end-user’s organization, which limits the ability to use triggers based on custom text fields like your “account” field.
 
As you’ve noted, custom text fields support limited operators, and the “Is Present” / “Is Not Present” conditions are the only options for text values — which makes it difficult to create dynamic assignment rules.
 
Here are a few options and best-practices to consider:
 
  1. Use Lookup Relationship Fields Instead of Text Fields:
    If possible, change your “account” custom field type from text to a Lookup Relationship field that points to the appropriate Organization. Lookup Relationship fields support more trigger conditions (e.g., “is” or “is not”), making it easier to configure assignment rules.

     

  2. Set the Ticket Requester’s Organization via API:
    When creating tickets via API, you can update the ticket requester’s organization using the endpoint discussed in Updating ticket requesters and organizations. This way, tickets will inherit the correct organization and existing organization-based triggers and assignments can operate as expected.

     

  3. Automate Organization Assignment:
    To reduce manual overhead, consider implementing an automation or middleware in your backend system that assigns the correct organization to the requester or ticket as part of the API workflow. This can be done before or immediately after ticket creation.

     

  4. Maintain a Dynamic Drop-down via API:
    If moving away from text fields isn’t feasible, you might automate the management of dropdown options through the Zendesk API to add/update drop-down values dynamically as new customers and organizations are onboarded.

     

Overall, the best practice would be to leverage Lookup Relationship fields and ensure the ticket requester’s organization is correctly assigned at ticket creation or shortly thereafter. This will allow you to use Zendesk’s native triggers and views based on organization assignment, streamlining your workflow.
 
I hope that helps!