> ## 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.

# NSChatTopicEntity

> Chat topics define who is assigned, when the channel is open for business, and look of the chat widget. Carrier object for ChatTopicEntity.

Chat topics define who is assigned, when the channel is open for business, and look of the chat widget. Carrier object for ChatTopicEntity.

## Constructors

### NSChatTopicEntity()

```crmscript theme={null}
NSChatTopicEntity
```

Initializes a new instance of the NSChatTopicEntity class.

## Methods

## GetAlertRecipient()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The recipients for the alert template.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String alertRecipient = thing.GetAlertRecipient();
```

## GetAlertTemplate()

```crmscript theme={null}
NSReplyTemplate GetAlertTemplate()
```

**Returns:** [CRMScript.NetServer.NSReplyTemplate](CRMScript.NetServer.NSReplyTemplate) - Template to use for alerts.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSReplyTemplate alertTemplate = thing.GetAlertTemplate();
```

## GetBadgeHeader()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The badge header of the chat topic.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String badgeHeader = thing.GetBadgeHeader();
```

## GetBotEnabled()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Enable chatbot on this topic. Run the trigger scripts on bot events.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool botEnabled = thing.GetBotEnabled();
```

## GetBotSettings()

```crmscript theme={null}
NSChatBotSettings GetBotSettings()
```

**Returns:** [CRMScript.NetServer.NSChatBotSettings](CRMScript.NetServer.NSChatBotSettings) - Settings for chatbot - trigger script IDs to run on bot events.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSChatBotSettings botSettings = thing.GetBotSettings();
```

## GetChatTopicId()

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

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer chatTopicId = thing.GetChatTopicId();
```

## GetCollectConsent()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Collect consent to store from user.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool collectConsent = thing.GetCollectConsent();
```

## GetCustomQueueText()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - A text to be used in the queue message in the chat widget. Usage is controlled by the flags field, bit number 3.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String customQueueText = thing.GetCustomQueueText();
```

## GetCustomQueueTextEnabled()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Use the custom queue message text.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool customQueueTextEnabled = thing.GetCustomQueueTextEnabled();
```

## GetDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The description for this topic.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String description = thing.GetDescription();
```

## GetLanguage()

```crmscript theme={null}
NSCustomerLanguage GetLanguage()
```

**Returns:** [CRMScript.NetServer.NSCustomerLanguage](CRMScript.NetServer.NSCustomerLanguage) - Customer language used in this topic. Optional.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSCustomerLanguage language = thing.GetLanguage();
```

## GetLastAccept()

```crmscript theme={null}
DateTime GetLastAccept()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The last time a session was accepted from the inside for this topic.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
DateTime lastAccept = thing.GetLastAccept();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of this chat topic.

**Example:**

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

## GetOpeningHours()

```crmscript theme={null}
NSChatOpeningHours GetOpeningHours()
```

**Returns:** [CRMScript.NetServer.NSChatOpeningHours](CRMScript.NetServer.NSChatOpeningHours) - Opening hours settings.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSChatOpeningHours openingHours = thing.GetOpeningHours();
```

## GetOpeningHoursEnabled()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Whether to use opening hours or not.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool openingHoursEnabled = thing.GetOpeningHoursEnabled();
```

## GetSecondsPrAccept()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The average number of seconds per accept for this topic.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer secondsPrAccept = thing.GetSecondsPrAccept();
```

## GetTicketCategory()

```crmscript theme={null}
NSTicketCategory GetTicketCategory()
```

**Returns:** [CRMScript.NetServer.NSTicketCategory](CRMScript.NetServer.NSTicketCategory) - Category on ticket created from off-line request.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSTicketCategory ticketCategory = thing.GetTicketCategory();
```

## GetTicketEnabled()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Enable ticket submission in offline mode.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool ticketEnabled = thing.GetTicketEnabled();
```

## GetTicketPriority()

```crmscript theme={null}
NSTicketPriority GetTicketPriority()
```

**Returns:** [CRMScript.NetServer.NSTicketPriority](CRMScript.NetServer.NSTicketPriority) - Priority on ticket created from off-line request.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSTicketPriority ticketPriority = thing.GetTicketPriority();
```

## GetWarnManagerNewChatMinutes()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Contains the manager notify time in minutes.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer warnManagerNewChatMinutes = thing.GetWarnManagerNewChatMinutes();
```

## GetWarnNewChatMinutes()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Contains the user notify time in minutes.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer warnNewChatMinutes = thing.GetWarnNewChatMinutes();
```

## GetWelcomeMessage()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The welcome message sent to the customer when the chat session starts.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String welcomeMessage = thing.GetWelcomeMessage();
```

## GetWidget()

```crmscript theme={null}
NSChatWidgetSettings GetWidget()
```

**Returns:** [CRMScript.NetServer.NSChatWidgetSettings](CRMScript.NetServer.NSChatWidgetSettings) - Settings for the chat widget.

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSChatWidgetSettings widget = thing.GetWidget();
```

## SetAlertRecipient(String)

```crmscript theme={null}
Void SetAlertRecipient(String alertRecipient)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String alertRecipient;
thing.SetAlertRecipient(alertRecipient);
```

## SetAlertTemplate(NSReplyTemplate)

```crmscript theme={null}
Void SetAlertTemplate(NSReplyTemplate alertTemplate)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSReplyTemplate alertTemplate;
thing.SetAlertTemplate(alertTemplate);
```

## SetBadgeHeader(String)

```crmscript theme={null}
Void SetBadgeHeader(String badgeHeader)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String badgeHeader;
thing.SetBadgeHeader(badgeHeader);
```

## SetBotEnabled(Bool)

```crmscript theme={null}
Void SetBotEnabled(Bool botEnabled)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool botEnabled;
thing.SetBotEnabled(botEnabled);
```

## SetBotSettings(NSChatBotSettings)

```crmscript theme={null}
Void SetBotSettings(NSChatBotSettings botSettings)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSChatBotSettings botSettings;
thing.SetBotSettings(botSettings);
```

## SetChatTopicId(Integer)

```crmscript theme={null}
Void SetChatTopicId(Integer chatTopicId)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer chatTopicId;
thing.SetChatTopicId(chatTopicId);
```

## SetCollectConsent(Bool)

```crmscript theme={null}
Void SetCollectConsent(Bool collectConsent)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool collectConsent;
thing.SetCollectConsent(collectConsent);
```

## SetCustomQueueText(String)

```crmscript theme={null}
Void SetCustomQueueText(String customQueueText)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String customQueueText;
thing.SetCustomQueueText(customQueueText);
```

## SetCustomQueueTextEnabled(Bool)

```crmscript theme={null}
Void SetCustomQueueTextEnabled(Bool customQueueTextEnabled)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool customQueueTextEnabled;
thing.SetCustomQueueTextEnabled(customQueueTextEnabled);
```

## SetDescription(String)

```crmscript theme={null}
Void SetDescription(String description)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String description;
thing.SetDescription(description);
```

## SetLanguage(NSCustomerLanguage)

```crmscript theme={null}
Void SetLanguage(NSCustomerLanguage language)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSCustomerLanguage language;
thing.SetLanguage(language);
```

## SetLastAccept(DateTime)

```crmscript theme={null}
Void SetLastAccept(DateTime lastAccept)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
DateTime lastAccept;
thing.SetLastAccept(lastAccept);
```

## SetName(String)

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

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

**Example:**

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

## SetOpeningHours(NSChatOpeningHours)

```crmscript theme={null}
Void SetOpeningHours(NSChatOpeningHours openingHours)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSChatOpeningHours openingHours;
thing.SetOpeningHours(openingHours);
```

## SetOpeningHoursEnabled(Bool)

```crmscript theme={null}
Void SetOpeningHoursEnabled(Bool openingHoursEnabled)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool openingHoursEnabled;
thing.SetOpeningHoursEnabled(openingHoursEnabled);
```

## SetSecondsPrAccept(Integer)

```crmscript theme={null}
Void SetSecondsPrAccept(Integer secondsPrAccept)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer secondsPrAccept;
thing.SetSecondsPrAccept(secondsPrAccept);
```

## SetTicketCategory(NSTicketCategory)

```crmscript theme={null}
Void SetTicketCategory(NSTicketCategory ticketCategory)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSTicketCategory ticketCategory;
thing.SetTicketCategory(ticketCategory);
```

## SetTicketEnabled(Bool)

```crmscript theme={null}
Void SetTicketEnabled(Bool ticketEnabled)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Bool ticketEnabled;
thing.SetTicketEnabled(ticketEnabled);
```

## SetTicketPriority(NSTicketPriority)

```crmscript theme={null}
Void SetTicketPriority(NSTicketPriority ticketPriority)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSTicketPriority ticketPriority;
thing.SetTicketPriority(ticketPriority);
```

## SetWarnManagerNewChatMinutes(Integer)

```crmscript theme={null}
Void SetWarnManagerNewChatMinutes(Integer warnManagerNewChatMinutes)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer warnManagerNewChatMinutes;
thing.SetWarnManagerNewChatMinutes(warnManagerNewChatMinutes);
```

## SetWarnNewChatMinutes(Integer)

```crmscript theme={null}
Void SetWarnNewChatMinutes(Integer warnNewChatMinutes)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
Integer warnNewChatMinutes;
thing.SetWarnNewChatMinutes(warnNewChatMinutes);
```

## SetWelcomeMessage(String)

```crmscript theme={null}
Void SetWelcomeMessage(String welcomeMessage)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
String welcomeMessage;
thing.SetWelcomeMessage(welcomeMessage);
```

## SetWidget(NSChatWidgetSettings)

```crmscript theme={null}
Void SetWidget(NSChatWidgetSettings widget)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicEntity thing;
NSChatWidgetSettings widget;
thing.SetWidget(widget);
```


## Related topics

- [NSChatAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSChatAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [Delete Chat Topic Entity](/en/api/reference/restful/rest/chattopic/delete-chat-topic-entity.md)
- [Post Chat Topic Entity](/en/api/reference/restful/rest/chattopic/post-chat-topic-entity.md)
- [Get Chat Topic Entity](/en/api/reference/restful/rest/chattopic/get-chat-topic-entity.md)
- [Default Chat Topic Entity](/en/api/reference/restful/rest/chattopic/default-chat-topic-entity.md)
