Skip to content

Add multi-platform-sales-monitor community ability#244

Closed
ammyyou112 wants to merge 3 commits intoopenhome-dev:devfrom
ammyyou112:add-sales-monitor-final
Closed

Add multi-platform-sales-monitor community ability#244
ammyyou112 wants to merge 3 commits intoopenhome-dev:devfrom
ammyyou112:add-sales-monitor-final

Conversation

@ammyyou112
Copy link
Copy Markdown
Contributor

What does this Ability do?

Voice-activated sales dashboard for Gumroad and Shopify. Users can check real-time revenue, compare platforms, track best sellers, analyze sales trends, and monitor customer counts with natural voice commands. Works immediately in demo mode or connects to real APIs for live sales data.

Suggested Trigger Words

  • "check my sales"
  • "online sales"
  • "sales revenue"
  • "my revenue"
  • "shopify sales"
  • "gumroad sales"
  • "store sales"
  • "how much did I make"
  • "sales dashboard"
  • "business sales"

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

  • No external APIs
  • Uses external API(s):
    • Gumroad API v2 - https://api.gumroad.com/v2/sales (requires access token from https://app.gumroad.com/settings/advanced)
    • Shopify Admin REST API v2024-01 - https://{shop}.myshopify.com/admin/api/2024-01/orders.json (requires shop URL + Admin API access token)
    • Both APIs are FREE to use (Gumroad: 100 requests/hour, Shopify: 2 requests/second)

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", "thanks", etc.)
  • Error scenarios tested (API down, missing credentials, zero sales, etc.)

Checklist

  • Files are in community/multi-platform-sales-monitor/
  • main.py follows SDK pattern (extends MatchingCapability, has # {{register_capability}} + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders
  • No blocked imports (redis, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls
  • Tested in OpenHome Live Editor

Anything else?

Demo Mode Included:
The ability includes a DEMO_MODE = True flag that returns realistic fake data for testing without real Gumroad/Shopify credentials. Demo shows $477 in sales across 6 transactions from both platforms. Perfect for trying out the conversation flow before connecting real stores.

Features:

  • Comprehensive dashboard (today/week/month stats in one response)
  • Smart platform detection ("What about Shopify?" → Shopify-only data)
  • Multi-intent classification (total sales, platform breakdown, best seller, trends, customer count)
  • Digital vs physical product comparison with percentages
  • Time-based queries (yesterday, this week, this month, all-time)
  • Voice-optimized formatting ("477 dollars" not "$477.00")
  • Conversational loop with context awareness
  • SDK-compliant file storage (delete-then-write pattern)

Conversation Example:
User: "Check my online sales"
Assistant: "Today: 477 dollars from 6 sales. This week: 477 dollars.
This month: 477 dollars. Gumroad: 177 dollars, Shopify: 300 dollars.
Best seller: Logo T-Shirt with 2 units."
Assistant: "What else would you like to know?"
User: "What about Shopify?"
Assistant: "Shopify's at 300 dollars from 3 orders."
User: "Compare digital versus physical"
Assistant: "Digital's at 177 dollars, that's about 37 percent of your revenue.
Physical's at 300 dollars, which is 63 percent."
User: "Show me trends"
Assistant: "You're up 25 percent compared to yesterday. Nice!"
User: "Thanks"
Assistant: "Okay, talk to you later!"


**Loom Demo:** https://www.loom.com/share/f2bd0301e5804507af3534942579b7d4

Demo Data:

  • Gumroad (Digital): $177 from 3 sales (React Course $99, Python eBook $49, Notion Templates $29)
  • Shopify (Physical): $300 from 3 orders (Logo T-Shirt $60, Coffee Mug + Sticker $90, Premium Hoodie $150)
  • Combined: $477 from 6 sales, 6 unique customers

📋 Files to Include in PR:

community/multi-platform-sales-monitor/
├── main.py
├── README.md
└── init.py

@ammyyou112 ammyyou112 requested a review from a team as a code owner April 10, 2026 14:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

🔀 Branch Merge Check

PR direction: add-sales-monitor-finaldev

Passedadd-sales-monitor-finaldev is a valid merge direction

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

✅ Ability Validation Passed

📋 Validating: community/multi-platform-sales-monitor
  ✅ All checks passed!

@github-actions github-actions bot added the community-ability Community-contributed ability label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/multi-platform-sales-monitor/main.py

✅ Flake8 — Passed

✅ All checks passed!

@uzair401
Copy link
Copy Markdown
Contributor

Great work on this @ammyyou112

This is a really powerful ability and users will definitely be using this.

For better understanding of users, please add a Loom demo showing both Shopify and Gumroad integration and the ability in action end to end. This will really help in reviewing and understanding the flow.

@uzair401 uzair401 closed this Apr 13, 2026
@ammyyou112
Copy link
Copy Markdown
Contributor Author

I’ve already added the Loom demo to the PR description.

Sharing the same link here as well for convenience: https://www.loom.com/share/f2bd0301e5804507af3534942579b7d4

@uzair401
Copy link
Copy Markdown
Contributor

uzair401 commented Apr 13, 2026

Hi @ammyyou112,

After a thorough review of the code, here are some suggestions I would like to request you to make changes to before resubmitting the PR.

First of all, instead of hardcoded keyword matching in _classify_intent(), I would request you to use the SDK text_to_text_response() method to extract intent, this will handle natural spoken phrases like "how's business been" or "what did I pull in today", and also cover platform detection and exit handling in one place, replacing the separate EXIT_WORDS list and the "gumroad" in text checks in _handle_platform_breakdown() as well.

The dashboard summary in _handle_dashboard_summary() can hit 50+ spoken words by joining all five data points together, please cap it to today's headline figure and offer to go deeper, something like "Today you're at 300 dollars from 6 sales, want the full breakdown?"

The "What else would you like to know?" prompt repeats after every single response which feels robotic on voice, please rotate through a few varied follow-up lines the same way CONTINUE_PROMPTS works in the Audius capability.

The _handle_platform_breakdown() and _handle_digital_vs_physical() methods both speak four numbers in a single string, please split these into two speak() calls so the user has a moment to absorb each figure before the next one lands.

Finally, regarding the demo, please do not include hardcoded or previously used credentials. Also resubmit demo using actual Shopify and Gumroad store data with their real APIs instead of demo mode.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants