Custom status field | Community
Skip to main content

Custom status field

  • February 17, 2023
  • 14 replies
  • 0 views

ArunrajMM

I have two question.
1. We have enabled custom ticket status fields, and I see one more option as New on ticket creation page, but I deactivated custom status fields, but still I am seeing New as a option, how to revert the changes?
2. We are using REST API for getting ticket fields using below API, here we are getting both status and Ticket status fields, how we can Identify whether customer start using new status field or not from REST API.

{domain}/api/v2/ticket_fields.json

14 replies

Eric27
  • February 17, 2023
Hey ArunrajMM,

The "new" status type is a default type. Are you saying that a ticket type that is linked to the "new" type won't get deactivated?

Thanks!

ArunrajMM
  • Author
  • February 17, 2023

Hi Eric,

Seems "new" is not default type, please refer below API response.

Default status

{
      "url": "https://{domain}/api/v2/ticket_fields/360011798991.json",
      "id": 360011798991,
      "type": "status",
      "title": "Status",
      "raw_title": "Status",
      "description": "Request status",
      "raw_description": "Request status",
      "position": 3,
      "active": true,
      "required": false,
      "collapsed_for_agents": false,
      "regexp_for_validation": null,
      "title_in_portal": "Status",
      "raw_title_in_portal": "Status",
      "visible_in_portal": false,
      "editable_in_portal": false,
      "required_in_portal": false,
      "tag": null,
      "created_at": "2018-10-08T23:50:42Z",
      "updated_at": "2018-11-09T11:48:36Z",
      "removable": false,
      "agent_description": null,
      "system_field_options": [
        {
          "name": "Open",
          "value": "open"
        },
        {
          "name": "Pending",
          "value": "pending"
        },
        {
          "name": "On-hold",
          "value": "hold"
        },
        {
          "name": "Solved",
          "value": "solved"
        }
      ],
      "sub_type_id": 1,
      "key": null
    },

Custom status field response

{
      "url": "{domain}/api/v2/ticket_fields/9646352731412.json",
      "id": 9646352731412,
      "type": "custom_status",
      "title": "Ticket status",
      "raw_title": "Ticket status",
      "description": "Request ticket status",
      "raw_description": "Request ticket status",
      "position": 9999,
      "active": true,
      "required": false,
      "collapsed_for_agents": false,
      "regexp_for_validation": null,
      "title_in_portal": "Ticket status",
      "raw_title_in_portal": "Ticket status",
      "visible_in_portal": false,
      "editable_in_portal": false,
      "required_in_portal": false,
      "tag": null,
      "created_at": "2022-09-27T13:51:00Z",
      "updated_at": "2022-09-27T13:51:00Z",
      "removable": false,
      "agent_description": null,
      "key": null,
      "custom_statuses": [
        {
          "url": "{domain}/api/v2/custom_statuses/11271231.json",
          "id": 11271231,
          "status_category": "new",
          "agent_label": "New",
          "end_user_label": "Open",
          "description": "Ticket is awaiting assignment to an agent",
          "end_user_description": "We are working on a response for you",
          "active": true,
          "default": true,
          "created_at": "2021-10-19T21:32:26Z",
          "updated_at": "2021-10-19T21:32:26Z"
        },
        {
          "url": "{domain}/api/v2/custom_statuses/11271251.json",
          "id": 11271251,
          "status_category": "open",
          "agent_label": "Open",
          "end_user_label": "Open",
          "description": "Staff is working on the ticket",
          "end_user_description": "We are working on a response for you",
          "active": true,
          "default": true,
          "created_at": "2021-10-19T21:32:26Z",
          "updated_at": "2021-10-19T21:32:26Z"
        },
        {
          "url": "{domain}/api/v2/custom_statuses/11271271.json",
          "id": 11271271,
          "status_category": "pending",
          "agent_label": "Pending",
          "end_user_label": "Awaiting your reply",
          "description": "Staff is waiting for the requester to reply",
          "end_user_description": "We are waiting for you to respond",
          "active": true,
          "default": true,
          "created_at": "2021-10-19T21:32:26Z",
          "updated_at": "2021-10-19T21:32:26Z"
        },
        {
          "url": "{domain}/api/v2/custom_statuses/11271291.json",
          "id": 11271291,
          "status_category": "hold",
          "agent_label": "On-hold",
          "end_user_label": "Open",
          "description": "Staff is waiting for a third party",
          "end_user_description": "We are working on a response for you",
          "active": true,
          "default": true,
          "created_at": "2021-10-19T21:32:26Z",
          "updated_at": "2021-10-19T21:32:26Z"
        },
        {
          "url": "{domain}/api/v2/custom_statuses/11271311.json",
          "id": 11271311,
          "status_category": "solved",
          "agent_label": "Solved",
          "end_user_label": "Solved",
          "description": "The ticket has been solved",
          "end_user_description": "This request has been solved",
          "active": true,
          "default": true,
          "created_at": "2021-10-19T21:32:26Z",
          "updated_at": "2021-10-19T21:32:26Z"
        }
      ]
    },

