ManagedTopics Class
Namespace
ManagedTopics Methods
createManagedTopic(communityId, recordId, managedTopicType)
API Version
32.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopic createManagedTopic(String communityId, String recordId, ConnectApi.ManagedTopicType managedTopicType)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- recordId
- Type: String
- ID of the topic.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Specify the type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
You can create up to 25 Featured and 5,000 Content topics. You can create up to eight levels of Navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 Navigational topics.
Return Value
Type: ConnectApi.ManagedTopic
Usage
Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.
createManagedTopic(communityId, recordId, managedTopicType, parentId)
API Version
35.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopic createManagedTopic(String communityId, String recordId, ConnectApi.ManagedTopicType managedTopicType, String parentId)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- recordId
- Type: String
- ID of the topic.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Specify Navigational for the type of managed
topic to create a child managed topic.
You can create up to 25 Featured and 5,000 Content topics. You can create up to eight levels of Navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 Navigational topics.
- parentId
- Type: String
- ID of the parent managed topic.
You can create up to eight levels (parent, direct children, their children, etc.) of managed topics and up to 10 children managed topics per managed topic.
Return Value
Type: ConnectApi.ManagedTopic
Usage
Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.
createManagedTopicByName(communityId, name, managedTopicType)
API Version
32.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopic createManagedTopicByName(String communityId, String name, ConnectApi.ManagedTopicType managedTopicType)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- name
- Type: String
- Name of the topic.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Specify the type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
A topic can be associated with all three managed topic types, so a topic can be a Featured, Navigational, and Content topic.
You can create up to 25 Featured and 5,000 Content topics. You can create up to eight levels of Navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 Navigational topics.
Return Value
Type: ConnectApi.ManagedTopic
Usage
Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.
createManagedTopicByName(communityId, name, managedTopicType, parentId)
API Version
35.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopic createManagedTopicByName(String communityId, String name, ConnectApi.ManagedTopicType managedTopicType, String parentId)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- name
- Type: String
- Name of the topic.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Specify Navigational for the type of managed
topic to create a child managed topic.
You can create up to 25 Featured and 5,000 Content topics. You can create up to eight levels of Navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 Navigational topics.
- parentId
- Type: String
- ID of the parent managed topic.
You can create up to eight levels (parent, direct children, their children, etc.) of managed topics and up to 10 children managed topics per managed topic.
Return Value
Type: ConnectApi.ManagedTopic
Usage
Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.
deleteManagedTopic(communityId, managedTopicId)
API Version
32.0
Requires Chatter
No
Signature
public static deleteManagedTopic(String communityId, String managedTopicId)
Parameters
Return Value
Type: Void
Usage
Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can delete managed topics.
getManagedTopic(communityId, managedTopicId)
API Version
32.0
Available to Guest Users
32.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopic getManagedTopic(String communityId, String managedTopicId)
Parameters
Return Value
Type: ConnectApi.ManagedTopic
getManagedTopic(communityId, managedTopicId, depth)
API Version
35.0
Available to Guest Users
35.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopic getManagedTopic(String communityId, String managedTopicId, Integer depth)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicId
- Type: String
- ID of managed topic.
- depth
- Type: Integer
- Specify an integer 1–8. If you specify 1, the children property of the ConnectApi.ManagedTopic output class is null. If you specify 2, the children property of the ConnectApi.ManagedTopic output class contains the direct children managed topics, if any, of the managed topic. If you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. If depth isn’t specified, it defaults to 1.
Return Value
Type: ConnectApi.ManagedTopic
getManagedTopics(communityId)
To get the content topics for an Experience Cloud site, use getManagedTopics(communityId, managedTopicType).
API Version
32.0
Available to Guest Users
32.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
Return Value
getManagedTopics(communityId, managedTopicType)
API Version
32.0
Available to Guest Users
32.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
A topic can be associated with all three managed topic types, so a topic can be a Featured, Navigational, and Content topic.
If you specify Content, up to 50 topics are returned. If you want more than 50 Content topics, use getManagedTopics(communityId, managedTopicType, pageParam, pageSize).
Return Value
getManagedTopics(communityId, managedTopicType, depth)
API Version
35.0
Available to Guest Users
35.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, Integer depth)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
A topic can be associated with all three managed topic types, so a topic can be a Featured, Navigational, and Content topic.
- depth
- Type: Integer
- Specify an integer 1–8. If you specify 1, the children property of the ConnectApi.ManagedTopic output class is null. If you specify 2, the children property of the ConnectApi.ManagedTopic output class contains the direct children managed topics, if any, of the managed topic. If you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. If depth isn’t specified, it defaults to 1.
Return Value
getManagedTopics(communityId, managedTopicType, recordIds, depth)
API Version
38.0
Available to Guest Users
38.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, List<String> recordIds, Integer depth)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
A topic can be associated with all three managed topic types, so a topic can be a Featured, Navigational, and Content topic.
- recordIds
- Type: List<String>
- A list of up to 100 topic IDs associated with the managed topics.
If you list more than 10 topic IDs, you can’t specify 2–8 for depth.
- depth
- Type: Integer
- Specify an integer 1–8. If you specify 1, the children property of the ConnectApi.ManagedTopic output class is null. If you specify 2, the children property of the ConnectApi.ManagedTopic output class contains the direct children managed topics, if any, of the managed topic. If you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. If depth isn’t specified, it defaults to 1.
Return Value
getManagedTopics(communityId, managedTopicType, pageParam, pageSize)
API Version
44.0
Available to Guest Users
44.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, Integer pageParam, Integer pageSize)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
A topic can be associated with all three managed topic types, so a topic can be a Featured, Navigational, and Content topic.
- pageParam
- Type: Integer
- Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default size is 50.
Return Value
reorderManagedTopics(communityId, managedTopicPositionCollection)
API Version
32.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection reorderManagedTopics(String communityId, ConnectApi.ManagedTopicPositionCollectionInput managedTopicPositionCollection)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicPositionCollection
- Type: ConnectApi.ManagedTopicPositionCollectionInput
- A collection of relative positions of managed topics. This collection can include only Featured and Navigational topics and doesn’t have to include all managed topics.
Return Value
Usage
Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can reorder managed topics.
You can reorder parent managed topics or children managed topics with the same parent. If you don’t include all managed topics in the ConnectApi.ManagedTopicPositionCollectionInput, the managed topics are reordered by respecting the positions indicated in the ConnectApi.ManagedTopicPositionCollectionInput and then by pushing down any managed topics that aren’t included in the ConnectApi.ManagedTopicPositionCollectionInput to the next available position.
Example
If you have these managed topics:
Managed Topic | Position |
---|---|
ManagedTopicA | 0 |
ManagedTopicB | 1 |
ManagedTopicC | 2 |
ManagedTopicD | 3 |
ManagedTopicE | 4 |
And you reorder managed topics by including this information in ConnectApi.ManagedTopicPositionCollectionInput:
Managed Topic | Position |
---|---|
ManagedTopicD | 0 |
ManagedTopicE | 2 |
The result is:
Managed Topic | Position |
---|---|
ManagedTopicD | 0 |
ManagedTopicA | 1 |
ManagedTopicE | 2 |
ManagedTopicB | 3 |
ManagedTopicC | 4 |
Retired ManagedTopics Methods
getManagedTopics(communityId, managedTopicType, recordId, depth)
API Version
35.0–37.0
Available to Guest Users
35.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, String recordId, Integer depth)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- managedTopicType
- Type: ConnectApi.ManagedTopicType
- Type of managed topic.
- Content—Topics that are associated with native content.
- Featured—Topics that are featured, for example, on the Experience Cloud site home page, but don’t provide overall navigation.
- Navigational—Topics that display in a navigational menu in the Experience Cloud site.
A topic can be associated with all three managed topic types, so a topic can be a Featured, Navigational, and Content topic.
- recordId
- Type: String
- ID of the topic associated with the managed topics.
- depth
- Type: Integer
- Specify an integer 1–8. If you specify 1, the children property of the ConnectApi.ManagedTopic output class is null. If you specify 2, the children property of the ConnectApi.ManagedTopic output class contains the direct children managed topics, if any, of the managed topic. If you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. If depth isn’t specified, it defaults to 1.