oneie 3.3.3 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/folders.yaml +1 -1
- package/one/groups/nine-padel-consulting.md +774 -0
- package/one/groups/nine-padel-customers.md +138 -0
- package/one/groups/nine-padel-data-structure.md +167 -0
- package/one/groups/nine-padel-ontology-specification.md +359 -0
- package/one/groups/nine-padel-ontology.md +143 -0
- package/one/groups/nine-padel-strategy.md +234 -0
- package/one/groups/nine-padel.md +211 -0
- package/one/knowledge/.obsidian/ecommerce-ontology.md +192 -0
- package/one/{.obsidian → knowledge/.obsidian}/workspace.json +6 -6
- package/one/knowledge/nine-padel-playbook.md +211 -0
- package/one/knowledge/ontology-ecommerce.md +251 -0
- package/one/knowledge/todo-template.md +251 -0
- package/one/knowledge/todo.md +1 -1
- package/one/things/cli/cli.md +427 -745
- package/one/things/features/2-cli.md +639 -166
- package/one/things/features-in-english.md +187 -0
- package/one/things/plans/3-groups.md +234 -1
- package/one/things/plans/5-complete.md +17 -0
- package/one/things/todo.md +4 -0
- package/package.json +1 -1
- package/one/knowledge/ontology-6-dimensions.md +0 -0
- /package/one/{.obsidian → knowledge/.obsidian}/app.json +0 -0
- /package/one/{.obsidian → knowledge/.obsidian}/appearance.json +0 -0
- /package/one/{.obsidian → knowledge/.obsidian}/core-plugins.json +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
Here is the complete, universal ontology specification for e-commerce stores, designed to serve as a blueprint for any modern retail business.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Universal E-commerce Ontology Specification
|
|
6
|
+
|
|
7
|
+
**Version:** 1.0.0 (Intelligent Commerce Engine)
|
|
8
|
+
**Status:** Complete & Generic
|
|
9
|
+
**Design Principle:** This ontology models any e-commerce business in six dimensions, transforming a simple online store into a proactive, intelligent commerce engine. It is the single source of truth for all business operations, from inventory management to AI-driven marketing.
|
|
10
|
+
|
|
11
|
+
### The Philosophy: Your Store is an Engine, Not a Shelf
|
|
12
|
+
|
|
13
|
+
A traditional e-commerce site is a digital shelf—a passive display of products. An intelligent commerce engine is a sentient system that understands its products, knows its customers, anticipates market trends, and automates its own growth.
|
|
14
|
+
|
|
15
|
+
This ontology provides the universal structure for that engine. Every command, feature, and piece of data is mapped to these six fundamental dimensions.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 1\. GROUP: The Business Entity
|
|
20
|
+
|
|
21
|
+
This is the top-level container that defines your entire store as a single, cohesive unit.
|
|
22
|
+
|
|
23
|
+
### Group Structure
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
{
|
|
27
|
+
_id: Id<'groups'>,
|
|
28
|
+
slug: 'your-store-name', // e.g., 'acme-widgets'
|
|
29
|
+
name: 'Your Store Name',
|
|
30
|
+
type: 'business',
|
|
31
|
+
metadata: {
|
|
32
|
+
domain: 'yourstore.com',
|
|
33
|
+
defaultCurrency: 'USD',
|
|
34
|
+
defaultCountry: 'USA'
|
|
35
|
+
},
|
|
36
|
+
status: 'active'
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2\. PEOPLE: The Actors
|
|
43
|
+
|
|
44
|
+
This dimension defines every person who interacts with your store and their specific role.
|
|
45
|
+
|
|
46
|
+
### Person Roles
|
|
47
|
+
|
|
48
|
+
1. **`owner`**: The business owner with full administrative privileges.
|
|
49
|
+
2. **`staff`**: Employees with specific permissions (e.g., order fulfillment, customer support).
|
|
50
|
+
3. **`customer`**: Any individual who browses or buys from the store, from anonymous visitor to loyal patron.
|
|
51
|
+
|
|
52
|
+
### Person Structure
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
{
|
|
56
|
+
_id: Id<'people'>,
|
|
57
|
+
email: string,
|
|
58
|
+
role: 'owner' | 'staff' | 'customer',
|
|
59
|
+
displayName?: string,
|
|
60
|
+
defaultShippingAddress?: { /* ... */ },
|
|
61
|
+
createdAt: number
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 3\. THINGS: The Nouns of Your Business 🛍️
|
|
68
|
+
|
|
69
|
+
This is the comprehensive catalog of every object, both physical and digital, that exists in your store.
|
|
70
|
+
|
|
71
|
+
### Thing Types (`ThingType`)
|
|
72
|
+
|
|
73
|
+
- **Catalog & Inventory (6 types):**
|
|
74
|
+
- `product`: The core sellable item.
|
|
75
|
+
- `product_variant`: A specific version of a product (e.g., size, color).
|
|
76
|
+
- `category`: A classification for products (e.g., "T-Shirts," "Electronics").
|
|
77
|
+
- `brand`: The manufacturer or label of a product.
|
|
78
|
+
- `collection`: A curated group of products (e.g., "Summer Collection," "Holiday Gift Guide").
|
|
79
|
+
- `inventory_item`: Tracks the stock level for a specific product or variant at a location.
|
|
80
|
+
- **Commerce & Orders (5 types):**
|
|
81
|
+
- `order`: The official record of a customer's completed purchase.
|
|
82
|
+
- `shopping_cart`: A temporary container for items a customer intends to buy.
|
|
83
|
+
- `payment`: A record of a financial transaction.
|
|
84
|
+
- `discount_code`: A promotional code for a discount.
|
|
85
|
+
- `subscription`: A recurring order for a product or service.
|
|
86
|
+
- **Content & Engagement (4 types):**
|
|
87
|
+
- `guide`: A blog post, buying guide, or informational article.
|
|
88
|
+
- `customer_review`: A customer's rating and feedback.
|
|
89
|
+
- `faq`: A frequently asked question and its answer.
|
|
90
|
+
- `landing_page`: A custom page for a specific campaign or purpose.
|
|
91
|
+
- **Marketing & Analytics (3 types):**
|
|
92
|
+
- `insight`: An AI-generated observation about business performance.
|
|
93
|
+
- `customer_segment`: A dynamic group of customers defined by specific rules.
|
|
94
|
+
- `ad_campaign`: A record of a marketing campaign.
|
|
95
|
+
- **System & Integration (1 type):**
|
|
96
|
+
- `external_agent`: Represents a connection to an external platform like ChatGPT, Google Shopping, or a social media channel.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 4\. CONNECTIONS: The Relationships
|
|
101
|
+
|
|
102
|
+
This dimension maps the relationships between all your `Things` and `People`, forming a powerful knowledge graph of your business.
|
|
103
|
+
|
|
104
|
+
### Connection Types (`ConnectionType`)
|
|
105
|
+
|
|
106
|
+
- **Catalog Structure (3):** `part_of` (product → category), `belongs_to` (product → collection), `manufactured_by` (product → brand).
|
|
107
|
+
- **Commerce (5):** `places` (customer → order), `contains` (order → product), `uses` (order → discount_code), `purchased` (customer → product), `subscribed_to` (customer → subscription).
|
|
108
|
+
- **Engagement (3):** `writes` (customer → review), `is_about` (review → product), `viewed` (customer → guide).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 5\. EVENTS: The Actions
|
|
113
|
+
|
|
114
|
+
This is the unchangeable, time-stamped log of every action that happens in your store. It's the fuel for analytics, automation, and understanding customer behavior.
|
|
115
|
+
|
|
116
|
+
### Event Types (`EventType`)
|
|
117
|
+
|
|
118
|
+
- **Discovery Events:** `session_started`, `product_viewed`, `search_performed`, `filter_applied`.
|
|
119
|
+
- **Commerce Events:** `product_added_to_cart`, `cart_abandoned`, `checkout_started`, `order_placed`, `payment_processed`.
|
|
120
|
+
- **Post-Purchase Events:** `order_shipped`, `order_delivered`, `review_submitted`, `return_requested`.
|
|
121
|
+
- **System Events:** `insight_generated`, `stock_level_low`, `customer_segment_updated`.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 6\. KNOWLEDGE: The Intelligence Layer
|
|
126
|
+
|
|
127
|
+
This is the "brain" of your store. It’s a system of labels that add context and meaning to your data, powering smart search, personalization, and AI agents.
|
|
128
|
+
|
|
129
|
+
### Key Knowledge Labels
|
|
130
|
+
|
|
131
|
+
- **Product Attributes:** `category:apparel`, `color:blue`, `size:large`, `material:cotton`, `feature:waterproof`.
|
|
132
|
+
- **Customer Segments:** `archetype:whale`, `status:lapsed`, `ltv_tier:gold`, `interest:outdoors`.
|
|
133
|
+
- **Operational Statuses:** `order_status:shipped`, `stock_status:in_stock`, `payment_status:paid`.
|
|
134
|
+
- **Content Goals:** `goal:conversion`, `topic:how_to`, `audience:beginner`.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 7\. The Control Layer: Your Business Playbook (Plain English DSL)
|
|
139
|
+
|
|
140
|
+
This is the revolutionary part. The ontology provides the structure; this playbook gives you control. It's a simple, English-based language that allows you, the business owner, to write "Plays"—automated strategies that your store will run for you.
|
|
141
|
+
|
|
142
|
+
### Your Command Reference
|
|
143
|
+
|
|
144
|
+
- `CREATE`: Add a new product, discount, or blog post.
|
|
145
|
+
- `GET`: Find customers, products, or orders based on rules.
|
|
146
|
+
- `CONNECT`: Link a review to a product or a product to a collection.
|
|
147
|
+
- `RECORD`: Log an important business event, like a customer support call.
|
|
148
|
+
- `CHECK`: Make decisions based on data (e.g., `CHECK IF a customer's total spending is OVER $1000`).
|
|
149
|
+
- `NOTIFY`: Send an email, SMS, or push notification.
|
|
150
|
+
- `WAIT`: Pause for a specific time to act at the perfect moment.
|
|
151
|
+
|
|
152
|
+
### Your Automated Strategies, In Action
|
|
153
|
+
|
|
154
|
+
#### **Play 1: The "High-Value Cart Recovery" Play**
|
|
155
|
+
|
|
156
|
+
**Goal:** Prevent your most valuable customers from abandoning their carts.
|
|
157
|
+
|
|
158
|
+
**FEATURE:** High-Value Cart Recovery
|
|
159
|
+
|
|
160
|
+
**WHEN** a customer abandons a cart
|
|
161
|
+
|
|
162
|
+
**FLOW:**
|
|
163
|
+
|
|
164
|
+
**GET** the total value of the abandoned cart
|
|
165
|
+
**SAVE AS** cart value
|
|
166
|
+
|
|
167
|
+
**CHECK** IF cart value is **OVER** $200
|
|
168
|
+
**THEN** **WAIT** 30 minutes // Act quickly for high-value carts
|
|
169
|
+
**CREATE** a unique discount code **FOR** free shipping
|
|
170
|
+
**NOTIFY** the customer **VIA** email **WITH** a personal message and the free shipping code.
|
|
171
|
+
**ELSE** **WAIT** 2 hours
|
|
172
|
+
**NOTIFY** the customer **VIA** email **WITH** a standard cart reminder.
|
|
173
|
+
|
|
174
|
+
#### **Play 2: The "Customer Win-Back" Play**
|
|
175
|
+
|
|
176
|
+
**Goal:** Automatically re-engage customers who haven't purchased in a while.
|
|
177
|
+
|
|
178
|
+
**FEATURE:** Customer Win-Back Campaign
|
|
179
|
+
|
|
180
|
+
**WHEN** the system runs its daily check
|
|
181
|
+
|
|
182
|
+
**FLOW:**
|
|
183
|
+
|
|
184
|
+
**GET** all customers **WHOSE** last order was between 90 and 100 days ago
|
|
185
|
+
**SAVE AS** lapsed customers
|
|
186
|
+
|
|
187
|
+
**FOR EACH** customer **IN** lapsed customers
|
|
188
|
+
**DO** **CREATE** a unique discount code **FOR** 20% off
|
|
189
|
+
**NOTIFY** the customer **VIA** email
|
|
190
|
+
**WITH** the subject "We've Missed You\!"
|
|
191
|
+
**WITH** a personal message and their unique 20% off code.
|
|
192
|
+
**RECORD** a "win_back_offer_sent" event **FOR** that customer.
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"state": {
|
|
14
14
|
"type": "markdown",
|
|
15
15
|
"state": {
|
|
16
|
-
"file": "things/
|
|
16
|
+
"file": "things/todo.md",
|
|
17
17
|
"mode": "source",
|
|
18
18
|
"source": false
|
|
19
19
|
},
|
|
20
20
|
"icon": "lucide-file",
|
|
21
|
-
"title": "
|
|
21
|
+
"title": "todo"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -171,6 +171,10 @@
|
|
|
171
171
|
},
|
|
172
172
|
"active": "613025f84d05f0e8",
|
|
173
173
|
"lastOpenFiles": [
|
|
174
|
+
"things/ecommerce-ontology.md",
|
|
175
|
+
"things/ecommerce.md",
|
|
176
|
+
"things/plans/mail.md",
|
|
177
|
+
"things/plans/5-complete.md",
|
|
174
178
|
"events/cloudflare-automation-complete.md",
|
|
175
179
|
"events/installation-folders-workflow-integration.md",
|
|
176
180
|
"events/deployment-verification.md",
|
|
@@ -196,10 +200,6 @@
|
|
|
196
200
|
"groups/strategy.md",
|
|
197
201
|
"groups/revenue.md",
|
|
198
202
|
"things/agents/agent-deploy.md",
|
|
199
|
-
"events/2025-10-15-private-files-secured.md",
|
|
200
|
-
"events/2024-10-14-final-sync-complete.md",
|
|
201
|
-
"events/2024-10-15-release-command-complete.md",
|
|
202
|
-
"events/2024-10-15-package-manager-tests.md",
|
|
203
203
|
"things/vision",
|
|
204
204
|
"things/tests",
|
|
205
205
|
"things/features/dataprovider-interface",
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# The Nine Padel Playbook: Your Business, In Plain English
|
|
2
|
+
|
|
3
|
+
Welcome to the new way of running your store. Forget needing a developer for every small change. This document is your playbook. It teaches you a simple English-based language to write "Plays"—automated strategies that your store will run for you.
|
|
4
|
+
|
|
5
|
+
Think of it like writing a recipe. You list the steps, and your intelligent store engine follows them perfectly, every time.
|
|
6
|
+
|
|
7
|
+
**The Core Concept:** Your entire business—every product, customer, and order—is organized into a simple, six-part structure called an ontology. Every command you write is checked against this structure, guaranteeing it will work as expected.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
### Your Command Reference: The Building Blocks of Your Plays
|
|
12
|
+
|
|
13
|
+
These are the simple English commands you'll use to write your business strategies.
|
|
14
|
+
|
|
15
|
+
#### **CREATE** - Add Something New
|
|
16
|
+
|
|
17
|
+
Use this to add a new product, a guide, or a discount to your store.
|
|
18
|
+
|
|
19
|
+
- `CREATE product called "Head Radical MP" WITH price £180 AND FOR intermediate players.`
|
|
20
|
+
|
|
21
|
+
- `CREATE guide called "How to Prevent Padel Elbow" WITH content from our expert.`
|
|
22
|
+
|
|
23
|
+
- `CREATE discount code "SUMMER10" FOR 10% off all bags.`
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#### **GET** - Find Information
|
|
27
|
+
|
|
28
|
+
Use this to find customers, products, or orders that match specific criteria.
|
|
29
|
+
|
|
30
|
+
- `GET all customers WHO BOUGHT a Nox racket.`
|
|
31
|
+
|
|
32
|
+
- `GET all orders WITH a total value OVER £200.`
|
|
33
|
+
|
|
34
|
+
- `GET the 5 most viewed products THIS MONTH.`
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
#### **CONNECT** - Link Two Things Together
|
|
38
|
+
|
|
39
|
+
Use this to create relationships, like assigning a review to a product.
|
|
40
|
+
|
|
41
|
+
- `CONNECT a new review TO the "Bullpadel Vertex" racket.`
|
|
42
|
+
|
|
43
|
+
- `CONNECT the "Beginner's Guide" TO all rackets FOR beginners.`
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
#### **RECORD** - Log That Something Happened
|
|
47
|
+
|
|
48
|
+
Use this to create a permanent record of an important action for your analytics.
|
|
49
|
+
|
|
50
|
+
- `RECORD a customer service chat WITH a positive outcome.`
|
|
51
|
+
|
|
52
|
+
- `RECORD that a customer visited our physical pop-up store.`
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
#### **CHECK** - Make a Decision
|
|
56
|
+
|
|
57
|
+
Use this to create rules and logic in your Plays.
|
|
58
|
+
|
|
59
|
+
- `CHECK a customer's total spending is OVER £500.`
|
|
60
|
+
|
|
61
|
+
- `CHECK the stock for the "Adidas Metalbone" is LESS THAN 10.`
|
|
62
|
+
|
|
63
|
+
- `CHECK IF a customer is in the "Loyalists" group.`
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
#### **NOTIFY** - Send a Message
|
|
67
|
+
|
|
68
|
+
Use this to communicate with customers or your staff.
|
|
69
|
+
|
|
70
|
+
- `NOTIFY the customer VIA email ABOUT their shipped order.`
|
|
71
|
+
|
|
72
|
+
- `NOTIFY the warehouse staff VIA Slack ABOUT a new high-value order.`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
#### **WAIT** - Pause for the Perfect Moment
|
|
76
|
+
|
|
77
|
+
Use this to time your actions perfectly.
|
|
78
|
+
|
|
79
|
+
- `WAIT 24 hours after a cart is abandoned.`
|
|
80
|
+
|
|
81
|
+
- `WAIT until a customer has been inactive FOR 30 days.`
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### The Playbook: Your Automated Strategies, In Action
|
|
87
|
+
|
|
88
|
+
Here are complete, real-world examples of "Plays" you can write to attract, convert, and grow your customer base.
|
|
89
|
+
|
|
90
|
+
#### **Play 1: The "Smart Content Machine" (Attraction)**
|
|
91
|
+
|
|
92
|
+
**Goal:** Automatically create helpful blog posts based on your most popular products to attract new customers from Google.
|
|
93
|
+
|
|
94
|
+
**FEATURE:** The Smart Content Machine
|
|
95
|
+
|
|
96
|
+
**WHEN** a product gets more than 100 views in one week
|
|
97
|
+
|
|
98
|
+
**FLOW:**
|
|
99
|
+
|
|
100
|
+
GET the product with over 100 views
|
|
101
|
+
|
|
102
|
+
SAVE AS popular product
|
|
103
|
+
|
|
104
|
+
CHECK IF a guide for this product already exists
|
|
105
|
+
|
|
106
|
+
OTHERWISE move to the next step
|
|
107
|
+
|
|
108
|
+
// Now, let's create a helpful guide based on the product's details.
|
|
109
|
+
|
|
110
|
+
GET the product's brand, skill level, and style
|
|
111
|
+
|
|
112
|
+
SAVE AS product details
|
|
113
|
+
|
|
114
|
+
CALL AI to write a guide titled "Is the [popular product name] Right For You?"
|
|
115
|
+
|
|
116
|
+
WITH the product details
|
|
117
|
+
|
|
118
|
+
EXPLAINING who it's for (e.g., "perfect for intermediate players who want more power")
|
|
119
|
+
|
|
120
|
+
SAVE AS new guide content
|
|
121
|
+
|
|
122
|
+
CREATE guide with the new guide content
|
|
123
|
+
|
|
124
|
+
SAVE AS new guide
|
|
125
|
+
|
|
126
|
+
**CONNECT** the new guide **TO** the popular product
|
|
127
|
+
|
|
128
|
+
**NOTIFY** the store owner **VIA** email **ABOUT** the new draft guide, ready for review.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
#### **Play 2: The "Intelligent Cart Saver" (Conversion)**
|
|
133
|
+
|
|
134
|
+
**Goal:** Recover abandoned carts with a helpful, personalized message instead of a generic reminder.
|
|
135
|
+
|
|
136
|
+
**FEATURE:** The Intelligent Cart Saver
|
|
137
|
+
|
|
138
|
+
**WHEN** a customer abandons their shopping cart
|
|
139
|
+
|
|
140
|
+
**FLOW:**
|
|
141
|
+
|
|
142
|
+
**WAIT** 2 hours // Give them time to come back on their own.
|
|
143
|
+
|
|
144
|
+
GET the most expensive racket in the abandoned cart
|
|
145
|
+
|
|
146
|
+
SAVE AS the target racket
|
|
147
|
+
|
|
148
|
+
GET all reviews FOR the target racket WITH a 5-star rating
|
|
149
|
+
|
|
150
|
+
SAVE AS top reviews
|
|
151
|
+
|
|
152
|
+
GET one helpful quote from the top reviews
|
|
153
|
+
|
|
154
|
+
SAVE AS best quote
|
|
155
|
+
|
|
156
|
+
NOTIFY the customer VIA email
|
|
157
|
+
|
|
158
|
+
WITH the subject "A question about the [target racket name]?"
|
|
159
|
+
|
|
160
|
+
WITH the message: "Hi, just wondering if you had any questions about the [target racket name]. A recent customer said: '[best quote]'. Let us know if we can help!"
|
|
161
|
+
|
|
162
|
+
**RECORD** that a cart recovery email was sent.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
#### **Play 3: The "Loyalty Reward" (Growth)**
|
|
167
|
+
|
|
168
|
+
**Goal:** Automatically identify and reward your best customers to keep them coming back.
|
|
169
|
+
|
|
170
|
+
**FEATURE:** The Loyalty Reward
|
|
171
|
+
|
|
172
|
+
**WHEN** a customer completes their third purchase
|
|
173
|
+
|
|
174
|
+
**FLOW:**
|
|
175
|
+
|
|
176
|
+
**GET** the customer who just made their third purchase
|
|
177
|
+
|
|
178
|
+
GET their total spending across all orders
|
|
179
|
+
|
|
180
|
+
SAVE AS customer lifetime value
|
|
181
|
+
|
|
182
|
+
// Let's create a special, one-time-use discount for them.
|
|
183
|
+
|
|
184
|
+
CREATE a unique discount code FOR 15% off
|
|
185
|
+
|
|
186
|
+
CONNECT this code TO the customer
|
|
187
|
+
|
|
188
|
+
NOTIFY the customer VIA email
|
|
189
|
+
|
|
190
|
+
WITH the subject "A Thank You From Nine Padel!"
|
|
191
|
+
|
|
192
|
+
WITH the message: "Wow, your third order! We're so grateful for your support. As a thank you, here is a special 15% discount code just for you on your next purchase: [unique discount code]."
|
|
193
|
+
|
|
194
|
+
**ADD** the customer **TO** the "Loyalists" customer segment.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### How It All Works: From Your Words to a Live Feature
|
|
199
|
+
|
|
200
|
+
You don't need to worry about the technical details, but here’s the simple process that happens in seconds when you write a Play:
|
|
201
|
+
|
|
202
|
+
1. **You Write in English:** You write a feature using the commands above.
|
|
203
|
+
|
|
204
|
+
2. **System Validates:** The system checks your Play against the six-part ontology to make sure it makes sense (e.g., you can't `CONNECT` a `product` to another `product` as `places`).
|
|
205
|
+
|
|
206
|
+
3. **System Builds:** It automatically generates the necessary code and database logic.
|
|
207
|
+
|
|
208
|
+
4. **Feature is Live:** Your new automated strategy is deployed and running on the edge, close to your customers, making your store smarter.
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
This isn't just a tool; it's your new business partner, ready to execute your best strategies, 24/7.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
## E-commerce Ontology Specification
|
|
2
|
+
|
|
3
|
+
Version: 1.0.0 (Intelligent Commerce Engine)
|
|
4
|
+
|
|
5
|
+
Status: Complete & Generic
|
|
6
|
+
|
|
7
|
+
Design Principle: This ontology models any e-commerce business in six dimensions, transforming a simple online store into a proactive, intelligent commerce engine. It is the single source of truth for all business operations, from inventory management to AI-driven marketing.
|
|
8
|
+
|
|
9
|
+
### The Philosophy: Your Store is an Engine, Not a Shelf
|
|
10
|
+
|
|
11
|
+
A traditional e-commerce site is a digital shelf—a passive display of products. An intelligent commerce engine is a sentient system that understands its products, knows its customers, anticipates market trends, and automates its own growth.
|
|
12
|
+
|
|
13
|
+
This ontology provides the universal structure for that engine. Every command, feature, and piece of data is mapped to these six fundamental dimensions.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. GROUP: The Business Entity
|
|
18
|
+
|
|
19
|
+
This is the top-level container that defines your entire store as a single, cohesive unit.
|
|
20
|
+
|
|
21
|
+
### Group Structure
|
|
22
|
+
|
|
23
|
+
TypeScript
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
{
|
|
27
|
+
_id: Id<'groups'>,
|
|
28
|
+
slug: 'your-store-name', // e.g., 'acme-widgets'
|
|
29
|
+
name: 'Your Store Name',
|
|
30
|
+
type: 'business',
|
|
31
|
+
metadata: {
|
|
32
|
+
domain: 'yourstore.com',
|
|
33
|
+
defaultCurrency: 'USD',
|
|
34
|
+
defaultCountry: 'USA'
|
|
35
|
+
},
|
|
36
|
+
status: 'active'
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. PEOPLE: The Actors
|
|
43
|
+
|
|
44
|
+
This dimension defines every person who interacts with your store and their specific role.
|
|
45
|
+
|
|
46
|
+
### Person Roles
|
|
47
|
+
|
|
48
|
+
1. **`owner`**: The business owner with full administrative privileges.
|
|
49
|
+
|
|
50
|
+
2. **`staff`**: Employees with specific permissions (e.g., order fulfillment, customer support).
|
|
51
|
+
|
|
52
|
+
3. **`customer`**: Any individual who browses or buys from the store, from anonymous visitor to loyal patron.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Person Structure
|
|
56
|
+
|
|
57
|
+
TypeScript
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
{
|
|
61
|
+
_id: Id<'people'>,
|
|
62
|
+
email: string,
|
|
63
|
+
role: 'owner' | 'staff' | 'customer',
|
|
64
|
+
displayName?: string,
|
|
65
|
+
defaultShippingAddress?: { /* ... */ },
|
|
66
|
+
createdAt: number
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 3. THINGS: The Nouns of Your Business 🛍️
|
|
73
|
+
|
|
74
|
+
This is the comprehensive catalog of every object, both physical and digital, that exists in your store.
|
|
75
|
+
|
|
76
|
+
### Thing Types (`ThingType`)
|
|
77
|
+
|
|
78
|
+
- **Catalog & Inventory (6 types):**
|
|
79
|
+
|
|
80
|
+
- `product`: The core sellable item.
|
|
81
|
+
|
|
82
|
+
- `product_variant`: A specific version of a product (e.g., size, color).
|
|
83
|
+
|
|
84
|
+
- `category`: A classification for products (e.g., "T-Shirts," "Electronics").
|
|
85
|
+
|
|
86
|
+
- `brand`: The manufacturer or label of a product.
|
|
87
|
+
|
|
88
|
+
- `collection`: A curated group of products (e.g., "Summer Collection," "Holiday Gift Guide").
|
|
89
|
+
|
|
90
|
+
- `inventory_item`: Tracks the stock level for a specific product or variant at a location.
|
|
91
|
+
|
|
92
|
+
- **Commerce & Orders (5 types):**
|
|
93
|
+
|
|
94
|
+
- `order`: The official record of a customer's completed purchase.
|
|
95
|
+
|
|
96
|
+
- `shopping_cart`: A temporary container for items a customer intends to buy.
|
|
97
|
+
|
|
98
|
+
- `payment`: A record of a financial transaction.
|
|
99
|
+
|
|
100
|
+
- `discount_code`: A promotional code for a discount.
|
|
101
|
+
|
|
102
|
+
- `subscription`: A recurring order for a product or service.
|
|
103
|
+
|
|
104
|
+
- **Content & Engagement (4 types):**
|
|
105
|
+
|
|
106
|
+
- `guide`: A blog post, buying guide, or informational article.
|
|
107
|
+
|
|
108
|
+
- `customer_review`: A customer's rating and feedback.
|
|
109
|
+
|
|
110
|
+
- `faq`: A frequently asked question and its answer.
|
|
111
|
+
|
|
112
|
+
- `landing_page`: A custom page for a specific campaign or purpose.
|
|
113
|
+
|
|
114
|
+
- **Marketing & Analytics (3 types):**
|
|
115
|
+
|
|
116
|
+
- `insight`: An AI-generated observation about business performance.
|
|
117
|
+
|
|
118
|
+
- `customer_segment`: A dynamic group of customers defined by specific rules.
|
|
119
|
+
|
|
120
|
+
- `ad_campaign`: A record of a marketing campaign.
|
|
121
|
+
|
|
122
|
+
- **System & Integration (1 type):**
|
|
123
|
+
|
|
124
|
+
- `external_agent`: Represents a connection to an external platform like ChatGPT, Google Shopping, or a social media channel.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 4. CONNECTIONS: The Relationships
|
|
130
|
+
|
|
131
|
+
This dimension maps the relationships between all your `Things` and `People`, forming a powerful knowledge graph of your business.
|
|
132
|
+
|
|
133
|
+
### Connection Types (`ConnectionType`)
|
|
134
|
+
|
|
135
|
+
- **Catalog Structure (3):** `part_of` (product → category), `belongs_to` (product → collection), `manufactured_by` (product → brand).
|
|
136
|
+
|
|
137
|
+
- **Commerce (5):** `places` (customer → order), `contains` (order → product), `uses` (order → discount_code), `purchased` (customer → product), `subscribed_to` (customer → subscription).
|
|
138
|
+
|
|
139
|
+
- **Engagement (3):** `writes` (customer → review), `is_about` (review → product), `viewed` (customer → guide).
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 5. EVENTS: The Actions
|
|
145
|
+
|
|
146
|
+
This is the unchangeable, time-stamped log of every action that happens in your store. It's the fuel for analytics, automation, and understanding customer behavior.
|
|
147
|
+
|
|
148
|
+
### Event Types (`EventType`)
|
|
149
|
+
|
|
150
|
+
- **Discovery Events:** `session_started`, `product_viewed`, `search_performed`, `filter_applied`.
|
|
151
|
+
|
|
152
|
+
- **Commerce Events:** `product_added_to_cart`, `cart_abandoned`, `checkout_started`, `order_placed`, `payment_processed`.
|
|
153
|
+
|
|
154
|
+
- **Post-Purchase Events:** `order_shipped`, `order_delivered`, `review_submitted`, `return_requested`.
|
|
155
|
+
|
|
156
|
+
- **System Events:** `insight_generated`, `stock_level_low`, `customer_segment_updated`.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 6. KNOWLEDGE: The Intelligence Layer
|
|
162
|
+
|
|
163
|
+
This is the "brain" of your store. It’s a system of labels that add context and meaning to your data, powering smart search, personalization, and AI agents.
|
|
164
|
+
|
|
165
|
+
### Key Knowledge Labels
|
|
166
|
+
|
|
167
|
+
- **Product Attributes:** `category:apparel`, `color:blue`, `size:large`, `material:cotton`, `feature:waterproof`.
|
|
168
|
+
|
|
169
|
+
- **Customer Segments:** `archetype:whale`, `status:lapsed`, `ltv_tier:gold`, `interest:outdoors`.
|
|
170
|
+
|
|
171
|
+
- **Operational Statuses:** `order_status:shipped`, `stock_status:in_stock`, `payment_status:paid`.
|
|
172
|
+
|
|
173
|
+
- **Content Goals:** `goal:conversion`, `topic:how_to`, `audience:beginner`.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 7. The Control Layer: Your Business Playbook (Plain English DSL)
|
|
179
|
+
|
|
180
|
+
This is the revolutionary part. The ontology provides the structure; this playbook gives you control. It's a simple, English-based language that allows you, the business owner, to write "Plays"—automated strategies that your store will run for you.
|
|
181
|
+
|
|
182
|
+
### Your Command Reference
|
|
183
|
+
|
|
184
|
+
- `CREATE`: Add a new product, discount, or blog post.
|
|
185
|
+
|
|
186
|
+
- `GET`: Find customers, products, or orders based on rules.
|
|
187
|
+
|
|
188
|
+
- `CONNECT`: Link a review to a product or a product to a collection.
|
|
189
|
+
|
|
190
|
+
- `RECORD`: Log an important business event, like a customer support call.
|
|
191
|
+
|
|
192
|
+
- `CHECK`: Make decisions based on data (e.g., `CHECK IF a customer's total spending is OVER $1000`).
|
|
193
|
+
|
|
194
|
+
- `NOTIFY`: Send an email, SMS, or push notification.
|
|
195
|
+
|
|
196
|
+
- `WAIT`: Pause for a specific time to act at the perfect moment.
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Your Automated Strategies, In Action
|
|
200
|
+
|
|
201
|
+
#### **Play 1: The "High-Value Cart Recovery" Play**
|
|
202
|
+
|
|
203
|
+
**Goal:** Prevent your most valuable customers from abandoning their carts.
|
|
204
|
+
|
|
205
|
+
**FEATURE:** High-Value Cart Recovery
|
|
206
|
+
|
|
207
|
+
**WHEN** a customer abandons a cart
|
|
208
|
+
|
|
209
|
+
**FLOW:**
|
|
210
|
+
|
|
211
|
+
GET the total value of the abandoned cart
|
|
212
|
+
|
|
213
|
+
SAVE AS cart value
|
|
214
|
+
|
|
215
|
+
CHECK IF cart value is OVER $200
|
|
216
|
+
|
|
217
|
+
THEN WAIT 30 minutes // Act quickly for high-value carts
|
|
218
|
+
|
|
219
|
+
CREATE a unique discount code FOR free shipping
|
|
220
|
+
|
|
221
|
+
NOTIFY the customer VIA email WITH a personal message and the free shipping code.
|
|
222
|
+
|
|
223
|
+
ELSE WAIT 2 hours
|
|
224
|
+
|
|
225
|
+
NOTIFY the customer VIA email WITH a standard cart reminder.
|
|
226
|
+
|
|
227
|
+
#### **Play 2: The "Customer Win-Back" Play**
|
|
228
|
+
|
|
229
|
+
**Goal:** Automatically re-engage customers who haven't purchased in a while.
|
|
230
|
+
|
|
231
|
+
**FEATURE:** Customer Win-Back Campaign
|
|
232
|
+
|
|
233
|
+
**WHEN** the system runs its daily check
|
|
234
|
+
|
|
235
|
+
**FLOW:**
|
|
236
|
+
|
|
237
|
+
GET all customers WHOSE last order was between 90 and 100 days ago
|
|
238
|
+
|
|
239
|
+
SAVE AS lapsed customers
|
|
240
|
+
|
|
241
|
+
FOR EACH customer IN lapsed customers
|
|
242
|
+
|
|
243
|
+
DO CREATE a unique discount code FOR 20% off
|
|
244
|
+
|
|
245
|
+
NOTIFY the customer VIA email
|
|
246
|
+
|
|
247
|
+
WITH the subject "We've Missed You!"
|
|
248
|
+
|
|
249
|
+
WITH a personal message and their unique 20% off code.
|
|
250
|
+
|
|
251
|
+
RECORD a "win_back_offer_sent" event FOR that customer.
|