Menu Close Menu
Menu
  • 0
    • Number of items in cart: 0

      • Your cart is empty.
      • Total: $0.00
      • Checkout
  • Pricing
    • Purchase Options
    • Individual Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Blog

Creating Custom Ticket Statuses

Creating Custom Ticket Statuses

Create your own statuses to be assigned to tickets

Sometimes the four statuses that are included within KB Support core are not enough to support your workflow and you need to add more.

If this applies to you, you can purchase the Custom Ticket Status extension which provides an easy to use GUI interface to add your statuses as well as enabling actions to be taken when a ticket is placed into the custom status.

Alternatively, if you are a coder and would prefer to programmatically add custom statuses yourself without additional actions, read on.

Adding your Custom Status

In order to add your custom status and be able to assign tickets to the new status, you need to hook into the Wordpress init action and call the register_post_status() function…

/**
 * Add the 'Parked' status for tickets
 *
 * @return	void
 */
function kbs_example_add_custom_ticket_status()	{
	$status = 'parked'; // Should be lower case
	$args   = array(
		'label'                     => __( 'Parked', 'text-domain' ),
		'public'                    => true,
		'exclude_from_search'       => false,
		'show_in_admin_all_list'    => true,
		'show_in_admin_status_list' => true,
		'label_count'               => _n_noop( 'Parked <span class="count">(%s)</span>', 'Parked <span class="count">(%s)</span>', 'text-domain' ),
		'kb-support'                => true, // This tells KBS that it is a ticket status
		'kbs_select_allowed'        => true  // Needs to be true for the status to be selectable when editing tickets
	);

	register_post_status( $status, $args );
}
add_action( 'init', 'kbs_example_add_custom_ticket_status' );

If the kbs_select_allowed argument is set to false, the new status cannot be selected when editing a ticket and the only way to assign the new status to a ticket is programmatically. For example, during a custom scheduled cron task.


Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

Creating Custom Ticket Statuses

Sometimes the four statuses that are included within KB Support core are not enough to support your workflow and you need to add more. If this applies to you, you can purchase the Custom Ticket Status extension which provides an easy to use GUI interface to add your statuses as well as enabling actions to…
KB Article rating: 3.5 based on 2 ratings
Advanced Tickets Workflow Last updated: 05/03/2017

Published by Cristian Raiber

Posts by Cristian Raiber

Post navigation

Previous

Changing Ticket Status Labels

Next

Updating Premium Extensions

Contact Details

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Developer Resources

Plugin Boilerplate

Trello Board

GitHub Repository

Ratings & Satisfaction Docs

  • Configuring Ratings and Satisfaction
  • Advanced Settings

Email Support Docs

  • Plugin Requirements
  • Configuring Email Support
  • Creating New Tickets
  • Replying to Closed Tickets
  • Anonymous Replies in Email Support
  • HTML Emails Tags
  • Email Commands
  • Defining IMAP Flags

KBS REST API Docs

  • Using the REST API
  • Tickets REST API Route
  • Replies REST API Route
  • Articles REST API Route
  • Agents REST API Route
  • Customers REST API Route
  • Companies REST API Route
  • Forms REST API Route
  • Form Fields REST API Route
  • Ticket Categories REST API Route
  • Ticket Departments REST API Route
  • Ticket Source REST API Route

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs
© 2023 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Privacy Policy
  • Discount Code