Newer Version Available

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

Recommendation Audience

Get information about, update, and delete a recommendation audience.

Community managers (users with the “Create and Set Up Communities” or “Manage Communities” permission) can access, create, and delete audiences, definitions, and schedules for community recommendations. Users with the “Modify All Data” permission can also access, create, and delete recommendation audiences, recommendation definitions, and scheduled recommendations.

Resource
1/connect/recommendation-audiences/recommendationAudienceId
1/connect/communities/communityId/recommendation-audiences/recommendationAudienceId
Available version
35.0
Requires Chatter
No
HTTP methods
GET, HEAD, DELETE, PATCH
Response body for GET
Recommendation Audience
Request body for PATCH
Root XML tag
<recommendationAudience>
JSON example for updating a custom list recommendation audience
1{ 
2   "criteria" : {
3      "memberOperationType" : "Add",
4      "members" : {
5         "userIds" : [
6            "005B0000000Ge16",
7            "005D0000001GpHp"
8            ]
9         },
10      "type" : "CustomList"
11   },
12   "name" : "My Custom List"
13}
JSON example for updating a new members recommendation audience
1{ 
2   "criteria" : {
3      "value" : "30",
4      "type" : "MaxDaysInCommunity"
5   },
6   "name" : "New Hires"
7}
Properties
Name Type Description Required or Optional Available Version
criteria Custom List Audience Criteria Input

or

New User Audience Criteria Input

The criteria for the recommendation audience type. Optional

If not specified when creating a recommendation audience, the audience criteria type defaults to custom list.

36.0
member​OperationType String

This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input.

Important

The operation to carry out on the audience members. Values are:
  • Add—Adds specified members to the audience.
  • Remove—Removes specified members from the audience.
Required to update a recommendation audience

Don’t use or specify null to create a recommendation audience

35.0 only
members User ID Collection Input

This property is available only in version 35.0. In version 36.0 and later, use Custom List Audience Criteria Input.

Important

A collection of user IDs.

When updating an audience, you can include up to 100 members. An audience can have up to 100,000 members, and each community can have up to 100 audiences.

Required to update a recommendation audience

Don’t use or specify null to create a recommendation audience

35.0 only
name String The unique name of the recommendation audience. Optional to update a recommendation audience

Required to create a recommendation audience

35.0
Request parameters for PATCH
Parameter Name Type Description Required or Optional Available Version
name String The unique name of the recommendation audience. Required 35.0
Response body for PATCH
Recommendation Audience
Response body for DELETE
204: Successful Delete