Build New Ticket
The "Build New Ticket" action intelligently determines if a new ticket should be created based on a reference ticket and a set of custom instructions. If creation is warranted, it prepares the necessary data for the new ticket.
This action is invaluable for automating ticket creation in specific scenarios, such as when a user reopens a previously closed issue or when a complex request needs to be broken down into multiple tickets. It ensures consistency and reduces manual effort by pre-filling ticket details based on your defined logic.
This action is available only as a Triggered action in a workflow.
What It Does
- Analyzes Reference Ticket: Examines the content and context of a provided reference ticket.
- Evaluates Instructions: Uses custom instructions to decide whether a new ticket creation is necessary.
- Determines New Ticket Details: If a new ticket is to be created, it determines its properties (e.g., title, board, status, priority, description) based on the instructions and the reference ticket.
- Prepares Ticket Data: Outputs the structured data for the new ticket, which can then be used by the "Create New Ticket" action to actually generate the ticket in your PSA.
- Provides Reasoning: Outputs messages explaining why a ticket was (or was not) built.
How It Works
The "Build New Ticket" action orchestrates the BuildTicketAgent
to make an informed decision about creating a new ticket. Here's a breakdown of the process:
1. Input Data
The action takes BuildTicketInput
, which primarily consists of:
- The
default_data
(aPsaTicket
object): This is the reference ticket that the action will analyze. instructions
: A string containing your custom logic that guides the AI. These instructions dictate the conditions under which a new ticket should be created and how its fields should be populated.
2. Ticket Analysis and AI Decision
- The
BuildTicketAgent
gathers comprehensive context from thereference_ticket
, including its content and metadata. - It fetches available PSA metadata options, such as lists of Boards, Statuses, and Priorities, to provide relevant choices to the AI.
- An AI model is invoked using specialized internal prompts. These prompts combine your
instructions
, thereference_ticket_context
, theavailable_options
for metadata, and current datetime information. - The AI evaluates this information to decide if a new ticket should be built and, if so, determines all the necessary details for the
NewTicketToBeCreated
object (e.g., title, board ID, status ID, priority ID, description). It can be instructed to use details from the reference ticket or apply new values as per your instructions.
3. Output Structure
- If a new ticket is to be created, its
description
will automatically include a reference to the original ticket (e.g., "Ticket Reference: T20240101.0001"). - The action returns a
BuildTicketOutput
object. This object includes:default_messages_for_msp
: Internal messages detailing the outcome and reasoning.default_messages_for_dashboard
: Summary messages for the Event History.default_tickets_to_create
: A list containing one or moreNewTicketToBeCreated
objects. This data is then consumed by a subsequent "Create New Ticket" action to persist the ticket in the PSA.
Configuration Fields
When you add the "Build New Ticket" action to a workflow, you'll configure the following:
default_data
The ticket that serves as a reference for building the new ticket. In a Triggered workflow, this is typically the ticket that initiated the workflow.
instructions
Detailed instructions guiding the AI on when and how to create a new ticket. This is where you define the logic for:
- Deciding if a new ticket should be created (e.g., if the reference ticket is a re-opened issue, if it matches certain keywords, or if it's a specific type of request).
- Specifying the properties of the new ticket, such as its
title
,board
,status
,priority
, anddescription
. - Instructing the AI to use specific details from the reference ticket (e.g., same company, contact) or to apply new values. (default: Pre-filled with an example for re-opened tickets)
Output Fields
This action makes the following information available to subsequent actions in the workflow, primarily through the BuildTicketOutput
model:
default_messages_for_msp
A list of WorkflowMessages
objects intended for internal MSP use. These messages typically contain the reasoning provided by the AI for why a ticket was built or not, and any other relevant details about the process.
default_messages_for_dashboard
A list of strings that will be displayed on the Neo Dashboard in the Event History. These messages provide a summary of the action's execution and its outcome.
default_tickets_to_create
A list of NewTicketToBeCreated
objects. Each object in this list contains all the necessary data to create a new ticket in your PSA. This output is typically passed directly to the "Create New Ticket" action. The NewTicketToBeCreated
object includes fields such as:
reference_ticket_id
: The ID of the original ticket used as a reference.title
: The title for the new ticket.company_id
: The company ID for the new ticket.status_id
: The status ID for the new ticket.board_id
: The board ID for the new ticket.priority_id
: The priority ID for the new ticket.description
: The description for the new ticket (will include a reference to the original ticket).contact_id
(optional): The contact ID for the new ticket.source_id
(optional): The source ID for the new ticket.
Use Cases
Automatically Re-opening Tickets
Scenario: A customer replies to an email thread for a ticket that has already been closed. Instructions Example:
- Create a new ticket if the reference ticket is identified as reopening an issue for a closed ticket.
- Use the same details as the reference ticket for the new ticket.
- Append " [Re-opened Ticket]" to the title to clearly mark as a reopened ticket.
Workflow:
- Trigger on "New Email Received" or "Ticket Note Created".
Build New Ticket
: Uses the above instructions.Create New Ticket
: Creates the ticket in the PSA using the output from "Build New Ticket".- (Optional)
Notify Users
: Inform the relevant team about the re-opened ticket.
Splitting Complex Requests
Scenario: A new ticket comes in for onboarding a new employee, which involves setting up a workstation and separately ordering software licenses. Instructions Example:
Create a new ticket if the reference ticket is related to onboarding and mentions that the customer needs a new workstation.
Use the same details as the reference ticket for the new ticket, except for title, which should be 'New Workstation for <customer_name>'.
(You might have another "Build New Ticket" action with similar instructions for software licenses, or handle it in a more complex instruction set). Workflow:
- Trigger on "New Ticket Created".
Build New Ticket
(Workstation): With instructions to create a ticket for the new workstation.Create New Ticket
(Workstation).- (Potentially another pair of
Build New Ticket
/Create New Ticket
for licenses).
Creating On-Site Visit Tickets
Scenario: An incoming ticket describes an issue that diagnostics reveal cannot be resolved remotely. Instructions Example:
Create a new ticket if the reference ticket indicates an issue that cannot be resolved remotely and requires an on-site visit.
Mark the ticket as High Priority and set the title to 'Schedule Site Visit at <company_name>'
Assign it to the 'Field Services' board and 'Scheduled' status.
Workflow:
- Trigger on "New Ticket Created" or "Ticket Status Updated" (e.g., after initial diagnostics).
Build New Ticket
: With instructions to create the on-site visit ticket.Create New Ticket
.- (Optional)
Dispatch Ticket
/Assign Ticket
: To assign the new on-site visit ticket.
Best Practices
- Be Specific in Instructions: The more detailed and clear your
instructions
are, the more accurately the AI will build the new ticket. Provide conditions for when to create the ticket and how to populate its fields (title, description, board, status, priority, etc.). - Utilize Reference Ticket Context: Instruct the AI to use information from the reference ticket (e.g., company, contact, original description) when appropriate for the new ticket.
- Define PSA Metadata: You can explicitly tell the AI which Board, Status, and Priority to use by name or ID within the instructions. The AI has access to the available options in your PSA.
- Always Follow with "Create New Ticket": The "Build New Ticket" action only prepares the data for a new ticket. You must use the "Create New Ticket" action afterwards to actually create the ticket in your PSA.
- Test Thoroughly: Test your workflow with various reference tickets and instruction sets to ensure it behaves as expected in different scenarios.
- Iterate on Instructions: If the AI isn't building tickets exactly as you want, refine your instructions. Small changes in wording can significantly impact the outcome.
- Use
current_date
,current_time
,current_weekday
: The AI has access to the current date, time, and weekday. You can use these in your instructions for time-sensitive logic (e.g., "If it's Friday afternoon, set priority to High"). - Review Event History: Check the Event History for the
default_messages_for_dashboard
output to understand the AI's reasoning, especially if a ticket wasn't built as expected.