Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First draft of values on segments in experience event with previous q… #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion schemas/context/experienceevent.example.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,26 @@
},
"xdm:marketing": {
"xdm:trackingCode": "marketingcampaign111"
}
},
"xdm:segmentMemberships": [
{
"xdm:segmentID": {
"@id": "https://data.adobe.io/entities/identity/92312748749128",
"xdm:namespace": {
"xdm:code": "AAM"
}
},
"xdm:lastQualificationTime": "2017-09-26T15:52:25+00:00",
"xdm:version": "1.0",
"xdm:validUntil": "2017-12-26T15:52:25+00:00",
"xdm:status": "realized",
"xdm:previousQualificationTimes": [
"2017-12-25T12:00:15+00:00"
],
"xdm:payload": {
"xdm:payloadValue": 0.5,
"xdm:payloadType": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload"
}
}
]
}
59 changes: 29 additions & 30 deletions schemas/context/experienceevent.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "ExperienceEvent",
"type": "object",
"description":
"The core ExperienceEvent XDM is used to capture observations that are altering one or more related XDMs/entities. The ExperienceEvent captures information about the observation taking place and when it is occurring. It is critical for time domain analytics as it allows observation and analysis of changes that occur in windows of time and comparison with other windows of time to track trends. ExperienceEvent are either explicit or implicit. Explicit events are direct observations of a human action taking place during a session. Implicit events are events that are being raised without a direct human action. Examples of implicit events are scheduled email sending of newsletters, battery voltage reaching a certain threshold, a person entering into range of a proximity sensor. While not all events are easily categorized across all data sources, it is extremely valuable to harmonize similar events into similar types for processing where possible, and the XDM specifications does this by defining a set of enumerated **type** attribute values with specific semantic meanings. Where possible events must be constrained to these enumerated values to facilitate interoperability.",
"description": "The core ExperienceEvent XDM is used to capture observations that are altering one or more related XDMs/entities. The ExperienceEvent captures information about the observation taking place and when it is occurring. It is critical for time domain analytics as it allows observation and analysis of changes that occur in windows of time and comparison with other windows of time to track trends. ExperienceEvent are either explicit or implicit. Explicit events are direct observations of a human action taking place during a session. Implicit events are events that are being raised without a direct human action. Examples of implicit events are scheduled email sending of newsletters, battery voltage reaching a certain threshold, a person entering into range of a proximity sensor. While not all events are easily categorized across all data sources, it is extremely valuable to harmonize similar events into similar types for processing where possible, and the XDM specifications does this by defining a set of enumerated **type** attribute values with specific semantic meanings. Where possible events must be constrained to these enumerated values to facilitate interoperability.",
"definitions": {
"experienceevent": {
"properties": {
Expand All @@ -29,54 +28,46 @@
"title": "Timestamp",
"type": "string",
"format": "date-time",
"description":
"The time when the first event of the interaction occurred."
"description": "The time when the first event of the interaction occurred."
},
"xdm:receivedTimestamp": {
"title": "Received Timestamp",
"type": "string",
"format": "date-time",
"description":
"The time at which this interaction was received by a server."
"description": "The time at which this interaction was received by a server."
},
"xdm:endUserIDs": {
"title": "End User IDs",
"$ref": "https://ns.adobe.com/xdm/context/enduserids",
"description":
"Condensed, normalized encapsulation of all end user identifiers.\n"
"description": "Condensed, normalized encapsulation of all end user identifiers.\n"
},
"xdm:environment": {
"title": "Environment",
"$ref": "https://ns.adobe.com/xdm/context/environment",
"description":
"Information about the surrounding situation the event observation occurred in, specifically detailing transitory information such as the network or software versions."
"description": "Information about the surrounding situation the event observation occurred in, specifically detailing transitory information such as the network or software versions."
},
"xdm:productListItems": {
"title": "Product List Items",
"type": "array",
"description":
"A list of items representing a product selected by a customer with specific options and pricing that are for that usage context at a specific point of time and may differ from the product record.",
"description": "A list of items representing a product selected by a customer with specific options and pricing that are for that usage context at a specific point of time and may differ from the product record.",
"items": {
"$ref": "https://ns.adobe.com/xdm/content/productlistitem"
}
},
"xdm:device": {
"title": "Device",
"$ref": "https://ns.adobe.com/xdm/context/device",
"description":
"An identified Device/Application or Device/Browser instance that is trackable across sessions, normally by cookies."
"description": "An identified Device/Application or Device/Browser instance that is trackable across sessions, normally by cookies."
},
"xdm:commerce": {
"title": "Commerce",
"$ref": "https://ns.adobe.com/xdm/context/commerce",
"description":
"The commerce specific data related to this interaction."
"description": "The commerce specific data related to this interaction."
},
"xdm:application": {
"title": "Application",
"$ref": "https://ns.adobe.com/xdm/context/application",
"description":
"The application related to the event observation. It could be either the application targeted by the event like the send of a push notification or the application originating the event such as a click, or a login."
"description": "The application related to the event observation. It could be either the application targeted by the event like the send of a push notification or the application originating the event such as a click, or a login."
},
"xdm:search": {
"title": "Search",
Expand All @@ -86,40 +77,48 @@
"xdm:web": {
"title": "Web",
"$ref": "https://ns.adobe.com/xdm/context/webinfo",
"description":
"The information related to web page and link of the ExperienceEvent."
"description": "The information related to web page and link of the ExperienceEvent."
},
"xdm:directMarketing": {
"title": "Direct Marketing",
"$ref": "https://ns.adobe.com/xdm/context/direct-marketing",
"description":
"The events and properties related to direct/outbound marketing such as email, direct mail, texts and in-app notifications."
"description": "The events and properties related to direct/outbound marketing such as email, direct mail, texts and in-app notifications."
},
"xdm:marketing": {
"title": "Marketing",
"$ref": "https://ns.adobe.com/xdm/context/marketing",
"description":
"The information related to marketing activities that are active with the touchpoint."
"description": "The information related to marketing activities that are active with the touchpoint."
},
"xdm:placeContext": {
"title": "Place Context",
"$ref": "https://ns.adobe.com/xdm/context/placecontext",
"description":
"The transient circumstances related to the observation. Examples include locale specific information such as weather, local time, traffic, day of the week, workday vs. holiday, working hours."
"description": "The transient circumstances related to the observation. Examples include locale specific information such as weather, local time, traffic, day of the week, workday vs. holiday, working hours."
},
"xdm:channel": {
"title": "Experience Channel",
"description":
"The experience channel related to this ExperienceEvent.",
"$ref": "https://ns.adobe.com/xdm/channels/channel"
"description": "The experience channel related to this ExperienceEvent.",
"$ref": "https://ns.adobe.com/xdm/channels/channel"
},
"xdm:advertising": {
"title": "Advertising",
"$ref": "https://ns.adobe.com/xdm/context/advertising",
"description": "The information related to advertising activity related to the experience event"
},
"xdm:segmentMemberships": {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative to explore later would be sparse profile embedded into experience event

"title": "Segment Memberships",
"description": "The segments associated with this experience event",
"type": "array",
"items": {
"type": "object",
"$ref": "https://ns.adobe.com/xdm/context/segmentMembership"
}
}
},
"required": ["@id", "xdm:timestamp", "xdm:endUserIDs"]
"required": [
"@id",
"xdm:timestamp",
"xdm:endUserIDs"
]
}
},
"allOf": [
Expand Down
27 changes: 17 additions & 10 deletions schemas/context/segmentmembership.example.1.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"xdm:segmentID": {
"@id": "https://data.adobe.io/entities/identity/92312748749128",
"xdm:namespace": {
"xdm:code": "AAM"
}
},
"xdm:lastQualificationTime": "2017-09-26T15:52:25+00:00",
"xdm:version": "1.0",
"xdm:validUntil" : "2017-12-26T15:52:25+00:00",
"xdm:status" : "realized"
"xdm:segmentID": {
"@id": "https://data.adobe.io/entities/identity/92312748749128",
"xdm:namespace": {
"xdm:code": "AAM"
}
},
"xdm:lastQualificationTime": "2017-09-26T15:52:25+00:00",
"xdm:version": "1.0",
"xdm:validUntil": "2017-12-26T15:52:25+00:00",
"xdm:status": "realized",
"xdm:previousQualificationTimes": [
"2017-12-25T12:00:15+00:00"
],
"xdm:payload": {
"xdm:payloadValue": 0.5,
"xdm:payloadType": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload"
}
}

