User API¶
The user API enables you to operate on user-related part of the Repository, such a segments.
Segments¶
Segments enable you to profile the content displayed to specific users.
To manage Segments, use the SegmentationService.
Getting Segment information¶
To load a Segment Group, use SegmentationService::loadSegmentGroupByIdentifier().
Get all Segments assigned to the group with SegmentationService::loadSegmentsAssignedToGroup():
1 2 3 4 5 6 | |
Similarly, you can load a Segment in a group by using SegmentationService::loadSegmentIdentifier():
1 | |
Checking assignment¶
You can check whether a User is assigned to a Segment with SegmentationService::isUserAssignedToSegment():
1 2 3 | |
Assigning Users¶
To assign a User to a Segment, use SegmentationService::assignUserToSegment():
1 | |
Creating Segments¶
Each Segment must be assigned to a Segment Group.
To create a Segment Group, use SegmentationService::createSegmentGroup()
and provide it with a SegmentGroupCreateStruct:
1 2 3 4 5 | |
To add a Segment, use SegmentationService::createSegment()
and provide it with a SegmentCreateStruct, which takes an existing group as one of the parameters:
1 2 3 4 5 | |
Updating Segments¶
To update a Segment or a Segment Group, use SegmentationService::updateSegment()
or SegmentationService::updateSegmentGroup() and provide it with SegmentUpdateStruct
or SegmentGroupUpdateStruct, respectively.
Deleting Segments¶
To delete a Segment or a Segment Group, use SegmentationService::removeSegment()
or SegmentationService::removeSegmentGroup(), respectively:
1 | |