This section describes the public JSON formats of user segments.
User segments can be used to limit what particular customers can see. User-segments can be associated with particular users by any logic that is available to your application, and then passed to the Assembler as query parameters. In response to the query, the Assembler returns content that is allowed for that user-segment.
Properties in the JSON file:
Attribute |
Value | |||
---|---|---|---|---|
ecr:type |
user-segments | |||
ecr:createDate |
yyyy-MM-dd'T'HH:mm:ss.SSSX. Optional. Date and time that this item was created. Defaults to creation date of the JCR. | |||
segments |
One or more segment definitions. Each segment has the following attributes and values: | |||
Attribute |
Type |
Required |
Value | |
name |
string |
yes |
The name by which the user segment can be referenced. | |
description |
string |
no |
Text providing information about the user segment. |
The following example illustrates the exported JSON format for defining user-segments; here, two user-segments are defined, named "members" and "customers":
{ "ecr:type": "user-segments", "ecr:createDate": "2015-08-11T14:57:36.772Z", "segments": [ { "name": "members", "description":"Members only" } { "name": "customers", "description":"Returning shoppers" } ] }