The custom status field has "new" as a status type.

My second question is, we have enabled the custom status field and then we deactivated it, but still on the Zendesk page we are seeing the "Submit as New" option, its not the default status.

From API, how to identify whether one account using default status or start using a custom status field, from API I didn't notice any difference.


Eric27
  • February 17, 2023
Hey ArunrajMM,

I can understand your confusion. Though this is found under the custom ticket status, it is indeed a default. We talk about this here, specifically that it cannot be deactivated.

Hope this clears things up. 

ArunrajMM
  • Author
  • February 17, 2023

Hey Eric,

Thanks for the clarification, so going forward while creating a ticket using rest API, we will directly start using the below custom status field instead of the default(existing) status field, and we no need to care about whether the user starts using a new custom field or not, and even if the account is created before we introduce custom status field (before Jan 17, 2023)? is my understanding correct?

id": 9646352731412,
"type": "custom_status",

 


ArunrajMM
  • Author
  • February 17, 2023

Eric,

And another question, 

In /api/v2/ticket_fields.json API, why we received two status fields?

"type": "status",
"title": "Status",
"raw_title": "Status",

And

"id": 9646352731412,
"type": "custom_status",
"title": "Ticket status",

If you guys remove the unwanted status field from the API response, that will be helpful for us to avoid making an unnecessary decision on our code base.


ArunrajMM
  • Author
  • February 22, 2023

Hey Eric,

Do we have any update on this?


Eric27
  • March 1, 2023
Hey ArunrajMM,

Apologies, I've been on holiday. The "status" field is the legacy system field. We will not be removing this as it would break legacy integrations and applications that customers have built. This is really a personal choice on what you'd prefer to use. If your application is only going to be using the default status fields, then you might as well just use the status type as they're all available to it. We have no plans to deprecate this field so you're safe to use it in perpetuity. If you're going to be setting tickets to custom statuses for customers, then use the custom_status field.
 

ArunrajMM
  • Author
  • March 1, 2023

Eric,

Thanks for your response, do we have any API to identify which field customer using right now, default status or custom_status field?


Eric27
  • March 1, 2023
If you called the custom_status endpoint and see that there are more values that are active outside the defaults, you would know that they're using it. 

ArunrajMM
  • Author
  • March 1, 2023

When I hit this API, I am getting a forbidden error

https:{domain}/api/v2/custom_statuses

Response:

403

{
"error": {
"title": "Forbidden",
"message": "You do not have access to this page. Please contact the account owner of this help desk for further help."
}
}
 
Why I am not able to get the response, and I have admin role, am I use the proper API?

Eric27
  • March 1, 2023
Hey ArunrajMM,

Without knowing what you're trying to do and seeing the call it's tough for me to say. Feel free to open up a ticket and the support team should be able to help.

Thanks

ArunrajMM
  • Author
  • March 2, 2023

Hey Eric,

In one of our test accounts, we are able to activate/deactivate the Custom Ticket Status feature and we added one new custom status value too.

Below is the response for the API {domain}}/api/v2/ticket_fields.json when the Custom Ticket Status is activated and deactivated.

When Activated:

{
      "id": 360011798991,
      "type": "status",
      "title": "Status",
      "active": true,

{     "id": 9646352731412,
      "type": "custom_status",
      "title": "Ticket status",
      "active": true,


When Deactivated:

{
      "id": 360011798991,
      "type": "status",
      "title": "Status",
      "active": true,

{     "id": 9646352731412,
      "type": "custom_status",
      "title": "Ticket status",
      "active": true,


If you notice the response in both cases, we always get the `custom_status` along with the attribute `active: true`.

As you suggested, the below API is to know custom statusus, before activating the custom status feature we received a 403 error, which is fine and once we enable the feature, we start receiving responses, and we again deactivate the feature, but we still getting a response.

{domain}}/api/v2/custom_statuses.json
Sample response

{
    "custom_statuses": [
        {
            "id": 11271231,
            "status_category": "new",


We need to know the following Is there a way to know if the Custom Ticket Status is active or inactive for an account? If yes, how do we identify that in the APIs above?


Eric27
  • March 2, 2023
Hey ArunrajMM,

You can call the account settings endpoint and see if the feature is enabled/disabled in the tickets object.

 

ArunrajMM
  • Author
  • March 2, 2023

Great, much helpful.