Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"xdm:loyalty": {
"xdm:discounts": [
{
"xdm:value": 10.0,
"xdm:source": "coupon",
"xdm:triggeredForItem": "SKU-12345",
"xdm:scope": "item",
"xdm:promotionId": "PROMO-WELCOME"
},
{
"xdm:value": 20.0,
"xdm:source": "pointsRedemption",
"xdm:scope": "transaction",
"xdm:promotionId": "PROMO-ABC"
},
{
"xdm:value": 6.99,
"xdm:source": "referral",
"xdm:scope": "additionalCost",
"xdm:promotionId": "PROMO-REF"
}
],
"xdm:couponRedemption": [
{
"xdm:id": "WELCOME10",
"xdm:series": "WELCOME",
"xdm:seriesName": "welcome 10% off",
"xdm:promotionId": "PROMO-WELCOME"
}
],
"xdm:pointsRedemption": {
"xdm:value": 50.0,
"xdm:promotionId": "PROMO-POINTS",
"xdm:loyaltyProgramId": "LP-001",
"xdm:transactionId": "TXN-RED-001"
},
"xdm:referralRedemption": [
{
"xdm:code": "REF-1234",
"xdm:promotionId": "PROMO-REF"
}
],
"xdm:pointsGained": [
{
"xdm:value": 50.0,
"xdm:promotionId": "PROMO-POINTS-GAIN",
"xdm:loyaltyProgramId": "LP-001",
"xdm:transactionId": "TXN-GAIN-001"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{
"meta:license": [
"Copyright 2022 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/experienceevent-loyalty-details",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Loyalty Event Details",
"type": "object",
"meta:extensible": true,
"meta:abstract": true,
"meta:tags": {
"industry": ["all"]
},
"meta:intendedToExtend": ["https://ns.adobe.com/xdm/context/experienceevent"],
"description": "Loyalty-related event data such as discounts, coupon/points/redemption, referrals, and points gained.",
"definitions": {
"experienceevent-loyalty": {
"properties": {
"xdm:loyalty": {
"type": "object",
"description": "Captures loyalty-related attributes observed on an experience event.",
"properties": {
"xdm:discounts": {
"title": "Discounts",
"type": "array",
"description": "List of discounts applied as part of this event.",
"items": {
"type": "object",
"properties": {
"xdm:value": {
"title": "Discount Value",
"type": "number",
"description": "Monetary value of the discount applied."
},
"xdm:source": {
"title": "Discount Source",
"type": "string",
"description": "Origin of the discount (e.g., coupon, referral, pointsRedemption)."
},
"xdm:triggeredForItem": {
"title": "Triggered For Item",
"type": "string",
"description": "SKU or identifier of the item this discount is for, if applicable."
},
"xdm:scope": {
"title": "Scope",
"type": "string",
"description": "Scope of the discount (e.g., additionalCost, item, total)."
},
"xdm:promotionId": {
"title": "Promotion ID",
"type": "string",
"description": "Identifier of the promotion that triggered this discount."
}
}
}
},
"xdm:couponRedemption": {
"title": "Coupon Redemptions",
"type": "array",
"description": "Coupons redeemed during this event.",
"items": {
"type": "object",
"properties": {
"xdm:id": {
"title": "Coupon ID",
"type": "string",
"description": "Coupon code or identifier."
},
"xdm:series": {
"title": "Coupon Series",
"type": "string",
"description": "Series or campaign the coupon belongs to."
},
"xdm:seriesName": {
"title": "Coupon Series Name",
"type": "string",
"description": "Human-readable name of the coupon series."
},
"xdm:promotionId": {
"title": "Promotion ID",
"type": "string",
"description": "Identifier of the promotion this coupon is from."
}
}
}
},
"xdm:pointsRedemption": {
"title": "Points Redemption",
"type": "object",
"description": "Points redeemed as part of this event.",
"properties": {
"xdm:value": {
"title": "Points Value",
"type": "number",
"description": "Number of points redeemed."
},
"xdm:promotionId": {
"title": "Promotion ID",
"type": "string",
"description": "Identifier of the promotion governing this points redemption."
},
"xdm:loyaltyProgramId": {
"title": "Loyalty Program ID",
"type": "string",
"description": "Identifier of the loyalty program managing these points."
},
"xdm:transactionId": {
"title": "Transaction ID",
"type": "string",
"description": "Identifier of the points redemption transaction, if applicable."
}
}
},
"xdm:referralRedemption": {
"title": "Referral Redemptions",
"type": "array",
"description": "Referral codes redeemed during this event.",
"items": {
"type": "object",
"properties": {
"xdm:code": {
"title": "Referral Code",
"type": "string",
"description": "Referral code used."
},
"xdm:promotionId": {
"title": "Promotion ID",
"type": "string",
"description": "Identifier of the promotion the referral is from."
}
}
}
},
"xdm:pointsGained": {
"title": "Points Gained",
"type": "array",
"description": "Points gained as part of this event.",
"items": {
"type": "object",
"properties": {
"xdm:value": {
"title": "Points Value",
"type": "number",
"description": "Number of points gained."
},
"xdm:promotionId": {
"title": "Promotion ID",
"type": "string",
"description": "Identifier of the promotion governing this points acquisition."
},
"xdm:loyaltyProgramId": {
"title": "Loyalty Program ID",
"type": "string",
"description": "Identifier of the loyalty program managing these points."
},
"xdm:transactionId": {
"title": "Transaction ID",
"type": "string",
"description": "Identifier of the points acquisition transaction, if applicable."
}
}
}
}
}
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/experienceevent-loyalty"
}
],
"meta:status": "experimental"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"xdm:loyalty": {
"xdm:joinDate": "2021-01-26T15:52:25+00:00",
"xdm:loyaltyID": ["L79UH4XR1", "ALT-12345"],
"xdm:program": "purchase rewards",
"xdm:status": "active",
"xdm:tier": "silver",
"xdm:tierExpiryDate": "2025-12-31T23:59:59Z",
"xdm:upgradeDate": "2022-07-01T10:00:00Z",
"xdm:points": 8974,
"xdm:pointsRedeemed": 5148,
"xdm:adjustedPoints": 50,
"xdm:expiredPoints": 120,
"xdm:lifetimePoints": 14292,
"xdm:lifetimePurchases": 2399.95,
"xdm:promisedPoints": 300,
"xdm:returnedPoints": 20,
"xdm:pointsExpiration": [
{
"xdm:pointsExpiring": 300,
"xdm:pointsExpirationDate": "2025-10-31T00:00:00Z"
}
],
"xdm:cardsDetails": [
{
"xdm:number": "999000111222",
"xdm:series": "standard",
"xdm:status": "active"
}
]
}
}
75 changes: 75 additions & 0 deletions components/fieldgroups/profile/profile-loyalty-details.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,81 @@
"description": "Captures the loyalty progam tier in which a visitor is enrolled.",
"meta:titleId": "profile-loyalty-details##xdm:tier##title##75921",
"meta:descriptionId": "profile-loyalty-details##xdm:tier##description##54761"
},
"xdm:tierExpiryDate": {
"title": "Tier Expiry Date",
"type": "string",
"format": "date-time",
"description": "Date when the customer's current loyalty tier expires."
},
"xdm:adjustedPoints": {
"title": "Adjusted Points",
"type": "number",
"description": "Points that have been adjusted due to corrections, returns, or other modifications.",
"meta:titleId": "profile-loyalty-details##xdm:adjustedPoints##title##12345",
"meta:descriptionId": "profile-loyalty-details##xdm:adjustedPoints##description##67890"
},
"xdm:cardsDetails": {
"title": "Loyalty Cards Details",
"type": "array",
"items": {
"type": "object",
"properties": {
"xdm:number": {
"title": "Card Number",
"type": "string",
"description": "The loyalty card number or identifier."
},
"xdm:series": {
"title": "Card Series",
"type": "string",
"description": "The series or collection the loyalty card belongs to."
},
"xdm:status": {
"title": "Card Status",
"type": "string",
"description": "Current status of the loyalty card (active, inactive, suspended, etc.)."
}
}
},
"description": "Details about the user's loyalty cards, if any.",
"meta:titleId": "profile-loyalty-details##xdm:cardsDetails##title##11111",
"meta:descriptionId": "profile-loyalty-details##xdm:cardsDetails##description##22222"
},
"xdm:expiredPoints": {
"title": "Expired Points",
"type": "number",
"description": "Total number of points that have expired and are no longer available for use.",
"meta:titleId": "profile-loyalty-details##xdm:expiredPoints##title##55555",
"meta:descriptionId": "profile-loyalty-details##xdm:expiredPoints##description##66666"
},
"xdm:lifetimePoints": {
"title": "Lifetime Points",
"type": "number",
"description": "Total points earned by the customer throughout their entire loyalty program membership.",
"meta:titleId": "profile-loyalty-details##xdm:lifetimePoints##title##77777",
"meta:descriptionId": "profile-loyalty-details##xdm:lifetimePoints##description##88888"
},
"xdm:lifetimePurchases": {
"title": "Lifetime Purchases",
"type": "number",
"description": "Total monetary value of all purchases made by the customer throughout their loyalty program membership.",
"meta:titleId": "profile-loyalty-details##xdm:lifetimePurchases##title##99999",
"meta:descriptionId": "profile-loyalty-details##xdm:lifetimePurchases##description##00000"
},
"xdm:promisedPoints": {
"title": "Promised Points",
"type": "number",
"description": "Points that have been promised but not yet credited to the customer's account.",
"meta:titleId": "profile-loyalty-details##xdm:promisedPoints##title##11112",
"meta:descriptionId": "profile-loyalty-details##xdm:promisedPoints##description##22223"
},
"xdm:returnedPoints": {
"title": "Returned Points",
"type": "number",
"description": "Points that have been returned to the customer's account due to refunds or adjustments.",
"meta:titleId": "profile-loyalty-details##xdm:returnedPoints##title##33334",
"meta:descriptionId": "profile-loyalty-details##xdm:returnedPoints##description##44445"
}
},
"meta:descriptionId": "profile-loyalty-details##xdm:loyalty##description##85311"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"$id": "https://ns.adobe.com/xdm/mixins/industry-verticals/experienceevent-loyalty-details",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Loyalty Details",
"title": "Loyalty Event Details",
"type": "object",
"meta:extensible": true,
"meta:abstract": true,
Expand Down