Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
- add stub schemas for Option and Activity to be able to reference them in propositions
- rename suffix for properties that are identifiers from Id to ID, spell out 'Identifier' in the descriptions and titles
- remove eventmetrics schema and replace with two metricdefinitions schemas
- remove explicit property to group metrics in propositions, instead allow them to appear inside the proposition detail next to the entity that was measured, update examples accordingly (proposition-detail.example.1.json)
- rename measure for offer interactions in direct marketing from offerClicks to offerOpens
  • Loading branch information
jbeckert committed Mar 2, 2019
1 parent 42c0b25 commit 73cb0f6
Show file tree
Hide file tree
Showing 10 changed files with 262 additions and 91 deletions.
65 changes: 65 additions & 0 deletions extensions/adobe/experience/decisioning/activity.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"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/experience/decisioning/activity",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Decision Option",
"type": "object",
"auditable": true,
"meta:extensible": true,
"meta:abstract": true,
"meta:extends": [
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/common/auditable"
],
"description":
"Entity to to control the decisioning process. It specifies the filter applied to the total inventory of options in order to narrow them down by topic/category. The activity also specifies a fallback option should the combined constraints disqualify all narrowed-down options. A decision activity ican be thought of as a type of http://schema.org/Action .",
"definitions": {
"option": {
"properties": {
"xdm:name": {
"type": "string",
"title": "Name",
"description": "Activity name. The name is displayed in various user interfaces. Property has the semantic of schema.org's 'name' property defined on http://schema.org/Thing"
},
"xdm:startTime": {
"type": "string",
"format": "date-time",
"title": "Start Date and Time",
"description": "Activity Start Date and Time. Property has the semantic of schema.org's 'startTime' property defined on http://schema.org/Action"
},
"xdm:endTime": {
"type": "string",
"format": "date-time",
"title": "End Date and Time",
"description": "Activity End Date and Time. Property has the semantic of schema.org's 'endTime' property defined on http://schema.org/Action"
},
"xdm:fallback": {
"type": "string",
"format": "uri-reference",
"title": "Fallback Option",
"description": "The reference to a fallback option that is used when decisioning in the context of this activity does not qualify any of the regular options (this typically happens when hard constraints are applied). The value is the URI (@id) of the fallback option that is referenced. See schema https://ns.adobe.com/experience/decisioning/unconstrained-option",
}
}
}
},
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context"
},
{
"$ref": "https://ns.adobe.com/xdm/common/auditable"
},
{
"$ref": "https://ns.adobe.com/xdm/data/record"
},
{
"$ref": "#/definitions/option"
}
],
"meta:status": "experimental"
}
36 changes: 13 additions & 23 deletions extensions/adobe/experience/decisioning/decisionevent.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "DecisionEvent",
"type": "object",
"description": "A DecisionEvent is used to capture observations about the outcome and context of a decision activity. The DecisionEvent captures information about how the decision made, when it was occurring, what options were proposed (chosen) and what contextual state existed that either influenced the decision or could be observed during the decision process. The decision event also captures the proposition ID, a globally unique identifier that can be used to correlate the decision to other events. DecisionEvents are not only relatable to Experience Events that impacted a decision but also to ExperienceEvents that are a direct response to a proposition. It is the expectation that applications reference the proposition ID in every experience event that was influended by the propositions. A user profile's proposition-response history is maintained with these proposition IDs.",
"meta:abstract": false,
"description": "A decision event is used to capture observations about the outcome and context of a decision activity. The decision event captures information about how the decision made, when it was occurring, what options were proposed (chosen) and what contextual state existed that either influenced the decision or could be observed during the decision process. The decision event also captures the proposition ID, a globally unique identifier that can be used to correlate the decision to other events. DecisionEvents are not only relatable to Experience Events that impacted a decision but also to ExperienceEvents that are a direct response to a proposition. It is the expectation that applications reference the proposition ID in every experience event that was influended by the propositions. A user profile's proposition-response history is maintained with these proposition IDs.",
"meta:abstract": true,
"meta:extensible": true,
"meta:extends": [
"https://ns.adobe.com/xdm/data/time-series",
Expand All @@ -22,20 +22,20 @@
"definitions": {
"decisionevent": {
"properties": {
"https://ns.adobe.com/adobecloudplatform/ims/organizationId": {
"title": "IMS Org ID",
"https://ns.adobe.com/adobecloudplatform/ims/organizationID": {
"title": "IMS Organization Identity",
"type": "string",
"description": "An ID associated with the orgnaization that maintains the library of business objects and rules for this decision."
"description": "An Identity associated with the orgnaization that maintains the library of business objects and rules for this decision."
},
"https://ns.adobe.com/experience/decisioning/containerId": {
"title": "Container ID",
"https://ns.adobe.com/experience/decisioning/containerID": {
"title": "Container Identity",
"type": "string",
"description": "An ID associated with the library of business objects and rules for this decision."
"description": "An Identity associated with the library of business objects and rules for this decision."
},
"https://ns.adobe.com/experience/decisioning/batchId": {
"title": "Batch ID",
"https://ns.adobe.com/experience/decisioning/batchID": {
"title": "Batch Identity",
"type": "string",
"description": "An ID associated with the decision event, if the request was made in batch mode. This propoerty will be absent if the decision leading to this event was made individually for a single profile identity."
"description": "An Identity associated with the decision event, if the request was made in batch mode. This propoerty will be absent if the decision leading to this event was made individually for a single profile identity."
}
}
}
Expand All @@ -47,28 +47,18 @@
{
"$ref": "https://ns.adobe.com/xdm/data/time-series"
},
{
"$ref": "#/definitions/decisionevent"
},
{
"$ref": "https://ns.adobe.com/experience/decisioning/proposition"
},
{
"$ref": "https://ns.adobe.com/xdm/context/identitymap"
},
{
"$ref": "https://ns.adobe.com/experience/campaign-experienceevent"
"$ref": "#/definitions/decisionevent"
},
{
"required": [
"@id",
"xdm:timestamp",
"xdm:identityMap",
"https://ns.adobe.com/experience/decisioning/propositionId"
"https://ns.adobe.com/experience/decisioning/propositionID"
]
},
{
"properties": { "@id": { "readonly": true } }
}
],
"meta:status": "experimental"
Expand Down
30 changes: 0 additions & 30 deletions extensions/adobe/experience/decisioning/eventmetrics.schema.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"meta:license": [
"Copyright 2018 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/experience/decisioning/option-propositions-profile",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Option propositions to profile",
"type": "object",
"meta:extensible": true,
"meta:extends": ["https://ns.adobe.com/xdm/data/metricdefinition"],
"description":
"The number a particular option was proposed so far to a particular profile.",
"definitions": {
"metricdefinition": {
"properties": {
"@id": {
"type": "string",
"const":
"https://ns.adobe.com/experience/decisioning/optionPropositionsProfile",
"description": "The unique identifier of this metric."
},
"schema:name": {
"type": "string",
"const": "option metric: per profile propositions",
"description":
"The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique."
},
"xdm:measurement": {
"type": "string",
"description": "How to take measures of this metric.",
"const": "count"
},
"xdm:unit": {
"const": null
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/metricdefinition"
},
{
"$ref": "https://ns.adobe.com/xdm/data/metricdefinition"
}
],
"required": ["@id", "schema:name", "xdm:measurement", "xdm:unit"],
"meta:status": "experimental"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"meta:license": [
"Copyright 2018 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/experience/decisioning/option-propositions-total",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Option propositions total",
"type": "object",
"meta:extensible": true,
"meta:extends": ["https://ns.adobe.com/xdm/data/metricdefinition"],
"description":
"The total number a particular option was proposed so far across all profiles.",
"definitions": {
"metricdefinition": {
"properties": {
"@id": {
"type": "string",
"const":
"https://ns.adobe.com/experience/decisioning/optionPropositionsTotal",
"description": "The unique identifier of this metric."
},
"schema:name": {
"type": "string",
"const": "option metric: total propositions",
"description":
"The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique."
},
"xdm:measurement": {
"type": "string",
"description": "How to take measures of this metric.",
"const": "count"
},
"xdm:unit": {
"const": null
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/metricdefinition"
},
{
"$ref": "https://ns.adobe.com/xdm/data/metricdefinition"
}
],
"required": ["@id", "schema:name", "xdm:measurement", "xdm:unit"],
"meta:status": "experimental"
}
47 changes: 47 additions & 0 deletions extensions/adobe/experience/decisioning/option.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"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/experience/decisioning/option",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Decision Option",
"type": "object",
"auditable": true,
"meta:extensible": true,
"meta:abstract": true,
"meta:extends": [
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/common/auditable"
],
"description":
"Entity to represent one of the possible selections or choices of a decision. Options have record semantics when composed into a schema. When referenced in propositions, options are enriched with the observed metrics that applied to them, i.e. they are measurable.",
"definitions": {
"option": {
"properties": {
"xdm:name": {
"type": "string",
"title": "Name",
"description": "Option name. The name is displayed in various user interfaces. Property has the semantic of schema.org's 'name' property defined on http://schema.org/Thing"
}
}
}
},
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context"
},
{
"$ref": "https://ns.adobe.com/xdm/common/auditable"
},
{
"$ref": "https://ns.adobe.com/xdm/data/record"
},
{
"$ref": "#/definitions/option"
}
],
"meta:status": "experimental"
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
{
"xdm:activity": {
"@id": "xcore:offer-activity:ebc48132c26ccfc",
"xdm:name": "Tutorial videos to watch",
"xdm:startDate": "2018-10-13T05:59:18.914Z",
"xdm:endDate": "2018-12-27T05:59:18.914Z",
"xdm:fallback": "xcore:fallback-offer:e91ce7243fd8c2a",
"xdm:name": "Kiosk",
"xdm:placement": "xcore:offer-placement:e91a84cc83ad12f",
"xdm:filter": "xcore:offer-filter:e9201a6650bb7e3",
"xdm:startDate": "2018-10-13T05:59:18.914Z",
"xdm:endDate": "2018-12-27T05:59:18.914Z"
"xdm:filter": "xcore:offer-filter:e9201a6650bb7e3"
},
"xdm:selections": [
{
"@id": "xcore:personalized-offer:e91ee850a0bb7d9",
"xdm:name": "Introduction to machine learning",
"https://ns.adobe.com/experience/decisioning/profileConstraint": {
"xdm:eligibilityRule": "xcore:eligibility-rule:ec0ef7ceacb2ecd"
},
"https://ns.adobe.com/experience/decisioning/optionPropositionsTotal": {
"xdm:value": 948
}
}
],
"xdm:metrics": {
"https://ns.adobe.com/experience/offer-management/offer-propositions": {
"xdm:value": 948
}
}
]
}
Loading

0 comments on commit 73cb0f6

Please sign in to comment.