From 62114613463767d8432a1c7de1e114f2e06617b7 Mon Sep 17 00:00:00 2001 From: Harleen Sahni Date: Tue, 12 Jun 2018 11:00:09 -0400 Subject: [PATCH 1/2] First draft of values on segments in experience event with previous qualifications --- schemas/context/experienceevent.schema.json | 12 +++++-- schemas/context/segmentmembership.schema.json | 31 +++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/schemas/context/experienceevent.schema.json b/schemas/context/experienceevent.schema.json index c9c1dadc5..d55f75fd0 100644 --- a/schemas/context/experienceevent.schema.json +++ b/schemas/context/experienceevent.schema.json @@ -117,8 +117,16 @@ "title": "Advertising", "$ref": "https://ns.adobe.com/xdm/context/advertising", "description": "The information related to advertising activity related to the experience event" - } - }, + }, + "xdm:segmentMemberships" : { + "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"] } }, diff --git a/schemas/context/segmentmembership.schema.json b/schemas/context/segmentmembership.schema.json index 8a1c13717..05578d597 100644 --- a/schemas/context/segmentmembership.schema.json +++ b/schemas/context/segmentmembership.schema.json @@ -29,6 +29,37 @@ "format": "date-time", "description": "The timestamp when the assertion of segment membership was made." }, + "xdm:previousQualificationTimes": { + "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" + } + ] + + }, "xdm:validUntil": { "title": "Valid Until", "type": "string", From c8dcf1ee26ca4e060bf7a650aa59f74b5a4897f6 Mon Sep 17 00:00:00 2001 From: Harleen Sahni Date: Tue, 12 Jun 2018 13:03:26 -0400 Subject: [PATCH 2/2] Add more structured payloads --- .../context/experienceevent.example.1.json | 23 ++++++- schemas/context/experienceevent.schema.json | 69 ++++++++----------- .../context/segmentmembership.example.1.json | 27 +++++--- schemas/context/segmentmembership.schema.json | 5 ++ ...membershippropensitypayload.example.1.json | 4 ++ ...entmembershippropensitypayload.schema.json | 30 ++++++++ 6 files changed, 108 insertions(+), 50 deletions(-) create mode 100644 schemas/context/segmentmembershippropensitypayload.example.1.json create mode 100644 schemas/context/segmentmembershippropensitypayload.schema.json diff --git a/schemas/context/experienceevent.example.1.json b/schemas/context/experienceevent.example.1.json index 4aa7f31a5..1b8c1bef0 100644 --- a/schemas/context/experienceevent.example.1.json +++ b/schemas/context/experienceevent.example.1.json @@ -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" + } + } + ] } diff --git a/schemas/context/experienceevent.schema.json b/schemas/context/experienceevent.schema.json index d55f75fd0..b8ab581b2 100644 --- a/schemas/context/experienceevent.schema.json +++ b/schemas/context/experienceevent.schema.json @@ -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": { @@ -29,33 +28,28 @@ "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" } @@ -63,20 +57,17 @@ "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", @@ -86,48 +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" : { - "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"] + "xdm:segmentMemberships": { + "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" + ] } }, "allOf": [ diff --git a/schemas/context/segmentmembership.example.1.json b/schemas/context/segmentmembership.example.1.json index 076c424bf..924981198 100644 --- a/schemas/context/segmentmembership.example.1.json +++ b/schemas/context/segmentmembership.example.1.json @@ -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" + } } diff --git a/schemas/context/segmentmembership.schema.json b/schemas/context/segmentmembership.schema.json index 05578d597..0a1d0263d 100644 --- a/schemas/context/segmentmembership.schema.json +++ b/schemas/context/segmentmembership.schema.json @@ -56,6 +56,11 @@ }, { "type" : "boolean" + }, + { + "title": "Segment Membership Propensity Payload", + "$ref": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload", + "description": "The propensity score associated with this segment membership" } ] diff --git a/schemas/context/segmentmembershippropensitypayload.example.1.json b/schemas/context/segmentmembershippropensitypayload.example.1.json new file mode 100644 index 000000000..67559ca63 --- /dev/null +++ b/schemas/context/segmentmembershippropensitypayload.example.1.json @@ -0,0 +1,4 @@ +{ + "xdm:payloadValue": 0.5, + "xdm:payloadType": "https://ns.adobe.com/xdm/context/segmentMembershipPropensityPayload" +} \ No newline at end of file diff --git a/schemas/context/segmentmembershippropensitypayload.schema.json b/schemas/context/segmentmembershippropensitypayload.schema.json new file mode 100644 index 000000000..652d6f029 --- /dev/null +++ b/schemas/context/segmentmembershippropensitypayload.schema.json @@ -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", + "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" +}