Example Structure of How to Use OR - Zendesk Explore Calculated Attribute
Example Structure of How to Use OR
Support - Updates History Calculated Attribute
Shows how to match tickets when either of multiple conditions is true.
Business value & use cases
Shows how OR broadens logic so that tickets are included if any condition is true. Useful when you want to capture tickets that might need attention for more than one reason. Provides a flexible template you can adapt to many different support scenarios. This example flags tickets either placed On-hold or rated Bad in satisfaction.
Dataset and dependencies
- Dataset: Support - Updates History (syntax applies to any dataset)
- Type: Calculated Attribute
- Dependencies: None (standalone attribute)
The code
Unlock to view full code
Not sure how to work with the code? Check our getting started guides.
Implementation steps
- Go to Explore > Report Builder > Support - Updates History Dataset > Start Report.
- Select the Calculator icon for Calculations.
- Choose Standard calculated attribute.
- Paste in the code above.
- Replace the field names or values with ones relevant to your tickets.
- Validate and save.
Validation tips
- Confirm that tickets marked On-hold or Bad satisfaction are categorized as "Requires Attention" (or whatever you change the fields to).
- Add Ticket ID as a row to see individual tickets that are being returned as results.
- Check that tickets not matching either condition are grouped under "No Attention Required".
- Test tickets where both conditions apply to ensure classification is consistent.
Caveats and considerations
OR expands the scope: only one condition needs to be met. Always ensure the field names you enter in the code match exactly how they are stored in Zendesk. Adjust the logic to fit your own criteria for which tickets require extra focus. Consider using the KPI chart type to display the Requires Attention number as a key stand-out metric on a dashboard.
Example chart
Example showing tickets flagged by OR logic for follow-up
Related metrics / attributes
Example Structure of How to Use AND
Example Structure of How to Use IF, AND, OR, THEN and ELSE
Now share real-time data with your team
Give agents a real-time view of key data from all your tools to help them win the day.