AI Ticket Categorization Crate
What does the AI Ticket Categorization Crate do?
This Crate uses AI to automatically determine the best categorization for newly created PSA tickets. Once a category is identified, the Crate updates the ticket with the suggested categorization, simplifying ticket management and improving organizational efficiency.
Choose the AI model to use for ticket analysis, as this Crate works with both OpenAI and Anthropic.
Customize AI's maximum tokens used using organization variables.
Enable or disable error reporting directly on the ticket.
This Crate does not resolve tickets or make changes outside of categorization. It strictly assigns ticket types based on ticket details and records notes for reference. Any further ticket modifications or actions must be handled manually.
How the Crate works
The Crate workflow is triggered by a webhook whenever a new ticket is created in the PSA system.
It collects ticket details, such as ID, title, and description, to prepare for categorization.
AI recommends the most suitable ticket type and subtype based on the content and context of the ticket.
The workflow updates the ticket type and leaves an internal note summarizing the analysis results and documenting any errors or issues.
Workflow breakdown
The workflow begins with the START task using the noop action, which establishes the defined PSA by checking context variables and organization defaults.
The check_default_psa task using the noop action validates that a PSA is configured, either from context or organization variables, and routes to failure if no PSA is found.
The set_model task using the noop action configures the AI model settings, determining which model to use based on organization variables or defaults, and sets up token mapping for the selected model.
The is_model_set task using the noop action verifies that an AI model has been properly configured and routes to failure if no model is detected.
The get_max_tokens task using the noop action retrieves the maximum token limit for the AI model from organization variables or predefined model limits.
The is_max_tokens_set task using the noop action checks if max tokens are configured and either proceeds or logs a warning about potential issues.
If max tokens are not set, the max_tokens_not_set task using the noop action logs a warning message about the missing configuration.
The get_ticket_variables task using the [REWST - TASK] AI:Format PSA Ticket Variables action extracts and formats ticket information including ID, title, description, and queue from the trigger data.
The get_note task using the [REWST - TASK] PSA:Get Note Information action retrieves additional ticket note information and user messages from the PSA system.
The get_types_and_subtypes task using the [REWST - TASK] Get Ticket Types action fetches available ticket types and subtypes from the PSA based on the ticket queue.
The get_openai_data task using the [REWST - TASK] Select AI Prompt Provider action sends the ticket information to the AI service for categorization analysis and receives structured categorization results.
If the AI returns an error, the set_error_ticket_note task using the noop action prepares error information for ticket notation.
The update_ticket_type task using the [REWST - TASK] OpenAI Update Ticket Type action applies the AI-determined categorization to the ticket, updating type, subtype, and category fields in the PSA.
The set_ticket_note task using the noop action prepares the categorization reasoning for addition to the ticket as an internal note.
The list_errors_in_ticket task using the noop action determines whether error information should be added to the ticket based on configuration.
If errors should be shown, the update_ticket_note task using the [REWST - TASK] Update Ticket Internal Note action adds the categorization reasoning or error information as an internal note to the ticket.
If ticket updating is disabled, the ticket_error_updating_disabled task using the noop action provides a bypass path.
Any failures in the process route through the failed task using the noop action, which consolidates error handling.
The workflow concludes with the END task using the noop action, which compiles all logging information and generates the final automation log with status codes, success indicators, and detailed execution results.
Crate prerequisites
Before unpacking the Crate, you'll need to have the integration for one of the following PSAs set up:
If you're using a PSA that isn't on this list, please let us know. Our support team will look at whether it has the ability to trigger an automation based on a ticket being created.
Remember, you can also set up an Azure instance of OpenAI, and use that with this Crate. If you want to use an Azure instance of OpenAI with this Crate, you'll need to follow the Azure OpenAI Integration Setup steps to have this completed before unpacking.
Unpack the OpenAI Ticket Categorization Crate
Navigate to Crates > Crate Marketplace in the left side menu of the Rewst platform.
Search for
AI Ticket Categorization.
Click on the Crate tile to begin unpacking.
Click Unpack Crate.

Choose your desired PSA from the drop-down selector. This is especially important for customers using multiple PSAs.
Choose the AI provider that you wish to use from the drop-down selector.
Choose the AI provider again in the AI Provider drop-down selector. Choose the AI Model of that provider that you would like to use with the Crate.
Choose if you would like to Report errors in ticket when unable to utilize AI.
Click Continue.
Triggers for all possible PSAs are included in this Crate. By default, they're disabled, and only the PSA indicated by your choice in the drop-down selector used in the previous step will be enabled.


Test the Crate
Create a ticket in your PSA with a typical description and summary.

Organization variables associated with this Crate
These organization variables give you more control over the functionality of this workflow.
ORG.VARIABLES.ticket_cat_max_tokens- Allows you to manually set the max tokensORG.VARIABLES.ai_model_ticket_cat- Allows you to manually set the model
Increase the success rate of categorization
Creating more types, subtypes, and items in your PSA will give OpenAI more choices to choose from to better fit the response.
Choosing a different model may improve your response. Note that different models have different price points. See more on OpenAI's model pricing here.
Last updated
Was this helpful?

