This section describes the public JSON formats of content items. Note that business users see content items in the Experience Manager interface as rules.
Public format for content-root
Properties in the JSON file:
Property |
Value |
Description |
---|---|---|
ecr:type |
content-root |
Required. |
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. |
Example:
{ "ecr:createDate": "2015-08-11T14:57:34.708Z", "ecr:type": "content-root" }
Public format for content-collection-folder
Properties in the JSON file:
Property |
Value |
Description |
---|---|---|
ecr:type |
content-collection-folder |
Required. |
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. |
contentType |
STRING |
Optional. Restricts the type of content-item that can be added to this folder by an Experience Manager user. |
Example:
{ "ecr:type": "content-collection-folder", "ecr:createDate": "2015-02-11T14:57:34.906Z", "contentType": "MainContent", }
Public format for content-item
Properties in the JSON file:
Property |
Value |
Description |
---|---|---|
ecr:type |
content-item |
Required. |
workflowState |
ACTIVE or INACTIVE |
Required. Describes whether this content-item can be triggered for any request. |
priority |
Positive integer. |
Required. Denotes relative priority in which this content-item can be triggered. |
previewable |
true (default) or false |
Optional. Denotes whether this content-item can be triggered in preview mode. |
startTime |
yyyy-MM-dd'T'HH:mm |
Optional. Specifies the time from when this content-item can be triggered. |
endTime |
yyyy-MM-dd'T'HH:mm |
Optional. Restricts the time until when this content-item can be triggered. If you provide value for "endTime", you must also provide value for "startTime". |
workflowNote |
string |
Optional. Contains comments about this content-item. Empty by default. |
userSegments |
array of strings |
Optional. Restricts this content-item to trigger only when a specified user-segment is present in the request. |
ecr:lastModifiedBy |
string |
Optional. User id of the user who last modified this content-item. Defaults to the user who is importing this content-item. |
ecr:lastModified |
yyyy-MM-dd'T'HH:mm:ss.SSSX |
Optional. The last time this content-item was modified. Defaults to the time at which this content-item was imported into Workbench. |
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. |
triggers |
See Triggers in the following section. |
Required. Specifies the search term/dimension value under which this content-item is triggered. Specify an array of one or more of the following types of trigger:
Specify an empty array if you are not using triggers.
Search term triggers
A search term produces a content-item when a user's query includes the search term. Properties in the JSON file are:
"exactLocation": Required. Must be a boolean (true or false). When "exactLocation" is set to true, the trigger is fired only when the search term matches the "searchTerms" value in the way specified by the "matchmode" value, and no dimension values are included in user's navigation state. When "exactLocation" is set to false, the trigger is fired when the search term is matched in the way specified by the "matchmode" value, regardless of the dimension values included in user's navigation state.
"searchTerms": Required. The search term for which the content-item should be triggered. Must be a string.
"matchmode": Required. Specifies how a user's search term is matched to the configured search-term. Valid values are "MATCHPHRASE", "MATCHEXACT", and "MATCHALL". For information about these values, see the Oracle Commerce Workbench User's Guide.
"searchTermExpansions:" Specifies the token or tokens that represent each search term and the stem or stems that each token has been reduced to. The entry for each token is uniquely identified by an index value. This property is used by the Assembler to determine which content-items and keyword redirects should trigger for a given search term. The property is generated by tokenizing a search term, and reducing each token to a representative stem. The representative stem is determined by using the Authoring Dgraph's stemming configuration. This property is for internal use only. Oracle recommends that this property not be edited manually. To update the property, run the update_search_term_expansions script. For information about when to run the script, refer to Appendix D Deployment Template Script Reference. For information about tokenization and stemming, refer to the Oracle Commerce Guided Search MDEX Engine Developer's Guide.
Examples:
"triggers": { "exactLocation": false, "searchTerms": "camera bags", "matchmode": "MATCHPHRASE", "searchTermExpansions": { "0": {"camera": ["camera"]}, "1": {"bags": ["bag"]} } }
In this example, searchTermExpansions has the format:
"tokenNumber": {"token": ["representative stems"]}
Dimension value trigger
A collection of one or more dimension values can trigger a content-item, if user's navigation state contains those dimension values. Properties in the JSON file:
"dvalIDs": Required. An array of dimension value id strings.
"exactLocation": Required. Must be a boolean. When set to true, this trigger is fired when the user's navigation state contains all the specified dimension values and no other dimension value. When set to false, this trigger is fired when all of the specified dimension values are included in the user's navigation state, but can also be fired when one or more other dimension values are in the user's navigation state.
Example:
{ "exactLocation": true, "dvalIDs": ["4294967266"] }
Search term and dimension value based trigger
A search term can trigger a content-item if user's query includes those terms and the user's navigation state contains specified dimension values. Properties in the JSON file:
"searchTerms": Required. The search term for which the content-item should be triggered. Must be a string.
"matchmode": Required. Configures how a user's search term is matched to the configured search-term. Valid values are "MATCHPHRASE", "MATCHEXACT", "MATCHALL".
"dvalIDs": Required. An array of dimension value id strings.
"exactLocation": Required. Must be a boolean (true or false). When "exactLocation" is set to true, the trigger is fired only when the user's navigation state contains all the specified dimension values and no other dimension value. When "exactLocation" is set to false, the trigger is fired when the search term is matched in the way specified by the "matchmode" value and all the specified dimension values are included in user's navigation state, regardless of the other dimension values included in user's navigation state.
"searchTermExpansions:" Specifies the token or tokens that represent each search term and the stem or stems that each token has been reduced to. The entry for each token is uniquely identified by an index value. This property is used by the Assembler to determine which content-items and keyword redirects should trigger for a given search term. The property is generated by tokenizing a search term, and reducing each token to a representative stem. The representative stem is determined by using the Authoring Dgraph's stemming configuration. This property is for internal use only. Oracle recommends that this property not be edited manually. To update the property, run the update_search_term_expansions script. For information about when to run the script, refer to Appendix D Deployment Template Script Reference. For information about tokenization and stemming, refer to the Oracle Commerce Guided Search MDEX Engine Developer's Guide.
Example:
"triggers": [ { "exactLocation": false, "searchTerms": "camera bags", "matchmode": "MATCHPHRASE", "dvalIDs": ["4294967266"], "searchTermExpansions": { "0": {"camera": ["camera"]}, "1": {"bags": ["bag"]} } } ]
In this example, searchTermExpansions has the format:
"tokenNumber": {"token": ["representative stems"]}
Example of a content-item JSON entry:
{ "ecr:type": "content-item", "workflowState": "ACTIVE", "previewable": true, "priority": 20, "startTime": "2015-04-23T17:38", "endTime": "2015-04-24T17:38", "workflowNote": "Reviewed by John B", "userSegments": ["retailCustomer"], "ecr:lastModifiedBy": "curtis", "ecr:lastModified": "2015-04-23T17:39:32.956-04:00", "ecr:createDate": "2015-03-11T14:57:34.906Z", "triggers": [ { "exactLocation": false, "searchTerms": "camera bags", "matchmode": "MATCHPHRASE", "searchTermExpansions": { "0": {"camera": ["camera"]}, "1": {"bags": ["bag"]} } }, { "exactLocation": true, "dvalIDs": ["4294967266"] } ] }
Note
A
content-item
must have a
content.xml
file associated with it. The
content.xml
file configures the
content-item
that will be returned by Assembler for
this
content-item
.