Newer Version Available
Personalization Targets
Get a list of targets that match the context user, based on the
audiences that include the user. Create and update targets.
- Resource
-
1/connect/communities/communityId/personalization/targets - Available version
- 47.0
- Requires Chatter
- No
- HTTP methods
- GET, POST, PATCH
- Request parameters for GET
-
Parameter Name Type Description Required or Optional Available Version domain String Name of the user’s Salesforce custom domain. If not specified, no audience targets with domain criteria are returned. Optional 47.0 includeAllMatchingTargetsWithinGroup Boolean Specifies whether to include all the matching targets within a target group (true) or not (false). If not specified, the default is false. If false, the first matching target within each group, based on priority within the group, is returned. Optional 47.0 includeAudience Boolean Specifies whether to include the matching audience (true) or not (false). If not specified, the default is false. Optional 47.0 ipAddress String IP address of the user. If not specified, no audience targets with location criteria are returned. Optional 47.0 publishStatus String Publish status of the target. Values are: - Draft
- Live
Optional 47.0 recordId String ID of the record, if you want to specify field based criteria in audiences. Optional 47.0 targetTypes String[] Comma-separated list of target types to filter the results. In API version 47.0 and later, supported values include ExperienceVariation and custom object API names, such as CustomObjectName__c. If not specified, all target types are returned. For more information on the ExperienceVariation target type, see ExperienceBundle in the Metadata API Developer Guide.
Optional 47.0 userId String ID of the user. If not specified, the default is the ID of the context user. Optional 47.0 - Request body for POST
-
Create targets using POST with the Target Collection Input.
- Root XML tag
- <targetCollection>
- JSON example
-
1{ 2 "targets": [{ 3 "audienceId":"6AuRM0000004D5w0AE", 4 "groupName":"2b8bc305-d415-49f9-8e24-814455427324", 5 "priority":1, 6 "publishStatus":"Draft", 7 "targetType":"ExperienceVariation", 8 "targetValue":"ContactSupport_ContactSupportForCalifornia_Page" 9 } 10 ] 11} - Properties
-
Name Type Description Required or Optional Available Version targets Target Input[] List of targets to create. Required 47.0
- Request body for PATCH
-
Update targets, such as assigning audiences to targets, using PATCH with the Target Collection Update Input.
- Root XML tag
- <targetCollection>
- JSON example
-
1{ 2 "targets": [{ 3 "audienceId":"6AuRM0000004D5w0AE", 4 "priority":1, 5 "targetId":"6AtRM0000000II30AM" 6 } 7 ] 8} - Properties
-
Name Type Description Required or Optional Available Version targets Target Update Input[] List of targets to update. Required 47.0
- Response body for GET, POST, and PATCH
- Target Collection