36 changes: 36 additions & 0 deletions schemas/context/segmentmembership.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,42 @@
"format": "date-time",
"description": "The timestamp when the assertion of segment membership was made."
},
"xdm:previousQualificationTimes": {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will drop this field, if you need to show previous states of segment membership , just repeat the segment membership definition in the array.

Don't need this on experience event either.

"title": "Previous Qualification Times",
"description": "The timestamp when the assertion of segment membership was made. DO WE WANT TO TRACK PREVIOUS PAYLOADS HERE",
"type": "array",
"items": {
"type": "string",
"format": "date-time"
}
},
"xdm:payload" : {
"title" : "Payload",
"description": "Values that are direclty related with the segment realization. This payload exists with the same validUntil as the segment realization.",
"anyOf": [
{
"type": "string"
},
{
"type" : "number"
},
{
"type" : "object"
},
{
"type" : "array"
},
{
"type" : "boolean"
},
{
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to force any structure on the payload? It will be difficult to validate correctly even if we force strict structure because the payload type is ultimately controlled by the schema definition and not really the schema membership.

I put both ways here for the sake of discussion.

"title": "Segment Membership Propensity Payload",
"$ref": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload",
"description": "The propensity score associated with this segment membership"
}
]

},
"xdm:validUntil": {
"title": "Valid Until",
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"xdm:payloadValue": 0.5,
"xdm:payloadType": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need someway to embed the payload type with the payload if we want to attempt to validate the structure is correct.

}
30 changes: 30 additions & 0 deletions schemas/context/segmentmembershippropensitypayload.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"meta:license": [
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Segment Membership Propensity Payload",
"type": "object",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had tried to make this schema simply by not having it be an object type, but object type is enforced by XDM guidelines. The alternative would be for it to be a number and just define the min and max.

"definitions": {
"xdm:payloadValue": {
"title": "Value",
"type": "number",
"description": "The propensity",
"minimum": 0,
"maximum": 1
},
"xdm:payloadType": {
"title": "Type Identifier Service",
"type": "string",
"const": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload",
"description": "The type of payload of the service that is used to identify the device type."
}
},
"description":
"Tracks a propensity score on Segment Membership for an EndUser",
"meta:status": "experimental"
}