Skip to content
Open
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
42 changes: 42 additions & 0 deletions kits/automation/reorder-nudge-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 🔁 D2C Reorder Nudge Agent

**Built for A_Mowglies** — a pre-launch D2C disposable underwear brand.

## Problem Statement
D2C brands selling consumable/repeat-purchase products lose revenue when customers forget to reorder. There's no automated way to calculate when a customer will run out and send a personalized nudge — without a human in the loop.

## What This Agent Does
1. Takes customer purchase data as input (name, purchase date, quantity, daily usage)
2. Calculates exactly when they'll run out of stock
3. Generates a personalized WhatsApp reorder nudge via LLM
4. Returns the message + reorder date instantly via API

## Flow
API Request → Code (calculates restock date) → Generate Text (LLM nudge) → API Response

## Input
```json
{
"customer_name": "Priya",
"purchase_date": "2026-03-01",
"quantity": 30,
"daily_usage": 1
}
```

## Output
```json
{
"message": "Hey Priya! Just a friendly reminder...",
"reorder_date": "Mon Mar 31 2026",
"days_remaining": 6
}
```

## Built With
- Lamatic.ai (flow builder + deployment)
- Google Gemini 2.5 Flash
- JavaScript (date calculation logic)

## Use Case
Applicable to any high-repeat-purchase D2C brand — disposables, supplements, pet food, skincare etc.
Comment on lines +1 to +42
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add missing Setup and Environment Variables sections.

This README explains flow and I/O, but it does not document installation/setup steps or required env vars, which makes kit onboarding incomplete.

📌 Suggested README patch
 # 🔁 D2C Reorder Nudge Agent
@@
 ## Flow
 API Request → Code (calculates restock date) → Generate Text (LLM nudge) → API Response
+
+## Setup
+1. Import this kit into your Lamatic workspace.
+2. Configure the `agent.json` workflow in your project.
+3. Connect your outbound channel integration (e.g., WhatsApp/SMS provider, Klaviyo).
+4. Test with sample payloads from the **Input** section below.
+
+## Environment Variables
+Document and configure the required secrets before deployment:
+
+```bash
+GEMINI_API_KEY=<your_google_ai_api_key>
+LAMATIC_API_KEY=<your_lamatic_api_key_if_required>
+WHATSAPP_API_TOKEN=<token_if_whatsapp_delivery_is_enabled>
+KLAVIYO_API_KEY=<key_if_klaviyo_sync_is_enabled>
+```
+
+> Keep only the variables your workflow actually uses, and remove unused entries.

As per coding guidelines, kits/**/README.md: Every kit must have a README.md that documents setup, environment variables, and usage.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# 🔁 D2C Reorder Nudge Agent
**Built for A_Mowglies** — a pre-launch D2C disposable underwear brand.
## Problem Statement
D2C brands selling consumable/repeat-purchase products lose revenue when customers forget to reorder. There's no automated way to calculate when a customer will run out and send a personalized nudge — without a human in the loop.
## What This Agent Does
1. Takes customer purchase data as input (name, purchase date, quantity, daily usage)
2. Calculates exactly when they'll run out of stock
3. Generates a personalized WhatsApp reorder nudge via LLM
4. Returns the message + reorder date instantly via API
## Flow
API Request → Code (calculates restock date) → Generate Text (LLM nudge) → API Response
## Input
```json
{
"customer_name": "Priya",
"purchase_date": "2026-03-01",
"quantity": 30,
"daily_usage": 1
}
```
## Output
```json
{
"message": "Hey Priya! Just a friendly reminder...",
"reorder_date": "Mon Mar 31 2026",
"days_remaining": 6
}
```
## Built With
- Lamatic.ai (flow builder + deployment)
- Google Gemini 2.5 Flash
- JavaScript (date calculation logic)
## Use Case
Applicable to any high-repeat-purchase D2C brand — disposables, supplements, pet food, skincare etc.
# 🔁 D2C Reorder Nudge Agent
**Built for A_Mowglies** — a pre-launch D2C disposable underwear brand.
## Problem Statement
D2C brands selling consumable/repeat-purchase products lose revenue when customers forget to reorder. There's no automated way to calculate when a customer will run out and send a personalized nudge — without a human in the loop.
## What This Agent Does
1. Takes customer purchase data as input (name, purchase date, quantity, daily usage)
2. Calculates exactly when they'll run out of stock
3. Generates a personalized WhatsApp reorder nudge via LLM
4. Returns the message + reorder date instantly via API
## Flow
API Request → Code (calculates restock date) → Generate Text (LLM nudge) → API Response
## Setup
1. Import this kit into your Lamatic workspace.
2. Configure the `agent.json` workflow in your project.
3. Connect your outbound channel integration (e.g., WhatsApp/SMS provider, Klaviyo).
4. Test with sample payloads from the **Input** section below.
## Environment Variables
Document and configure the required secrets before deployment: