> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSTicketStatusEntity

> Entity for a ticket status. This entity describes the meta data for a ticket status, and provides special operations on it.

Entity for a ticket status. This entity describes the meta data for a ticket status, and provides special operations on it.

## Constructors

### NSTicketStatusEntity()

```crmscript theme={null}
NSTicketStatusEntity
```

Initializes a new instance of the NSTicketStatusEntity class.

## Methods

## GetName()

```crmscript theme={null}
String GetName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of user defined ticket status.

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
String name = thing.GetName();
```

## GetNoEmailReopen()

```crmscript theme={null}
Bool GetNoEmailReopen()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Whether inbound emails can reopen requests with this status or not.

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Bool noEmailReopen = thing.GetNoEmailReopen();
```

## GetStatus()

```crmscript theme={null}
Integer GetStatus()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The classic ticket status (active/closed/postponed/deleted). See \<xref href="CRMScript.NetServer.TicketBaseStatus" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Integer status = thing.GetStatus();
```

## GetTicketStatusId()

```crmscript theme={null}
Integer GetTicketStatusId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The primary key (auto-incremented).

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Integer ticketStatusId = thing.GetTicketStatusId();
```

## GetTimeCounter()

```crmscript theme={null}
Integer GetTimeCounter()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Which field in ticket we count time spent on (queue, internal, external). See \<xref href="CRMScript.NetServer.TicketStatusTimeCounter" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Integer timeCounter = thing.GetTimeCounter();
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
String name;
thing.SetName(name);
```

## SetNoEmailReopen(Bool)

```crmscript theme={null}
Void SetNoEmailReopen(Bool noEmailReopen)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Bool noEmailReopen;
thing.SetNoEmailReopen(noEmailReopen);
```

## SetStatus(Integer)

```crmscript theme={null}
Void SetStatus(Integer status)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Integer status;
thing.SetStatus(status);
```

## SetTicketStatusId(Integer)

```crmscript theme={null}
Void SetTicketStatusId(Integer ticketStatusId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Integer ticketStatusId;
thing.SetTicketStatusId(ticketStatusId);
```

## SetTimeCounter(Integer)

```crmscript theme={null}
Void SetTimeCounter(Integer timeCounter)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketStatusEntity thing;
Integer timeCounter;
thing.SetTimeCounter(timeCounter);
```


## Related topics

- [NSTicketEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSTicketEntity.md)
- [NSListAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSListAgent.md)
- [Put Ticket Status Entity](/en/api/reference/restful/rest/list_ticketstatus/put-ticket-status-entity.md)
- [Delete Ticket Status Entity](/en/api/reference/restful/rest/list_ticketstatus/delete-ticket-status-entity.md)
- [Get Ticket Status Entity](/en/api/reference/restful/rest/list_ticketstatus/get-ticket-status-entity.md)
- [Post Ticket Status Entity](/en/api/reference/restful/rest/list_ticketstatus/post-ticket-status-entity.md)
