diff --git a/extensions/adobe/experience/offer-management/capping-constraint.schema.json b/extensions/adobe/experience/offer-management/capping-constraint.schema.json index 2b461014c..a9cd72260 100644 --- a/extensions/adobe/experience/offer-management/capping-constraint.schema.json +++ b/extensions/adobe/experience/offer-management/capping-constraint.schema.json @@ -12,7 +12,7 @@ "type": "object", "title": "Capping Constraint", "description": - "Offer Capping Constraint is a component in a Personalization Offer that defines the parameters for capping. Capping is the process of limiting how many times an offer can be proposed, for an individual profile as well as across all profiles.", + "A capping constraint is a component in a personalized offer that defines the parameters for capping. Capping is the process of limiting how many times an offer can be proposed, for an individual profile as well as across all profiles.", "definitions": { "capping-constraint": { "type": "object", diff --git a/extensions/adobe/experience/offer-management/eligibility-rule.example.1.json b/extensions/adobe/experience/offer-management/eligibility-rule.example.1.json index 5910bd608..dfd08a745 100644 --- a/extensions/adobe/experience/offer-management/eligibility-rule.example.1.json +++ b/extensions/adobe/experience/offer-management/eligibility-rule.example.1.json @@ -1,16 +1,168 @@ { "@id": "https://www.example.com/offers/eligibility-rule/rule-0001", - "xdm:name": "Californians with two or more purchases of more than $1000", - "xdm:value": - "profile.xdm:homeAddress.xdm:stateOrProvince = \"CA\" AND (SELECT X FROM xEvent WHERE X.xdm:commerce.xdm:order.xdm:priceTotal > 1000 AND X.xdm:commerce.xdm:order.xdm:currencyCode = \"USD\").count() > 1", + "xdm:name": "Californians with one or more purchases of more than $1000", + "xdm:valueAsText": + "homeAddress.stateOrProvince = \"CA\" AND (some x FROM xEvent WHERE commerce.order.priceTotal > 1000 AND x.commerce.order.currencyCode = \"USD\")", + "xdm:value": { + "nodeType": "fnApply", + "fnName": "and", + "params": [ + { + "nodeType": "fnApply", + "fnName": "=", + "params": [ + { + "nodeType": "fieldLookup", + "fieldName": "xdm:stateOrProvince", + "object": { + "nodeType": "fieldLookup", + "fieldName": "xdm:homeAddress", + "object": { + "nodeType": "literal", + "literalType": "XDMObject", + "value": "profile" + } + } + }, + { + "literalType": "String", + "nodeType": "literal", + "value": "CA" + } + ] + }, + { + "nodeType": "quantification", + "quantifier": "some", + "variables": [ + { + "nodeType": "varDecl", + "varName": "x", + "from": { + "nodeType": "fnApply", + "fnName": "modelInstances", + "params": [ + { + "nodeType": "literal", + "literalType": "String", + "value": "https://ns.adobe.com/xdm/context/experienceevent" + } + ] + }, + "where": { + "nodeType": "fnApply", + "fnName": "and", + "params": [ + { + "nodeType": "quantification", + "quantifier": "some", + "variables": [ + { + "nodeType": "varDecl", + "varName": "id", + "from": { + "nodeType": "fieldLookup", + "fieldName": "xdm:endUserIDs", + "object": { + "nodeType": "varRef", + "varName": "x" + } + }, + "where": { + "nodeType": "fnApply", + "fnName": "in", + "params": [ + { + "nodeType": "varRef", + "varName": "id" + }, + { + "nodeType": "fieldLookup", + "fieldName": "xdm:identities", + "object": { + "nodeType": "literal", + "literalType": "XDMObject", + "value": "profile" + } + } + ] + } + } + ] + }, + { + "nodeType": "fnApply", + "fnName": ">", + "params": [ + { + "nodeType": "fieldLookup", + "fieldName": "xdm:priceTotal", + "object": { + "nodeType": "fieldLookup", + "fieldName": "xdm:order", + "object": { + "nodeType": "fieldLookup", + "fieldName": "xdm:commerce", + "object": { + "nodeType": "varRef", + "varName": "x" + } + } + } + }, + { + "nodeType": "literal", + "literalType": "Integer", + "value": 1000 + } + ] + }, + { + "nodeType": "fnApply", + "fnName": "=", + "params": [ + { + "nodeType": "fieldLookup", + "fieldName": "xdm:currencyCode", + "object": { + "nodeType": "fieldLookup", + "fieldName": "xdm:order", + "object": { + "nodeType": "fieldLookup", + "fieldName": "xdm:commerce", + "object": { + "nodeType": "varRef", + "varName": "x" + } + } + } + }, + { + "nodeType": "literal", + "literalType": "String", + "value": "USD" + } + ] + } + ] + } + } + ] + } + ] + }, "xdm:modelUsage": [ { - "xdm:model": "https://ns.adobe.com/xdm/context/profile", - "xdm:modelPropertyPaths": ["xdm:homeAddress.xdm:stateProvince"] + "xdm:modelReference": "https://ns.adobe.com/xdm/context/profile", + "xdm:modelPropertyPaths": [ + "xdm:identities", + "xdm:homeAddress.xdm:stateProvince" + ] }, { - "xdm:model": "https://ns.adobe.com/xdm/context/experienceevent", + "xdm:modelReference": "https://ns.adobe.com/xdm/context/experienceevent", "xdm:modelPropertyPaths": [ + "xdm:endUserIDs", "xdm:commerce.xdm:order.xdm:priceTotal", "xdm:commerce.xdm:order.xdm:currencyCode" ] diff --git a/extensions/adobe/experience/offer-management/eligibility-rule.schema.json b/extensions/adobe/experience/offer-management/eligibility-rule.schema.json index 9d49f4422..62a64dfbd 100644 --- a/extensions/adobe/experience/offer-management/eligibility-rule.schema.json +++ b/extensions/adobe/experience/offer-management/eligibility-rule.schema.json @@ -12,7 +12,7 @@ "type": "object", "title": "Eligibility Rule", "description": - "An EligibilityRule is a named reusable predicate used in the domain of audience segmentation and message personalization. The Profile Query Language forms the foundation of those predicates. The prodicate operates not only over profile fields but also over contextual data objects provided at the time of decisioning.", + "An eligibility rule is a named reusable predicate used in the domain of audience segmentation and message personalization. The Profile Query Language forms the foundation of those predicates. The predicate operates not only over profile fields but also over contextual data objects provided at the time of decisioning.", "definitions": { "eligibility-rule": { "properties": { @@ -21,39 +21,46 @@ "format": "uri-reference", "title": "ID", "description": - "The unique identifier of the EligibilityRule. This identifier is assigned by clients or services that use the repository and is not generated by the repository itself. This @id must be unique within a repository container for objects that are not the same, otherwise it is interpreted as referring to the same object. The @id is used in link relationships. For example an Offer's selection constraint object references an EligibilityRule object." + "The unique identifier of the eligibility rule. This identifier is assigned by clients or services that use the repository and is not generated by the repository itself. This @id must be unique within a repository container for objects that are not the same, otherwise it is interpreted as referring to the same object. The @id is used in link relationships. For example an offer's selection constraint object references an eligibility rule object." }, "xdm:name": { "type": "string", "title": "Name", "description": - "EligibilityRule name that is used to locate this object in a search operation" + "Eligibility rule name that is used to locate this object in a search operation" + }, + "xdm:valueAsText": { + "type": "string", + "title": "Expression over XDM instances in an alternate query syntax", + "description": + "Contains the expression over a collection of context XDM instances as a serialized string." }, "xdm:value": { - "type": "object", + "$ref": + "https://ns.adobe.com/experience/offer-management/filter-expression", "title": "Expression over XDM instances", "description": - "Contains the expression over a collection of context XDM instances. When the expression evaluates to true the offer refering to this eligibility rule will be included in the decisioning otherwise included. Central context instances include the profile and the experience events associtaed with the profile.", - "$ref": - "https://ns.adobe.com/experience/offer-management/filter-expression" + "Contains the expression tree over a collection of context XDM instances. When the expression evaluates to true the offer refering to this eligibility rule will be included in the decisioning otherwise included. Central context instances include the profile and the experience events associtaed with the profile." }, "xdm:modelUsage": { "title": "Used Properties", "description": - "An list of Model Usage objects, one per model, that lists the fully qualified path to every used property from the model.", + "A list of \"model usage\" objects, one per model, that lists the fully qualified path to every used property from the model.", "type": "array", "items": { "$ref": "https://ns.adobe.com/experience/offer-management/model-usage" } } - }, - "required": ["xdm:name", "xdm:value", "xdm:modelUsage"] + } } }, "allOf": [ { "$ref": "#/definitions/eligibility-rule" + }, + { + "required": ["xdm:name", "xdm:value", "xdm:modelUsage"] } ] } diff --git a/extensions/adobe/experience/offer-management/fallback-offer.schema.json b/extensions/adobe/experience/offer-management/fallback-offer.schema.json index 60a9a698e..e13541037 100644 --- a/extensions/adobe/experience/offer-management/fallback-offer.schema.json +++ b/extensions/adobe/experience/offer-management/fallback-offer.schema.json @@ -16,7 +16,12 @@ "Fallback offer is a default offer used when there is no personalization offer left that satisfies all constraints", "definitions": { "fallback-offer": { - "type": "object" + "allOf": [ + { + "$ref": + "https://ns.adobe.com/experience/offer-management/offer#/definitions/offer" + } + ] } }, "allOf": [ diff --git a/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.2.6b.json b/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.2.6b.json index d11863b0d..2546f2509 100644 --- a/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.2.6b.json +++ b/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.2.6b.json @@ -80,6 +80,7 @@ } ] } + } ] }, { diff --git a/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.3.1.json b/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.3.1.json index 2c0e1950a..48411c4dd 100644 --- a/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.3.1.json +++ b/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.3.1.json @@ -84,6 +84,7 @@ ] }, "where": { + "nodeType": "fnApply", "fnName": "and", "params": [ { @@ -99,7 +100,7 @@ "object": { "nodeType": "varRef", "varName": "x" - }, + } }, "where": { "nodeType": "fnApply", @@ -108,14 +109,14 @@ { "nodeType": "varRef", "varName": "id" - } + }, { "nodeType": "fieldLookup", "fieldName": "xdm:identities", "object": { "nodeType": "varRef", "varName": "p" - }, + } } ] } diff --git a/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.md b/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.md index 912857e28..d29dcdaa8 100644 --- a/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.md +++ b/extensions/adobe/experience/offer-management/filter-expression/filter-expression.example.md @@ -6,17 +6,17 @@ Example 1.1 All offers that have at least one representation for offer placement "uri:com:example:placement-1001" ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - some r from o.xdm:representations where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + some r from o.xdm:representations where r.xdm:placement = "uri:com:example:placement-1001" ``` -Also note that the example 1.1 could be written by using the `in` operator because the quantifier is existiential quantifier (`some`). -Here, a property path is shown whose steps include an intermediate array property. It is intermediate because in the path additional properties follow. This path evaluates to a list of placement values. +Also note that the example 1.1 could be written by using the `in` operator because the quantifier is existential quantifier (`some`). +Here, a property path is shown whose steps include an intermediate array property. It is intermediate because in the path additional properties follow. This path evaluates to a list of placement values. For intermediate array properties, especially for paths that contain multiple array steps, the next element returned is equal to the depth-first traversal of the node tree where the nodes represent the values of the JSON object. ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where "uri:com:example:placement-1001" in o.xdm:representation.xdm:placement ``` @@ -27,8 +27,8 @@ All offers that have at least one representation referencing an offer placement Note that here, compared to example 1.1 the domain of the exists-quantifier (the `some` expression) is the list of literals, one of them must be in one of the referenced placements for the offer to match. ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - some p from ["uri:com:example:placement-1001", "uri:com:example:placement-1002"] where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + some p from ["uri:com:example:placement-1001", "uri:com:example:placement-1002"] where p in o.xdm:representations.xdm:placement ) ``` @@ -36,13 +36,13 @@ select o from modelInstances("https://ns.adobe.com/experience/offer-management/p Example 1.3 --- All offers that have at least one representation referencing an offer placement from one of the list: "uri:com:example:placement-1001", "uri:com:example:placement-1002" and have the status 'approved'. -Note the parenthesis to separate the prodicate that belongs to the `some` expression from the second part of the predicate that applies to the `select` expression. +Note the parenthesis to separate the predicate that belongs to the `some` expression from the second part of the predicate that applies to the `select` expression. ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - ( some p from ["uri:com:example:placement-1001", "uri:com:example:placement-1002"] where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + ( some p from ["uri:com:example:placement-1001", "uri:com:example:placement-1002"] where p in o.xdm:representations.xdm:placement - ) + ) and o.status = "approved" ``` @@ -57,7 +57,7 @@ All offers that have at least the one tag "uri:com:example:tag-0001" Here, the in operator is used to check the containment of a single item in a list of items (tags). ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where "uri:com:example:tag-1001" in o.xdm:tags ``` @@ -67,16 +67,16 @@ All offers that have at least one of the tags ["uri:com:example:tag-1001", "uri: Conceptually, there is an iterator over the list of literals and the iteration breaks with the first element for which the predicate evaluates to `true` ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - some t from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + some t from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where t in o.xdm:tags ``` Also note that in this case, we could also evaluate the exists-quantifier by ranging over the offer's tag array and testing, one by one of those tags for containment in the list of literals provided: ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - some t from o.xdm:tags where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + some t from o.xdm:tags where t in ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] ``` @@ -85,65 +85,65 @@ This works because the not-empty-test for an intersection of two lists commutes. Example 2.3 --- All offers that have at least all of the tags ["uri:com:example:tag-1001", "uri:com:example:tag-1002"]. Note that offers can have additional tags not tested in this expression -Conceptually, there is an iterator over the list of literals and the iteration breaks with the first element for which the predicate evaluates to `false`, making the overall quantifier `false`. If the iterator completes with all elements evaluating the predicate to `true` then the overall quantifier evaluates to `true` +Conceptually, there is an iterator over the list of literals and the iteration breaks with the first element for which the predicate evaluates to `false`, making the overall quantifier `false`. If the iterator completes with all elements evaluating the predicate to `true` then the overall quantifier evaluates to `true` ``` -select o from xdm:https://ns.adobe.com/experience/offer-management/offer where - all t from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where +select o from xdm:https://ns.adobe.com/experience/offer-management/offer where + all t from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where t in o.xdm:tags ``` -Also note that in this case iterating in the quantifier over all the offer's tags would not work because an offer can have additional tags that we skip in our test. -As long as it has *all* the tags we are testing for, ie the literals are a sub-set, the offer qualifies. The sub-set test of two lists does not commute. +Also note that in this case iterating in the quantifier over all the offer's tags would not work because an offer can have additional tags that we skip in our test. +As long as it has *all* the tags we are testing for, ie the literals are a subset, the offer qualifies. The subset test of two lists does not commute. Example 2.4 --- All offers that have at least all of the tags ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] and have the status 'approved'. This is a combination of Example 2.3 with an additional condition on the offer's status property. ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - ( all t from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + ( all t from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where t in o.xdm:tags ) and o.status = "approved" ``` Example 2.5 --- -All offers that have all of the tags ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] - they could have additional ones - and at least one representation for offer placement "uri:com:example:placement-1001" and have the status 'approved'. +All offers that have all of the tags ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] - they could have additional ones - and at least one representation for offer placement "uri:com:example:placement-1001" and have the status 'approved'. This is a combination of Example 2.4 and 1.1. ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where - ( all _ from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where + ( all _ from ["uri:com:example:tag-1001", "uri:com:example:tag-1002"] where _ in o.xdm:tags - ) - and ( some _ from o.xdm:representations where + ) + and ( some _ from o.xdm:representations where _.xdm:placement = "uri:com:example:placement-1001" - ) + ) and o.status = "approved" ``` -Note that the scope of the two `_` variables is limited to the predicate of the quantifier where they were decrared, but the scope of the variable `o` is ranging across the two quantifiers. +Note that the scope of the two `_` variables is limited to the predicate of the quantifier where they were declared, but the scope of the variable `o` is ranging across the two quantifiers. To improve readability, it is encouraged to use different variable names. Example 2.6 --- -All offers from a list of directly selected offers that have at least one representation for offer placement "uri:com:example:placement-1001" and have the status 'approved'. -This is a variation of 2.5 except that the list of offers is not constraint by a list of tags and instead a list of offer `@id` values is used. +All offers from a list of directly selected offers that have at least one representation for offer placement "uri:com:example:placement-1001" and have the status 'approved'. +This is a variation of 2.5 except that the list of offers is not constraint by a list of tags and instead a list of offer `@id` values is used. ``` -select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where +select o from modelInstances("https://ns.adobe.com/experience/offer-management/personalized-offer") where o.xdm:@id in [ - "uri:com:example:offer-10001", + "uri:com:example:offer-10001", "uri:com:example:offer-10002", "uri:com:example:offer-10004", "uri:com:example:offer-10009", "uri:com:example:offer-10013", "uri:com:example:offer-10005", - "uri:com:example:offer-10022"] - and ( some r from o.xdm:representation where + "uri:com:example:offer-10022"] + and ( some r from o.xdm:representation where r.xdm:placement = "uri:com:example:placement-1001" - ) + ) and o.status = "approved" ``` @@ -168,12 +168,12 @@ select p from modelInstances("https://ns.adobe.com/xdm/context/profile") where or p.xdm:person.xdm:lastName = "Kehrig" or - (select x from modelInstances("https://ns.adobe.com/xdm/context/experienceevent") where + (select x from modelInstances("https://ns.adobe.com/xdm/context/experienceevent") where (select id from x.xdm:endUserIDs where id in p.xdm:identities) and x.xdm:placecontext.xdm:geo.xdm:city = "Köln" ) .count() = - (select x from modelInstances("https://ns.adobe.com/xdm/context/experienceevent") where + (select x from modelInstances("https://ns.adobe.com/xdm/context/experienceevent") where select id from x.xdm:endUserIDs where id in p.xdm:identities) ``` diff --git a/extensions/adobe/experience/offer-management/model-usage.schema.json b/extensions/adobe/experience/offer-management/model-usage.schema.json index dc01a8bee..8b6503290 100644 --- a/extensions/adobe/experience/offer-management/model-usage.schema.json +++ b/extensions/adobe/experience/offer-management/model-usage.schema.json @@ -12,7 +12,7 @@ "type": "object", "title": "Used XDM Models and Properties from those models", "description": - "A key-value pair whose key is reference to the model, i.e. the model's $id property. The value is an array of strings, each string representing a fully qualified path to an XDM field with dots used as the path delimiter.", + "A key-value pair whose key is a reference to the model, i.e. the model's $id property. The value is an array of strings, each string representing a fully qualified path to an XDM field with dots used as the path delimiter.", "definitions": { "model-usage": { "type": "object", @@ -20,7 +20,7 @@ "description": "A key-value pair whose key is reference to the model, i.e. the model's $id property. The value is an array of strings, each string representing a fully qualified path to an XDM field with dots used as the path delimiter.", "properties": { - "xdm:model": { + "xdm:modelReference": { "type": "string", "format": "uri", "description": @@ -34,8 +34,15 @@ "A fully qualified JSON path to an XDM field with dots used as the path delimiter" } } - }, + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/model-usage" + }, + { "required": ["xdm:modelReference", "xdm:modelPropertyPaths"] } - } + ] } diff --git a/extensions/adobe/experience/offer-management/offer-activity.schema.json b/extensions/adobe/experience/offer-management/offer-activity.schema.json index 124bcb87b..0fccc76a8 100644 --- a/extensions/adobe/experience/offer-management/offer-activity.schema.json +++ b/extensions/adobe/experience/offer-management/offer-activity.schema.json @@ -12,7 +12,7 @@ "type": "object", "title": "Activity", "description": - "An Offer Activity is used to control the decisioning process. It specifies the filter applied to the total inventory to narrow down offers by topic/category, the placement to narrow down the inventory to those offers that technically fit into the reserved space for the offer and specifies a fall back option should the combined constraints disqualify all available personalization options (offers).", + "An offer activity is used to control the decisioning process. It specifies the filter applied to the total inventory to narrow down offers by topic/category, the placement to narrow down the inventory to those offers that technically fit into the reserved space for the offer and specifies a fall back option should the combined constraints disqualify all available personalization options (offers).", "definitions": { "offer-activity": { "properties": { @@ -58,23 +58,30 @@ "format": "uri", "title": "Offer Placement", "description": - "The reference to an offer placement instance. Offer Placements are used by Offer Activities to limit the Offer selection to those Offers that have a representation that complies with the OfferPlacement restrictions. The value is the URI (@id) of the OfferPlacement that is referenced. See Offer Placement schema https://ns.adobe.com/experience/offer-management/offer-placement" + "The reference to an offer placement instance. Offer placements are used by offer activities to limit the offer selection to those offers that have a representation that complies with the offer placement restrictions. The value is the URI (@id) of the offer placement that is referenced. See schema https://ns.adobe.com/experience/offer-management/offer-placement" }, "xdm:filter": { "type": "string", "format": "uri", "title": "Offer Filter", "description": - "The reference to a filter that is applied to the inventory when a decisioning is made the context of this activity. The value is the URI (@id) of the OfferFilter that is referenced. See OfferFilter schema https://ns.adobe.com/experience/offer-management/offer-filter" + "The reference to a filter that is applied to the inventory when a decisioning is made the context of this activity. The value is the URI (@id) of the offer filter that is referenced. See schema https://ns.adobe.com/experience/offer-management/offer-filter" }, "xdm:fallback": { "type": "string", "format": "uri", "title": "Fallback Offer", "description": - "The reference to a fallback offer that is used when decisioning in the context of this activity does not qualify any of the offers specified in the fallback offer. The value is the URI (@id) of the FallbackOffer that is referenced. See FallbackOffer schema https://ns.adobe.com/experience/offer-management/fallback-offer" + "The reference to a fallback offer that is used when decisioning in the context of this activity does not qualify any of the offers specified in the fallback offer. The value is the URI (@id) of the fallback offer that is referenced. See schema https://ns.adobe.com/experience/offer-management/fallback-offer" } - }, + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/offer-activity" + }, + { "required": [ "xdm:name", "xdm:status", @@ -83,10 +90,5 @@ "xdm:fallback" ] } - }, - "allOf": [ - { - "$ref": "#/definitions/offer-activity" - } ] } diff --git a/extensions/adobe/experience/offer-management/offer-filter.schema.json b/extensions/adobe/experience/offer-management/offer-filter.schema.json index 10eb3771f..a2c04a960 100644 --- a/extensions/adobe/experience/offer-management/offer-filter.schema.json +++ b/extensions/adobe/experience/offer-management/offer-filter.schema.json @@ -12,7 +12,7 @@ "type": "object", "title": "Offer Filter", "description": - "Filters are used to specify criteria for offer selection by topic or theme. The most common filter mechanism is by the tags that are associated with an offer. In general the Offer Filter selects a subset of Offers from the overall inventory, not based on the use case for the decisioning.", + "Filters are used to specify criteria for offer selection by topic or theme. The most common filter mechanism is by the tags that are associated with an offer. In general the offer filter selects a subset of offers from the overall inventory, not based on the use case for the decisioning.", "definitions": { "offer-filter": { "properties": { @@ -29,21 +29,22 @@ "description": "Filter name" }, "xdm:value": { - "type": "object", + "$ref": + "https://ns.adobe.com/experience/offer-management/filter-expression", "title": "Expression taking offer XDM instances (list of trees) as input", "description": - "Contains the condition that is used to select offers based on a combination of tags or, directly, using the @id of offers", - "$ref": - "https://ns.adobe.com/experience/offer-management/filter-expression" + "Contains the condition that is used to select offers based on a combination of tags or, directly, using the @id of offers" } - }, - "required": ["xdm:name", "xdm:value"] + } } }, "allOf": [ { "$ref": "#/definitions/offer-filter" + }, + { + "required": ["xdm:name", "xdm:value"] } ] } diff --git a/extensions/adobe/experience/offer-management/offer-management.description.md b/extensions/adobe/experience/offer-management/offer-management.description.md index 0ec99e5ff..afaba0cd9 100644 --- a/extensions/adobe/experience/offer-management/offer-management.description.md +++ b/extensions/adobe/experience/offer-management/offer-management.description.md @@ -1,28 +1,28 @@ -While Content is information that is directed towards an audience for consumption in a (digital) experience, Offer Management is used to personalize this experience by selecting the Next Best Offer and using the attached Content in a place within the experience that is marked as dynamic or "filled via an offer decision". +While Content is information that is directed towards an audience for consumption in a (digital) experience, "Offer Management" is used to personalize this experience by selecting the "Next Best Offer" and using the attached content in a place within the experience that is marked as dynamic or "filled via an offer decision". -In Offer Management the goal is to centralize the decisions that lead to those personalizied experiences across various channels. Interactions within one channel can then be analyzed to make decisions on what the next best offer, content or experience would be in a different channel. +In offer management the goal is to centralize the decisions that lead to those personalizied experiences across various channels. Interactions within one channel can then be analyzed to make decisions on what the next best offer, content or experience would be in a different channel. Decisioning happens based not only on the offers' constraints and parameters but more importantly based on individual profiles. In addition the decision may be based on which activity the end user who is associated with that profile engages in. This allows content to be personalized but also adapted to more contextual data. -The main concepts in the domain of Offer Management are: +The main concepts in the domain of offer management are: -- *Offer*: This is a data object that references one or several Contents - - Offers are used as the driver of the decisions when personalizing the experience or as a fallback when no qualifying Offer can be found. - - A single Offer can have multiple contents variants. An Offer Representation is the data that connects Offers to Content. Content is information that is directed towards an audience for consumption in a (digital) experience. Content is delivered through channels (or a particular medium). - - Offers used for personalization have various entities that serve as control data, each driving a different aspect of the overall decisioning process. - - _Eligibility_ Personalization Offers use a rules to determine if an offer must be excluded or can be included in the decisioning process based on context information such as the user's profile instance. The entity of the offer that controls this aspect is the SelectionConstraint. - - _Frequency_ Personalization Offers use a calculations to determine if a proposition has been made too many times already. The entity of the offer that controls this aspect is the CappingConstraint. - - _Priority_ Personalization Offers use a calculations to determine if the proposition of one offer should be made in favor of another offer within a given activity and context. The entity of the offer that controls this aspect is the Rank. +- *Offer*: This is a data object that references one or several content components + - Offers are used as the driver of the decisions when personalizing the experience or as a fallback when no qualifying offer can be found. + - A single offer can have multiple contents variants. An *Offer Representation* is the data that connects offers to content. Content is information that is directed towards an audience for consumption in a (digital) experience. Content is delivered through channels (or a particular medium). + - Offers used for personalization have various entities that serve as control data, each driving a different aspect of the overall decisioning process. + - _Eligibility_ Personalized offers use a set of rules to determine if an offer must be excluded or can be included in the decisioning process based on context information such as the user's profile instance. The entity of the offer that controls this aspect is the *Selection Constraint*. + - _Frequency_ Personalized offers use calculations to determine if a proposition has been made too many times already. The entity of the offer that controls this aspect is the *Capping Constraint*. + - _Priority_ Personalized offers use calculations to determine if the proposition of one offer is favored over another within a given activity and context. The entity of the offer that controls this aspect is the *Rank*. - *Offer Activity*: This is a data object that represents the execution of the decisioning processes with offers - - Offer Activities reference an Offer Filter object that is used reduce the offer choices by topic. This controls the *relevancy* aspect of the decisions within a given activity. For instance, an activity that is crafted for web site visitors can select different offers than an activity crafted for in-store visitors. Also, within the web site experience many different activities can exist and different experiences become relevant depending on the area of the web site the user engages with. - - Offer Activities reference an Offer Placement object that is used reduce the offer choices by their ability to fit *technically* into the overall experience, they also define the actual place in the experience where the winning selection's content will be inserted. For instance offers presented in an email must have content suited for embedding in an email message whereas offers used in a call center solution must be in a format that fits into the overal call experience. - - Offer Activities reference a single Fallback Offer that is used when the resulting list of sutable offers is empty after all other contraints are applied. + - Offer activities reference an *Offer Filter* object that is used reduce the offer choices by topic. This controls the *relevancy* aspect of the decisions within a given activity. For instance, an activity that is crafted for web site visitors can select different offers than an activity crafted for in-store visitors. Also, within the web site experience many different activities can exist and different experiences become relevant depending on the area of the web site the user engages with. + - Offer activities reference an *Offer Placement* object that is used reduce the offer choices by their ability to fit *technically* into the overall experience, they also define the actual place in the experience where the winning selection's content will be inserted. For instance offers presented in an email must have content suited for embedding in an email message whereas offers used in a call center solution must be in a format that fits into the overal call experience. + - Offer activities reference a single *Fallback Offer* that is used when the resulting list of sutable offers is empty after all other contraints are applied. In the diagram below the entities and relationships are shown for the offer management models. Strong entities are instances with their own `@id`. Those instances can be created independently of other instances. -Strong entities have a solid single line border. -Weak entities are dependent on a single strong entity, don't have an `@id` property and are shown with a thin double line. -Relaships are shown between entities as connectors with a diamond shape. The direction of the relationship is also shown. A formal description of the relationships is given in the file relationship.descriptors.schema.json +Strong entities have a solid single line border. +Weak entities are dependent on a single strong entity, don't have an `@id` property and are shown with a thin double line. +Relationships are shown between entities as connectors with a diamond shape. The direction of the relationship is also shown. A formal description of the relationships is given in the file relationship.descriptors.schema.json The end of a relationship connector in the diagram has special arrow symbols. There are two symbols on each end of the connection. The one closer to the entity box denotes the cardinality, or max degree (more below) and the one right before, closer to the diamond denotes the optionality (min degree). The symbols are interpeted as follows: - if the pairs of entities were listed in a table (only binary relations used here) and one would filter the table rows by any one of the `@id` of in a column the other entity side/column would be represented in that table by a certain number of entities/rows. diff --git a/extensions/adobe/experience/offer-management/offer-placement.description.md b/extensions/adobe/experience/offer-management/offer-placement.description.md index f2c182430..d4aec1ef2 100644 --- a/extensions/adobe/experience/offer-management/offer-placement.description.md +++ b/extensions/adobe/experience/offer-management/offer-placement.description.md @@ -1,5 +1,5 @@ -An Offer Placement is a location or place in a personalized message or content item. It is used to set technical constraints for content selected during offer decisioning. Technical constraints include the media type that is expected from the offer content (offer representation) and the channel that indicates the context for consuming the content. The channel imposed further contraints on the media type. For instance, html content used in an email is often structured differently than html content used on the web. -An Offer with its content representations refers to a placement object by the placement's @id. This is important that the constraints are not enumerated in the Offer or the Placement. The placement can be thought to represent the contract between the offer's content and the place where the content needs to be embedded. Any number of constraints can be agreed upon and outside of the repository and can be thought to be represented by a particular Offer Placement object. -An Offer Activity referencing a particular Offer Placement means the activity seeks to select content items that comply with the "virtual contract". An Offer with its representation pointing to the same Offer Placement means the Offer has a representation that complies with that particular "virtual contract". -By extending the Offer Placement schema more structure could be imposed finding the particular placement object. For example, in addition to the media type "image" a custom placement could add a field "aspectRatio" that holds the aspect ratio. What an aspect ratio is does not need to be understood by the offer decisioning process but creating or finding and attaching content to the Offer Representation needs to make sure the contract is respected and only images with a perticular aspect ratio are used for the offer when the representation makes the reference to the Offer Placement object. -The mutual contract does not need to rely on physical properties of the content. One can also express an intent what the content should be. An Offer Placement with a 'video' media type file could be called upon to represent a pre-roll ad or another Offer Placement might represent that an image is a banner image on a web page. +An *offer placement* is a location or place in a personalized message or content experience. It is used to set technical constraints for content selected during personalization. Technical constraints include the content component type that is expected from the personalization (offer representation) and the channel that indicates the context for consuming the content. The channel imposes further constraints on the media type. For instance, html content used in an email is often structured differently than html content used on the web. The placement also represents a request to produce certain types of metrics when an experience event is produced where this placemement is involved. For instance the placement facilitates a personalized clickable image inside an email shown to an end user. The placement may for instance request from the assembled experience that the click on its image gets reported in an experience event with a metric `https://ns.adobe.com/xdm/data/metrics/web/linkclicks` and a reference to this placement. +An *offer* with its content representations refers to an offer placement object by the placement's @id. This is important that the constraints are not enumerated in the offer or the placement. The placement can be thought to represent the contract between the offer's content and the place where the content needs to be embedded. Any number of constraints can be agreed upon and outside of the repository and can be thought to be represented by a particular offer placement object. +An *offer activity* referencing a particular offer placement means the activity seeks to select content items that comply with the "virtual contract". An offer with its representation pointing to the same offer placement means the offer has a representation that complies with that particular "virtual contract". +By extending the offer placement schema more structure could be imposed finding the particular placement object. For example, in addition to the media type "image" a custom placement could add a field `aspectRatio` that holds the aspect ratio. What an aspect ratio is does not need to be understood by the offer decisioning process but creating or finding and attaching content to the offer representation needs to make sure the contract is respected and only images with a perticular aspect ratio are used for the offer when the representation makes the reference to the offer placement object. +The mutual contract does not need to rely on physical properties of the content. One can also express an intent what the content should be. An offer placement with a 'video' media type file could be called upon to represent a pre-roll ad or another offer placement might represent that an image is a banner image on a web page. diff --git a/extensions/adobe/experience/offer-management/offer-placement.schema.json b/extensions/adobe/experience/offer-management/offer-placement.schema.json index 28edc6329..eb2cb31c1 100644 --- a/extensions/adobe/experience/offer-management/offer-placement.schema.json +++ b/extensions/adobe/experience/offer-management/offer-placement.schema.json @@ -12,7 +12,7 @@ "type": "object", "title": "Placement", "description": - "An Offer Placement describes a location or place in a personalized message. It is used to set technical constraints for content that the personalization offer supplies.", + "A placement describes a location or place in a personalized message. It is used to set technical constraints for content that the personalization decision supplies. The placement also represents a request to produce certain types of metrics when an experience event is produced where this placemement is involved. For instance the placement facilitates a personalized clickable image inside an email shown to an end user. The placement may for instance request from the assembled experience that the click on its image gets reported in an experience event with a metric `https://ns.adobe.com/xdm/data/metrics/web/linkclicks` and a reference to this placement. ", "definitions": { "offer-placement": { "properties": { @@ -26,35 +26,50 @@ "xdm:name": { "type": "string", "title": "Name", - "description": "Offer placement name" + "description": + "An assigned name for the placement to refer to it in human interactions" }, "xdm:description": { "type": "string", "title": "Description", "description": - "Offer placement description. It is used to convey human readable intentions in an application on how offers are used in the overall message delivery. That a certain space is a \"Banner\" in a web page is often conveyed via the description and not by a formal method." + "Placement description. It is used to convey human readable intentions on how dynamic content is used in the overall message delivery. That a certain space is a \"Banner\" in a web page is often conveyed via the description and not by a formal method." }, "xdm:channel": { "type": "string", "format": "uri", - "title": "Channel", + "title": "Communication Channel", "description": - "The Channel URI where the offer content is intended to be placed. The channel constraint is used to convey not only where the offer will be used but determine the content editor or validator that is used for the Offer's representation. See 'https://ns.adobe.com/xdm/channels/channel'" + "A reference to the channel entity. The channel indicates where the dynamic content is intended to be delivered. The channel constraint is used to convey not only where the offer will be used but also to determine the content editor or validator that is used for the experience. See 'https://ns.adobe.com/xdm/channels/channel'" }, - "xdm:contentType": { + "xdm:componentType": { "$ref": - "https://ns.adobe.com/experience/offer-management/representation-content#/definitions/content-type", + "https://ns.adobe.com/experience/offer-management/offer-representation#/definitions/content-component-type", "title": "Content Type", "description": - "A constraint for the content that can be shown in the place described by this placement. Content Type: image, html or plain text" + "A constraint for the content that can be shown in the place described by this placement. Component Types are: image, html or plain text" + }, + "xdm:contentTypes": { + "type": "array", + "items": { + "type": "string", + "title": "MIME Media Type", + "description": + "[Multipurpose Internet Mail Extensions (MIME)](https://tools.ietf.org/html/rfc2046)", + "pattern": "\\w+\\/[-.\\w]+(?:\\+[-.\\w]+)?", + "description": + "A constraint for the media type of the components that is expected in that placement. There could be more than one media type possible for one component such as different image format." + } } - }, - "required": ["xdm:name", "xdm:channel", "xdm:contentType"] + } } }, "allOf": [ { "$ref": "#/definitions/offer-placement" + }, + { + "required": ["xdm:name", "xdm:channel", "xdm:componentType"] } ] } diff --git a/extensions/adobe/experience/offer-management/offer-representation.example.1.json b/extensions/adobe/experience/offer-management/offer-representation.example.1.json index 3bf767f4d..8433b988b 100644 --- a/extensions/adobe/experience/offer-management/offer-representation.example.1.json +++ b/extensions/adobe/experience/offer-management/offer-representation.example.1.json @@ -17,7 +17,11 @@ "en-SG", "en-ZA" ], - "xdm:text": + "repo:name": "expiration_message_en", + "repo:id": "urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e", + "repo:resolveURL": + "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e"&resource="api:metadata/application"&name=expiration_message_en", + "xdm:copyline": "Dear Madam {{profile.person.lastName}}, the offer expires 12/6/2018" }, { @@ -25,7 +29,11 @@ "https://ns.adobe.com/experience/offer-management/content-component-text", "dc:format": "text/template", "dc:language": ["en-US"], - "xdm:text": + "repo:name": "expiration_message_en-US", + "repo:id": "urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e", + "repo:resolveURL": + "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e"&resource="api:metadata/application"&name="expiration_message_en-US"", + "xdm:copyline": "Dear Madam {{profile.person.lastName}}, the offer expires 6/12/2018" }, { @@ -33,7 +41,10 @@ "https://ns.adobe.com/experience/offer-management/content-component-text", "dc:format": "text/template", "dc:language": ["es"], - "xdm:text": + "repo:name": "expiration_message_es", + "repo:resolveURL": + "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e"&resource="api:metadata/application"&name="expiration_message_es"", + "xdm:copyline": "Estimada señora {{profile.person.lastName}}: La oferta vence el 12/6/2018" } ], diff --git a/extensions/adobe/experience/offer-management/offer-representation.example.2.json b/extensions/adobe/experience/offer-management/offer-representation.example.2.json index b64f451eb..115cf0b7f 100644 --- a/extensions/adobe/experience/offer-management/offer-representation.example.2.json +++ b/extensions/adobe/experience/offer-management/offer-representation.example.2.json @@ -8,7 +8,8 @@ "repo:name": "holidayOffer.2018.png", "repo:id": "urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805eff8a69e", "repo:resolveURL": - "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805eff8a69e"" + "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805eff8a69e"", + "xdm:linkURL": "https://www.mycompany.com/product?trackId=12345" } ], "xdm:placement": "uri:xcore:placement-0001", diff --git a/extensions/adobe/experience/offer-management/offer-representation.schema.json b/extensions/adobe/experience/offer-management/offer-representation.schema.json index 13f7eb408..78f35a8d4 100644 --- a/extensions/adobe/experience/offer-management/offer-representation.schema.json +++ b/extensions/adobe/experience/offer-management/offer-representation.schema.json @@ -19,7 +19,7 @@ "xdm:components": { "type": "array", "description": - "The content components of the Offer Representation, including all their language variants. Specific components are found by 'dx:format', 'dc:subject' and 'dc:language' or a combination thereof. This metadata is used to locate or represent the content that is associated with an offer and integrate it according to the placement contract.", + "The content components of the offer representation, including all their language variants. Specific components are found by 'dx:format', 'dc:subject' and 'dc:language' or a combination thereof. This metadata is used to locate or represent the content that is associated with an offer and integrate it according to the placement contract.", "items": { "$ref": "#/definitions/content-component" } @@ -29,23 +29,22 @@ "format": "uri", "title": "Channel", "description": - "The channel constraint is used to convey not only where the offer will be used but determine the content editor or validator that is used for the Offer's representation. The value is a valid Channel URI. See 'https://ns.adobe.com/xdm/channels/channel'" + "The channel constraint is used to convey not only where the offer will be used but determine the content editor or validator that is used for the offer's representation. The value is a valid Channel URI. See 'https://ns.adobe.com/xdm/channels/channel'" }, "xdm:placement": { "type": "string", "format": "uri", "title": "Placement", "description": - "Placement to comply with. The value is the URI (@id) of the OfferPlacement that is referenced. See OfferPlacement schema https://ns.adobe.com/experience/offer-management/offer-placement" + "Placement to comply with. The value is the URI (@id) of the offer placement that is referenced. See schema https://ns.adobe.com/experience/offer-management/offer-placement" } - }, - "required": ["xdm:components", "xdm:channel", "xdm:placement"] + } }, "content-component-type": { "type": "string", "format": "uri", - "title": "Content Type", - "description": "Content Type: image, html or plain text", + "title": "Content Component Type", + "description": "Content Component Type: imagelink, html or text", "enum": [ "https://ns.adobe.com/experience/offer-management/content-component-text", "https://ns.adobe.com/experience/offer-management/content-component-html", @@ -53,11 +52,11 @@ ], "meta:enum": { "https://ns.adobe.com/experience/offer-management/content-component-text": - "Text", + "Text component", "https://ns.adobe.com/experience/offer-management/content-component-html": - "HTML", + "HTML component", "https://ns.adobe.com/experience/offer-management/content-component-imagelink": - "Image Link" + "Image and click link component" } }, "content-component": { @@ -71,7 +70,9 @@ ], "properties": { "@type": { - "$ref": "#/definitions/content-component-type" + "$ref": "#/definitions/content-component-type", + "description": + "Type of the component. Acts as processing hint for the client. When the experience is assembled the composer will look for the component(s) that have a specific type." }, "dc:format": { "meta:usereditable": false, @@ -121,7 +122,9 @@ "https://plaftform.adobe.io/resolveByPath?path="/mycorp/content/projectx/fragment/prod/herobanners/banner14.html3"" ] } - }, + } + }, + { "required": ["@type", "dc:format"] } ] @@ -130,6 +133,9 @@ "allOf": [ { "$ref": "#/definitions/offer-representation" + }, + { + "required": ["xdm:components", "xdm:channel", "xdm:placement"] } ] } diff --git a/extensions/adobe/experience/offer-management/offer.example.1.json b/extensions/adobe/experience/offer-management/offer.example.1.json new file mode 100644 index 000000000..68b2f6441 --- /dev/null +++ b/extensions/adobe/experience/offer-management/offer.example.1.json @@ -0,0 +1,20 @@ +{ + "@id": "xcore:personalized-offer:e526a1503bf29e9", + "xdm:name": "Personalized Offer 1", + "xdm:status": "approved", + "xdm:representations": [ + { + "xdm:components": [ + { + "xdm:text": "You can always get what you want!", + "@type": + "https://ns.adobe.com/experience/offer-management/content-component-text", + "dc:format": "text/template" + } + ], + "xdm:channel": "https://ns.adobe.com/xdm/channels/email", + "xdm:placement": "xcore:offer-placement:e51944a87919861" + } + ], + "xdm:tags": ["xcore:tag:e5196f1d9119862"] +} diff --git a/extensions/adobe/experience/offer-management/offer.schema.json b/extensions/adobe/experience/offer-management/offer.schema.json index d51037475..e2e8a41df 100644 --- a/extensions/adobe/experience/offer-management/offer.schema.json +++ b/extensions/adobe/experience/offer-management/offer.schema.json @@ -27,7 +27,7 @@ "type": "string", "title": "Name", "description": - "The Offer name. A human readable string to find one or more offers." + "The offer's name. A human readable string to find one or more offers." }, "xdm:status": { "type": "string", @@ -47,12 +47,12 @@ "type": "array", "title": "Tags", "description": - "The set of tags associated with this offer. The tags are used in OfferFilter expressions to constrain the overal offer inventory to a topical sub set (category).", + "The set of tags associated with this offer. The tags are used in offer filter expressions to constrain the overal offer inventory to a topical sub set (category).", "items": { "type": "string", "format": "uri", "description": - "A reference to a Tag object. The value is the URI (@id) of the Tag that is referenced. See Tag schema https://ns.adobe.com/experience/offer-management/tag" + "An identifier of a Tag object. The value is the @id of the Tag that is referenced. See Tag schema https://ns.adobe.com/experience/offer-management/tag" } }, "xdm:representations": { @@ -76,13 +76,15 @@ "description": "Custom metadata is a key-value map that allows the end-users to attach properties to individual offer instances. Any string can be used as a key name, the values are also strings." } - }, - "required": ["xdm:name", "xdm:status"] + } } }, "allOf": [ { "$ref": "#/definitions/offer" + }, + { + "required": ["xdm:name", "xdm:status"] } ] } diff --git a/extensions/adobe/experience/offer-management/offer_model.png b/extensions/adobe/experience/offer-management/offer_model.png index 18d44ba3f..ce39bd0fd 100644 Binary files a/extensions/adobe/experience/offer-management/offer_model.png and b/extensions/adobe/experience/offer-management/offer_model.png differ diff --git a/extensions/adobe/experience/offer-management/personalized-offer.example.1.json b/extensions/adobe/experience/offer-management/personalized-offer.example.1.json new file mode 100644 index 000000000..d145e6990 --- /dev/null +++ b/extensions/adobe/experience/offer-management/personalized-offer.example.1.json @@ -0,0 +1,32 @@ +{ + "@id": "xcore:personalized-offer:e526a1503bf29e9", + "xdm:name": "Personalized Offer 1", + "xdm:status": "approved", + "xdm:representations": [ + { + "xdm:components": [ + { + "xdm:text": "You can always get what you want!", + "@type": + "https://ns.adobe.com/experience/offer-management/content-component-text", + "dc:format": "text/template" + } + ], + "xdm:channel": "https://ns.adobe.com/xdm/channels/email", + "xdm:placement": "xcore:offer-placement:e51944a87919861" + } + ], + "xdm:tags": ["xcore:tag:e5196f1d9119862"], + "xdm:selectionConstraint": { + "xdm:startDate": "2018-03-13T05:59:18.914Z", + "xdm:endDate": "2018-12-27T05:59:18.914Z", + "xdm:eligibilityRule": "xcore:eligibility-rule:e5244c22eff29e8" + }, + "xdm:cappingConstraint": { + "xdm:frequency": 2, + "xdm:volume": 10 + }, + "xdm:rank": { + "xdm:priority": 1 + } +} diff --git a/extensions/adobe/experience/offer-management/personalized-offer.schema.json b/extensions/adobe/experience/offer-management/personalized-offer.schema.json index 86e8a32af..f8b39ff02 100644 --- a/extensions/adobe/experience/offer-management/personalized-offer.schema.json +++ b/extensions/adobe/experience/offer-management/personalized-offer.schema.json @@ -13,40 +13,50 @@ "type": "object", "title": "Adobe Experience Cloud Personalized Offer", "description": - "A Personalized Offer is the conceptual entity that is chosen during the decisioning process. The objective for decisioning is to take a large inventory of content items and apply numerous contraint rules to that inventory to first narrow it down and then rank the qualifying options. The outcome modifies the overall experience to accommodate specific individuals, sometimes tied to groups or segments of individuals.", + "A personalized offer is the conceptual entity that is chosen during the decisioning process. The objective for decisioning is to take a large inventory of content items and apply numerous constraint rules to that inventory to first narrow it down and then rank the qualifying options. The outcome modifies the overall experience to accommodate specific individuals, sometimes tied to groups or segments of individuals.", "definitions": { "personalized-offer": { - "properties": { - "xdm:rank": { - "$ref": "https://ns.adobe.com/experience/offer-management/rank", - "title": "Rank", - "description": - "Offer Rank (priority). Defines what is considered the \"best offer\" given the context of the decision. Among all the Offers that have not been disqualified due other constraints, the ranking will decide top (or top N) offers to be proposed." + "allOf": [ + { + "properties": { + "xdm:rank": { + "$ref": "https://ns.adobe.com/experience/offer-management/rank", + "title": "Rank", + "description": + "Offer Rank (priority). Defines what is considered the \"best offer\" given the context of the decision. Among all the Offers that have not been disqualified due other constraints, the ranking will decide top (or top N) offers to be proposed." + }, + "xdm:selectionConstraint": { + "$ref": + "https://ns.adobe.com/experience/offer-management/selection-constraint", + "title": "Selection Constraints", + "description": + "Selection constraints define all rules that decide if an offer disqualifies from the set of eligible offers at this moment, for this context and/or for this profile identity. For example, offers tyically have a start and end date before and after they are not eligible for consideration anymore" + }, + "xdm:cappingConstraint": { + "$ref": + "https://ns.adobe.com/experience/offer-management/capping-constraint", + "title": "Capping Constaints", + "description": + "Capping constraint define additional rules based on prior offer proposition, either across all audiences or for a partcular profile identity." + } + } }, - "xdm:selectionConstraint": { + { "$ref": - "https://ns.adobe.com/experience/offer-management/selection-constraint", - "title": "Selection Constraints", - "description": - "Selection constraints define all rules that decide if an offer disqualifies from the set of eligible offers at this moment, for this context and/or for this profile identity. For example, Offers tyically have a start and end date before and after they are not eligible for consideration anymore" - }, - "xdm:cappingConstraint": { - "$ref": - "https://ns.adobe.com/experience/offer-management/capping-constraint", - "title": "Capping Constaints", - "description": - "Capping constraint define additional rules based on prior offer proposition, either across all audiences or for a partcular profile identity." + "https://ns.adobe.com/experience/offer-management/offer#/definitions/offer" } - }, - "required": ["xdm:rank", "xdm:selectionConstraint"] + ] } }, "allOf": [ + { + "$ref": "https://ns.adobe.com/experience/offer-management/offer" + }, { "$ref": "#/definitions/personalized-offer" }, { - "$ref": "https://ns.adobe.com/experience/offer-management/offer" + "required": ["xdm:rank", "xdm:selectionConstraint"] } ] } diff --git a/extensions/adobe/experience/offer-management/rank.schema.json b/extensions/adobe/experience/offer-management/rank.schema.json index 6fbf6ed76..e01706363 100644 --- a/extensions/adobe/experience/offer-management/rank.schema.json +++ b/extensions/adobe/experience/offer-management/rank.schema.json @@ -22,13 +22,15 @@ "description": "Offer priority", "minimum": 0 } - }, - "required": ["xdm:priority"] + } } }, "allOf": [ { "$ref": "#/definitions/rank" + }, + { + "required": ["xdm:priority"] } ] } diff --git a/extensions/adobe/experience/offer-management/selection-constraint.schema.json b/extensions/adobe/experience/offer-management/selection-constraint.schema.json index c7fed3967..fa7ecaa92 100644 --- a/extensions/adobe/experience/offer-management/selection-constraint.schema.json +++ b/extensions/adobe/experience/offer-management/selection-constraint.schema.json @@ -22,29 +22,31 @@ "format": "date-time", "title": "Start Date", "description": - "Offer Start Date. Offers that have not reached their start date are not yet considered eligible in the decisioning." + "Offer start date. Offers that have not reached their start date are not yet considered eligible in the decisioning." }, "xdm:endDate": { "type": "string", "format": "date-time", "title": "End Date", "description": - "Offer End Date. Offers that have passed their end date are no longer considered eligible in the decisioning process." + "Offer end date. Offers that have passed their end date are no longer considered eligible in the decisioning process." }, "xdm:eligibilityRule": { "type": "string", "format": "uri", "title": "Eligibility Rule", "description": - "The reference to an eligibility rule that tests a condition using the profile and/or other contextual XDM instances. The value is the URI (@id) of the eligibility rule that is referenced. See EligibilityRule schema https://ns.adobe.com/experience/offer-management/eligibility-rule" + "The reference to an eligibility rule that tests a condition using the profile and/or other contextual XDM instances. The value is the URI (@id) of the eligibility rule that is referenced. See schema https://ns.adobe.com/experience/offer-management/eligibility-rule" } - }, - "required": ["xdm:startDate", "xdm:endDate"] + } } }, "allOf": [ { "$ref": "#/definitions/selection-constraint" + }, + { + "required": ["xdm:startDate", "xdm:endDate"] } ] } diff --git a/extensions/adobe/experience/offer-management/tag.schema.json b/extensions/adobe/experience/offer-management/tag.schema.json index 5281b5609..d750f2c60 100644 --- a/extensions/adobe/experience/offer-management/tag.schema.json +++ b/extensions/adobe/experience/offer-management/tag.schema.json @@ -29,13 +29,15 @@ "description": "The Tag's external human-readable representation to the clients." } - }, - "required": ["xdm:name"] + } } }, "allOf": [ { "$ref": "#/definitions/tag" + }, + { + "required": ["xdm:name"] } ] }