diff --git a/extensions/adobe/experience/ajo/loyalty/challenge-personalization.example.1.json b/extensions/adobe/experience/ajo/loyalty/challenge-personalization.example.1.json new file mode 100644 index 000000000..fc2a34b3f --- /dev/null +++ b/extensions/adobe/experience/ajo/loyalty/challenge-personalization.example.1.json @@ -0,0 +1,35 @@ +{ + "_id": "personId1", + "challenge": { + "description": "Complete your morning routine challenge this week and earn bonus points!", + "reward": "100 points", + "tasks": [ + { + "name": "breakfast_purchase_challenge", + "description": "Purchase 3 breakfast items during morning hours for 2 consecutive days", + "excludedItemLabels": [ + "PROMO-ITEM-001", + "GIFT-CARD-100" + ], + "includedItemLabels": [ + "BREAKFAST-SANDWICH-001", + "COFFEE-LATTE-16OZ", + "BAGEL-CREAM-CHEESE", + "OATMEAL-CLASSIC" + ], + "qtyMin": 3, + "spendMin": 30.0, + "multiDay": { + "contiguous": true, + "days": 2 + }, + "maxRepeats": 2, + "reward": "50 points" + } + ], + "timeOfDay": { + "end": 900, + "start": 720 + } + } +} \ No newline at end of file diff --git a/extensions/adobe/experience/ajo/loyalty/challenge-personalization.example.2.json b/extensions/adobe/experience/ajo/loyalty/challenge-personalization.example.2.json new file mode 100644 index 000000000..5114c29bd --- /dev/null +++ b/extensions/adobe/experience/ajo/loyalty/challenge-personalization.example.2.json @@ -0,0 +1,32 @@ +{ + "_id": "personId2", + "challenge": { + "description": "Spend $30 on lunch items this week and get rewarded!", + "tasks": [ + { + "name": "lunch_spend_challenge", + "description": "Purchase at least $30 worth of lunch menu items during lunch hours", + "excludedItemLabels": [ + "ALCOHOL-BEER-001", + "ALCOHOL-WINE-002", + "GIFT-CARD-050" + ], + "includedItemLabels": [ + "SANDWICH-TURKEY-CLUB", + "SALAD-CAESAR", + "SOUP-TOMATO-BASIL", + "WRAP-CHICKEN-AVOCADO", + "BOWL-POKE-TUNA", + "BURGER-VEGGIE" + ], + "spendMin": 30.00, + "maxRepeats": 1, + "reward": "150 points" + } + ], + "timeOfDay": { + "end": 840, + "start": 660 + } + } +} \ No newline at end of file diff --git a/extensions/adobe/experience/ajo/loyalty/challenge-personalization.schema.json b/extensions/adobe/experience/ajo/loyalty/challenge-personalization.schema.json new file mode 100644 index 000000000..708b3479e --- /dev/null +++ b/extensions/adobe/experience/ajo/loyalty/challenge-personalization.schema.json @@ -0,0 +1,144 @@ +{ + "meta:license": [ + "Copyright 2025 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/ajo/loyalty/challenge-personalization", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "Challenge Personalization", + "type": "object", + "meta:extensible": true, + "meta:abstract": true, + "meta:extends": ["https://ns.adobe.com/xdm/data/record"], + "description": "Personalization settings for loyalty challenges including task configurations, product restrictions, goals, and time windows.", + "definitions": { + "challenge-personalization": { + "properties": { + "xdm:challenge": { + "title": "Challenge", + "type": "object", + "description": "Challenge personalization details.", + "properties": { + "xdm:description": { + "title": "Description", + "type": "string", + "description": "Personalized challenge description." + }, + "xdm:reward": { + "title": "Reward", + "type": "string", + "description": "Reward for completing the entire challenge." + }, + "xdm:tasks": { + "title": "Tasks", + "type": "array", + "description": "List of tasks within the challenge.", + "items": { + "type": "object", + "required": [ + "xdm:name" + ], + "properties": { + "xdm:name": { + "title": "Task Name", + "type": "string", + "description": "Name of the task to personalize." + }, + "xdm:description": { + "title": "Task Description", + "type": "string", + "description": "Personalized task description." + }, + "xdm:excludedItemLabels": { + "title": "Excluded Item Labels", + "type": "array", + "description": "List of product SKU/categories/labels excluded from qualifying for this task.", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "xdm:includedItemLabels": { + "title": "Included Item Labels", + "type": "array", + "description": "List of product SKUs/categories/labels that can qualify for this task.", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "xdm:qtyMin": { + "title": "Minimum Quantity", + "type": "number", + "description": "Target quantity to achieve." + }, + "xdm:spendMin": { + "title": "Minimum Spend", + "type": "number", + "description": "Target spending amount to achieve." + }, + "xdm:multiDay": { + "title": "multiDay", + "type": "object", + "description": "Multi-day visit requirements for task completion.", + "properties": { + "xdm:contiguous": { + "title": "Contiguous", + "type": "boolean", + "description": "Whether the visits must be on consecutive days." + }, + "xdm:days": { + "title": "Days", + "type": "integer", + "description": "Number of qualified days required." + } + } + }, + "xdm:maxRepeats": { + "title": "Max Repeats", + "type": "integer", + "description": "Maximum number of times this task can be repeated." + }, + "xdm:reward": { + "title": "Reward", + "type": "string", + "description": "Reward for completing this task." + } + } + } + }, + "xdm:timeOfDay": { + "title": "Time of Day", + "type": "object", + "description": "Time window during the day for which the challenge is active.", + "properties": { + "xdm:start": { + "title": "Start", + "type": "integer", + "description": "Start time in minutes from midnight (e.g., 720 for 12:00 PM)." + }, + "xdm:end": { + "title": "End", + "type": "integer", + "description": "End time in minutes from midnight (e.g., 900 for 3:00 PM)." + } + } + } + } + } + } + } + }, + "allOf": [ + { + "$ref": "https://ns.adobe.com/xdm/data/record" + }, + { + "$ref": "#/definitions/challenge-personalization" + } + ], + "meta:status": "experimental" +} +