ManagedTopics Class

Get managed topics in an Experience Cloud site. Create, delete, and reorder managed topics.

ConnectApi

These methods are for ManagedTopics. All methods are static.

Create a managed topic of a specific type for an Experience Cloud site.

32.0

No

public static ConnectApi.ManagedTopic createManagedTopic(String communityId, String recordId, ConnectApi.ManagedTopicType managedTopicType)

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.

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.

Type: ConnectApi.ManagedTopic

Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.

Create a child managed topic for an Experience Cloud site.

35.0

No

public static ConnectApi.ManagedTopic createManagedTopic(String communityId, String recordId, ConnectApi.ManagedTopicType managedTopicType, String parentId)

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.

Type: ConnectApi.ManagedTopic

Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.

Create a managed topic of a specific type by name for an Experience Cloud site.

32.0

No

public static ConnectApi.ManagedTopic createManagedTopicByName(String communityId, String name, ConnectApi.ManagedTopicType managedTopicType)

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.

Type: ConnectApi.ManagedTopic

Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.

Create a child managed topic by name for an Experience Cloud site.

35.0

No

public static ConnectApi.ManagedTopic createManagedTopicByName(String communityId, String name, ConnectApi.ManagedTopicType managedTopicType, String parentId)

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.

Type: ConnectApi.ManagedTopic

Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can create managed topics.

Delete a managed topic from an Experience Cloud site.

32.0

No

public static deleteManagedTopic(String communityId, String managedTopicId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

managedTopicId

Type: String

ID of managed topic.

Type: Void

Only community managers (users with the Create and Set Up Experiences or Manage Experiences permission) can delete managed topics.

Get a managed topic in an Experience Cloud site.

32.0

32.0

No

public static ConnectApi.ManagedTopic getManagedTopic(String communityId, String managedTopicId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

managedTopicId

Type: String

ID of managed topic.

Type: ConnectApi.ManagedTopic

Get a managed topic, including its parent and children managed topics, in an Experience Cloud site.

35.0

35.0

No

public static ConnectApi.ManagedTopic getManagedTopic(String communityId, String managedTopicId, Integer depth)

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.

Type: ConnectApi.ManagedTopic

Get the featured and navigational managed topics for an Experience Cloud site.

To get the content topics for an Experience Cloud site, use getManagedTopics(communityId, managedTopicType).

32.0

32.0

No

public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

Type: ConnectApi.ManagedTopicCollection

Get managed topics of the specified type for an Experience Cloud site.

32.0

32.0

No

public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType)

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

Type: ConnectApi.ManagedTopicCollection

Get managed topics of the specified type, including their parent and children managed topics, in an Experience Cloud site.

35.0

35.0

No

public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, Integer depth)

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.

Type: ConnectApi.ManagedTopicCollection

Get managed topics of the specified type, including their parent and children managed topics, that are associated with topics in an Experience Cloud site.

38.0

38.0

No

public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, List<String> recordIds, Integer depth)

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.

Type: ConnectApi.ManagedTopicCollection

Get a page of managed topics.

44.0

44.0

No

public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, Integer pageParam, Integer pageSize)

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.

Type: ConnectApi.ManagedTopicCollection

Reorder the relative positions of managed topics in an Experience Cloud site.

32.0

No

public static ConnectApi.ManagedTopicCollection reorderManagedTopics(String communityId, ConnectApi.ManagedTopicPositionCollectionInput managedTopicPositionCollection)

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.

Type: ConnectApi.ManagedTopicCollection

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.

If you have these managed topics:

Managed TopicPosition
ManagedTopicA0
ManagedTopicB1
ManagedTopicC2
ManagedTopicD3
ManagedTopicE4

And you reorder managed topics by including this information in ConnectApi.ManagedTopicPositionCollectionInput:

Managed TopicPosition
ManagedTopicD0
ManagedTopicE2

The result is:

Managed TopicPosition
ManagedTopicD0
ManagedTopicA1
ManagedTopicE2
ManagedTopicB3
ManagedTopicC4

These methods for ManagedTopics are retired.

Get managed topics of the specified type, including their parent and children managed topics, that are associated with a given topic in an Experience Cloud site.

35.0–37.0

In version 38.0 and later, use getManagedTopics(communityId, managedTopicType, recordIds, depth).

35.0

No

public static ConnectApi.ManagedTopicCollection getManagedTopics(String communityId, ConnectApi.ManagedTopicType managedTopicType, String recordId, Integer depth)

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.

Type: ConnectApi.ManagedTopicCollection