Help with search syntax : OR | Community
Skip to main content

Help with search syntax : OR

  • January 30, 2024
  • 7 replies
  • 0 views

Hi,

I am trying to do an OR search in zendesk and cannot seem to get full list of tickets. 

I need to search for a numerical value that may or may not have a letter attached to it.

Can someone help with the syntax to get a complete list of tickets containing this information?

Example :  search for tickets containing 123456 OR C123456.

 

7 replies

Brett13
  • Community Manager
  • January 31, 2024
Hey Daniela, you should be able to just use "123456" "C123456" as your search parameter. The quotes will look for an exact match and the space between the two acts as the OR operator. 
 
Let me know if that doesn't get you what you're looking for. Cheers!

Zoho
  • February 27, 2024

@brett13

This OR search was not working when I use the two different fields in the query param. 

example: (query=organization_id:17641448189073 OR type:ticket). In this case it shows like no result found. But if i try like (query=organization_id:17641448189073 type:ticket). It internally uses the "AND" search and I'm getting results for this exact match.

Could you Please check with the developers? For the correct match.


  • March 2, 2024

For Combining Different Fields with OR Logic:
- When you tried (query=organization_id:17641448189073 OR type:ticket), and it didn't return the expected results, it's likely because of how Zendesk interprets OR between different field types.

Correct Syntax and Approach:
- For Numerical Value OR Prefixed: Use 123456 OR "C123456" directly in the search bar in the Support interface. Ensure there's no space before or after OR to avoid confusion.  Based on your reply, that space may be the issue here.  
- For Different Fields (e.g., organization_id OR type): Ensure you're using the correct field names and that the syntax follows Zendesk's guidelines. If direct OR queries aren't working, consider:
Breaking down your search into two parts and manually combining the results.


Bryan21
  • March 18, 2025

Also reporting that the suggested OR search (`"search_term_1" “search_term_2”`) uses AND.

 

Is this a bug?


  • April 7, 2025

@brett13 please review as we're not seeing the OR function work properly on our instance either. For example, when I try to search for one of 3 different keywords, ZenDesk search returns the confused robots saying “Something went wrong”.


  • April 7, 2025

Hi, this works for me ( Field_1:"A" OR Field_X:"B" )  Field_2:"C" Field_3:"D",

It’s looking for items where (Field_1 is "A" or Field_X is "B") and Field_2 is "C" and Field_3 is "D".

 


Himanshu14
  • September 24, 2025

This OR search was not working when I use the two different fields in the query param. 

Ex : organization_id:xxxx  OR  group_id: xxxx

Can someone please look into this and help with correct syntax