Newer Version Available

This content describes an older version of this product. View Latest

Managed Topics

Get all the managed topics for a community. Create a managed topic, create managed topic hierarchies, and reorder managed topics.

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

Resource
1/connect/communities/communityId/managed-topics
Available version
32.0
Requires Chatter
No
HTTP methods
GET, POST, PATCH, HEAD
Request parameters for GET
To see all your managed topic hierarchies, make a GET request with the depth parameter set to 3 and the managedTopicType set to Navigational, for example:
1/connect/communities/communityId/managed-topics?depth=3&managedTopicType=Navigational
Parameter Name Type Description Required or Optional Available Version
depth Integer Specify an integer 1–3. If you specify 1, the children property of the Managed Topic response body is null. If you specify 2, the children property of the Managed Topic response body contains the direct children managed topics, if any, of the managed topic. If you specify 3, 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. Optional 35.0
managedTopic​Type String Type of managed topic.
  • Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation.
  • Navigational—Topics that display in a navigational menu in the community.

A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic.

Optional

Required if specifying recordId or depth

32.0
recordId String ID of the topic associated with the managed topics.

In version 38.0 and later, use recordIds.

Optional 35.0–37.0
recordIds List<String> List of up to 10 topic IDs associated with the managed topics. Optional 38.0
Response body for GET
Managed Topic Collection
Request body for POST
Make POST requests to create managed topics and create topic hierarchies.
Root XML tag
<managedTopic>
JSON example using recordId
This example creates a managed topic from an existing standard topic (using the recordId of the standard topic). It also creates a topic hierarchy by assigning a parent topic with the parentId.
1{
2"managedTopicType":"Navigational",
3"parentId": "0mtR000000001KLIAY",
4"recordId":"0TOD00000000cwk"
5}
JSON example using name
This example creates a new managed topic by name and creates a topic hierarchy by assigning a parent topic with the parentId.
1{
2"name":"Child Topic",
3"managedTopicType":"Navigational",
4"parentId":"0mtR000000001KLIAY"
5}
Properties
Name Type Description Required or Optional Available Version
managedTopic​Type String Type of managed topic.
  • Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation.
  • Navigational—Topics that display in a navigational menu in the community.

A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic.

You can create up to 25 managed topics per managedTopicType.

To create a child managed topic, specify Navigational as the managedTopicType and specify a parentId.

Required 32.0
name String Name of the managed topic. Required for new topics

You must specify either name or recordId. You can’t specify both.

32.0
parentId String ID of the parent managed topic.

If you specify a parentId, also specify Navigational as the managedTopicType.

You can create up to three levels (parent, direct children, and their children) of managed topics and up to 10 children managed topics per managed topic.

Optional 35.0
recordId String ID of the record to become a managed topic.

In version 32.0, recordId must be a topic ID.

Required for existing topics if the Name property isn’t used

You must specify either name or recordId. You can’t specify both.

32.0
Request parameters for POST
Parameter Name Type Description Required or Optional Available Version
managedTopic​Type String Type of managed topic.
  • Featured—Topics that are featured, for example, on the community home page, but don’t provide overall navigation.
  • Navigational—Topics that display in a navigational menu in the community.

A topic can be associated with up to two managed topic types, so a topic can be both a Featured topic and a Navigational topic.

You can create up to 25 managed topics per managedTopicType.

To create a child managed topic, specify Navigational as the managedTopicType and specify a parentId.

Required 32.0
name String Name of the managed topic. Required for new topics

You must specify either name or recordId. You can’t specify both.

32.0
parentId String ID of the parent managed topic.

If you specify a parentId, also specify Navigational as the managedTopicType.

You can create up to three levels (parent, direct children, and their children) of managed topics and up to 10 children managed topics per managed topic.

Optional 35.0
recordId String ID of the record to become a managed topic.

In version 32.0, recordId must be a topic ID.

Required if the Name property isn’t used

You must specify either name or recordId. You can’t specify both.

32.0
Response body for POST
Managed Topic
Request body for PATCH
Make a PATCH request to reorder parent managed topics or children managed topics with the same parent.
Root XML tag
<managedTopicPositionCollection>
JSON example
1{
2"managedTopicPositions" : [
3  {
4    "managedTopicId" :"0mtD0000000001aIAA",
5    "position" :"0"
6  },
7  {
8    "managedTopicId" :"0mtD0000000002qIAA",
9    "position" :"2"
10  }
11  ]
12}
Properties
Name Type Description Required or Optional Available Version
managedTopic​Positions Managed Topic Position Input[] Collection of managed topic position request bodies. This collection can include Featured and Navigational managed topics and doesn’t have to include all managed topics.

If you don’t include all managed topics in managedTopicPositions, the managed topics are reordered by respecting the positions indicated in managedTopicPositions. Any managed topics that aren’t included in managedTopicPositions are pushed down to the next available position. See Reorder managed topics example.

Required 32.0
Reorder managed topics 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 Managed Topic Position Collection Input:

Managed Topic Position
ManagedTopicD 0
ManagedTopicE 2

The result is:

Managed Topic Position
ManagedTopicD 0
ManagedTopicA 1
ManagedTopicE 2
ManagedTopicB 3
ManagedTopicC 4
Response body for PATCH
Managed Topic Collection