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:

Example:

{
  "ecr:createDate": "2015-08-11T14:57:34.708Z",
  "ecr:type": "content-root"
}

Public format for content-collection-folder

Properties in the JSON file:

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.

contentitem

Content item property node

Required. Allows JSON nodes: ecr:type, @type, @name, ContentItem Property Nodes

@type

String

Optional. The folder name where the template resides.

@name

String

Required. Rule name that appears in Experience Manager.

Contentitem Property Node

Property type.

Optional. Allows JSON nodes: [ @propertyType, @class, value ]. Key names can consist of alphanumeric, underscore, hyphen, period & colon characters and can either start with alphabetic or underscore characters.

@class

String

Optional. Describes the property class.

ContentItemList type

Property value type.

Optional. Allows JSON nodes:, ContentItem, maxContentItems

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.

userSegments

String array

Optional. Restricts content item to specific audiences.

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.

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:

Examples:

"triggers": [
        {
            "exactLocation": false,
            "searchTerms": "canon",
            "matchmode": "MATCHPHRASE",
            "searchTermExpansions": [{"canon": ["canon"]}]
        },
        ]

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:

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:

Example:

"triggers": [
        {
            "exactLocation": false,
            "searchTerms": "canon",
            "matchmode": "MATCHPHRASE",
            "searchTermExpansions": [{"canon": ["canon"]}]
        },
        {
            "exactLocation": true,
            "dvalIDs": ["4294967266"]
        }
    ]

In this example, searchTermExpansions has the format: "tokenNumber": {"token": ["representative stems"]}

Example of a content-item JSON entry:

{
    "workflowState": "ACTIVE",
    "ecr:lastModifiedBy": "admin",
    "ecr:lastModified": "2016-09-12T17:33:55.912+05:30",
    "priority": 20,
    "ecr:createDate": "2016-09-12T17:33:55.912+05:30",
    "ecr:type": "content-item",
    "contentItem": {
        "@name": "Two-Column Page",
        "metaKeywords": "camera cameras electronics",
        "@type": "TwoColumnPage",
        "title": "Discover Electronics",
        "metaDescription": "Oracle Commerce reference application.",
        "redirectGroup": "",
        "headerContent": [{
            "ruleLimit": "1",
            "@name": "Search Box",
            "templateTypes": ["AutoSuggestPanel"],
            "minAutoSuggestInputLength": "3",
            "@type": "SearchBox",
            "contentPaths": ["/content/Shared/Auto-Suggest Panels"]
        }],
        "mainContent": [
            {
                "@name": "Promotional Banner Slot",
                "ruleLimit": "1",
                "templateTypes": ["MainContent"],
                "@type": "ContentSlotMain",
                "contentPaths": ["/content/Web/General/Promotional Banners"]
            },
            {
                "@name": "Digital Cameras Spotlight",
                "maxNumRecords": "10",
                "@type": "HorizontalRecordSpotlight",
                "seeAllLinkText": "See All Digital Cameras",
                "showSeeAllLink": true,
                "title": "Featured Digital Cameras",
                "recordSelection": {
                    "augment": false,
                    "@class": "com.endeca.infront.cartridge.RecordSpotlightSelection",
                    "filterState": {
                        "@class": "com.endeca.infront.navigation.model.FilterState",
                        "navigationFilters": ["101045"]
                    },
                    "sortOption": {
                        "@class": "com.endeca.infront.navigation.model.SortOption",
                        "label": "product.analytics.total_sales | Descending",
                        "sorts": [{
                            "@class": "com.endeca.infront.navigation.model.SortSpec",
                            "key": "product.analytics.total_sales",
                            "descending": true
                        }]
                    }
                }
            },
            {
                "@name": "Bags and Cases Spotlight",
                "maxNumRecords": "10",
                "@type": "HorizontalRecordSpotlight",
                "seeAllLinkText": "See All Bags & Cases",
                "showSeeAllLink": true,
                "title": "Featured Bags & Cases",
                "recordSelection": {
                    "augment": false,
                    "@class": "com.endeca.infront.cartridge.RecordSpotlightSelection",
                    "filterState": {
                        "@class": "com.endeca.infront.navigation.model.FilterState",
                        "navigationFilters": ["101012"]
                    }
                }
            },
            {
                "@name": "Accessories Spotlight",
                "maxNumRecords": "10",
                "@type": "HorizontalRecordSpotlight",
                "seeAllLinkText": "See All Accessories",
                "showSeeAllLink": true,
                "title": "Featured Accessories",
                "recordSelection": {
                    "augment": false,
                    "@class": "com.endeca.infront.cartridge.RecordSpotlightSelection",
                    "filterState": {
                        "@class": "com.endeca.infront.navigation.model.FilterState",
                        "navigationFilters": ["101024"]
                    },
                    "sortOption": {
                        "@class": "com.endeca.infront.navigation.model.SortOption",
                        "label": "product.review.avg_rating | Descending",
                        "sorts": [{
                            "@class": "com.endeca.infront.navigation.model.SortSpec",
                            "key": "product.review.avg_rating",
                            "descending": true
                        }]
                    }
                }
            },
            {
                "@name": "Binoculars Spotlight",
                "maxNumRecords": "10",
                "@type": "HorizontalRecordSpotlight",
                "seeAllLinkText": "See All Binoculars",
                "showSeeAllLink": true,
                "title": "Featured Binoculars",
                "recordSelection": {
                    "augment": false,
                    "@class": "com.endeca.infront.cartridge.RecordSpotlightSelection",
                    "filterState": {
                        "@class": "com.endeca.infront.navigation.model.FilterState",
                        "navigationFilters": ["101023"]
                    }
                }
            }
        ],
        "secondaryContent": [
            {
                "@name": "Breadcrumbs",
                "@type": "Breadcrumbs"
            },
            {
                "@name": "Guided Navigation Slot",
                "ruleLimit": "1",
                "templateTypes": ["SecondaryContent"],
                "@type": "ContentSlotSecondary",
                "contentPaths": ["/content/Shared/Guided Navigation"]
            }
        ]
    },
    "triggers": [{"exactLocation": true}]
}


Copyright © Legal Notices