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

# NSChatTopicAgent

> User agents within a chat topic. Which users are assigned and what roles they have within the chat topic. Carrier object for ChatTopicAgent.

User agents within a chat topic. Which users are assigned and what roles they have within the chat topic. Carrier object for ChatTopicAgent.

## Constructors

### NSChatTopicAgent()

```crmscript theme={null}
NSChatTopicAgent
```

Initializes a new instance of the NSChatTopicAgent class.

## Methods

## GetCanListen()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True of a user can listen in on this topic.

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canListen = thing.GetCanListen();
```

## GetCanManage()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if the user is a manager for this topic.

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canManage = thing.GetCanManage();
```

## GetCanNotify()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if the user should receive notifications for this topic.

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canNotify = thing.GetCanNotify();
```

## GetCanRespond()

True if the user can respond to chats in this topic

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

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canRespond = thing.GetCanRespond();
```

## GetTopicId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The reference to the associated chat topic.

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Integer topicId = thing.GetTopicId();
```

## GetUser()

```crmscript theme={null}
NSAssociate GetUser()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - The associate that is the user agent.

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
NSAssociate user = thing.GetUser();
```

## SetCanListen(Bool)

```crmscript theme={null}
Void SetCanListen(Bool canListen)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canListen;
thing.SetCanListen(canListen);
```

## SetCanManage(Bool)

```crmscript theme={null}
Void SetCanManage(Bool canManage)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canManage;
thing.SetCanManage(canManage);
```

## SetCanNotify(Bool)

```crmscript theme={null}
Void SetCanNotify(Bool canNotify)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canNotify;
thing.SetCanNotify(canNotify);
```

## SetCanRespond(Bool)

```crmscript theme={null}
Void SetCanRespond(Bool canRespond)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Bool canRespond;
thing.SetCanRespond(canRespond);
```

## SetTopicId(Integer)

```crmscript theme={null}
Void SetTopicId(Integer topicId)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
Integer topicId;
thing.SetTopicId(topicId);
```

## SetUser(NSAssociate)

```crmscript theme={null}
Void SetUser(NSAssociate user)
```

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

**Example:**

```crmscript theme={null}
NSChatTopicAgent thing;
NSAssociate user;
thing.SetUser(user);
```


## Related topics

- [NSChatAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSChatAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [Delete Chat Topic User Agent](/en/api/reference/restful/agent/chat_agent/delete-chat-topic-user-agent.md)
- [Add Chat Topic User Agent](/en/api/reference/restful/rest/chattopic/add-chat-topic-user-agent.md)
- [Update Chat Topic User Agent](/en/api/reference/restful/rest/chattopic/update-chat-topic-user-agent.md)
