V2 MAPS High-Level Design Notes
Introduction
Definitions
User - someone who can log into MAPPS and use products
Customer - some who pays us and manages their product purchases
- A customer is also a user
Product sponsor - The customer that pays for a specific product instance
Requirements
Basic
- MAPS has
- a landing page - Links to web site, product info, demo, etc.
- a signup page
- a login page
- MAPS can
- Provide products and services for sale
- Accept payment for products and services
- Including recussing payments for subscriptions
- List a users products, and can dispatch directly to them
Users and Logins
- Users are identified by a primary email address
- A user's primary email address is also their login name
- All email address must be verified
- Users can have an unlimited number of alternate email addresses
- All product login authentication is done via MAPS
- However, users can login directly in a product, bypassing the MAPS system entirely
- Users can go directly to a product instance to login and use system bypassing MAPS
- This has to be conventient for product users, who are non-customers
Pricing
- Coupons give access to special products/prices
- Coupons have time limits: valid from/to dates
- Coupon types
- Reusable
- Limited number
- Once only
- Tied to a specific email address or set of email addresses
- Fixed discount on any product
- Time limit (start/stop date)
- Multple coupons for single purchase?
Purchases
- All product and service purchases are made through MAPS
- Products know nothing about payment and subscriptions status
- Free products/subscriptions/coupons are possible
- Payments:
- MAPS only manages online payments
- All off-line payments are processed outside the system
- Payments types:
- Invoice
- Online
- Free systems
- Open
- Customer loyalty program
- Points system? Referrals, etc.
- Coupons offered as rewards
- Based on referrals (that actually lead to new paying customers)
- MAP can generate invoices and receipts
- Invoices record a purchase
- Payments record one or more payments associated with a purchase
Product Limits
- Product limits: Who handles product limits?
- Defines and stores definitive limit
- Monitors
- Informs
- MAPS is able to:
- Request product limits from product instances and display them
- Change product limits
- Enable/disable product instances
Use Cases
Web Site
Basically viewing and management of static web pages.
Public Transactions
- Product and pricing information
- Company information
- Product documentation
- Testimonials
- News...
- Request a contact
- Request support
- Web form
- Email address
- Telephone number
- Chat
- Like/promote on social media sites
- Direct fedback/comments
Administrative Transactions
- Add blog/news article
- Product promotions (timed)
- Manage web pages
- A/B testing
- View web analytics
User Transactions
==== Sign-Up ===
- Generate account activation email
- Process activation token from account activation email
Login
- Via user data entry
- Via cookie
- Via API request from product
- Display links to all products
- Go to a product's home page (and be loged in already)
- Logout
View Product Catalog
- Product list
- Detail Pricing page per product
Purchase
- Purchase (Subscribe) a new product
- Sets up a new product instance
- Can make a one-time payment, or a regular recurring payment
- Renew purchase (Subscribe)
- Purchase upgrade (convert one subscription to another)
- Updates product's limits
- Cancel product subscription (for recurring ones)
- Request refund (cancel and send me remaining balance)
Purchased Products
- Show list purchased products
- Show product usage statistis
- Supplied by the product via a web request
- Show limits and current usage: Users, Docs, etc.
- Generate an invoice/receipt
Manage User Own Account
- Manage own user account - add emails, names change, etc.
- Including billing details
- Can have multiple milling addresses
- Delete user account (delete myself)
Referrals
- Invite another user
- Sends them an email
- Gives the user loyalty credits
- Referrals can be:
- An invitation to use a specific product instance
- Information about a specific product specific
- Generic referral to our company
- View referrals
- Who actually took action on a referral
Administrative Transactions
User Management
- User search
- User list
- User edetail
- Create new user
- Edit user details
- Verify email - flag that email is valid
- Activate/deactivate email
- Activate/deactivate user
- Add/delete email addess
- Blacklist - based on a regex applied to the login name
- Ban user and all emails
- Ban email address
- Ban a domain or submail
- Superuser user management
- Role gant/revoke
Product Catalog Management
- Add product
- Delete product
- Edit product details
- Change product status
- Enable/disable product details
Product Pricing Management
- Pricing properties:
- Product
- Price
- Duration: Start /stop
- Limitations: Number of users, docs, etc.
- Availability: Enable/disable
- Visibility: Enable/disable - shows
- Coupon
- Create a price for a product
- List products
- Update products
- Delete products
- Probably via a disable, or if never used, or not in use
- First disable, then when no longer used (e.g. no current product instances) you can delete it
- Limtations are product specific
- Are based on key/value pairs
Subscription Management
Offline payments/refunds are recorded as new subscriptions (or raely updates to subscriptions)
- Search
- (*) List
- (*) Detail
- (*) Create
- Update
- Delete
* means high priority
Payment Management
- Offline payemnts
- Are purely records of money recieved
- Do not cause payement record changes
- There are no partial payements
- Online payments:
- Have a link to the subscription its paying for
- Cause a new subscription to be made
- Delayed payements - executed, not executed
- Failed payments
- Failure reason
- Search
- (*) List
- (*) Detail
- (*) Create - Phone, cash, invoice, bank transfer payment
- Update - Only update in the event of something weird
- Delete - Payments are probably never deleted
Product Instance Management
- Enable/disable product
- Public enable/disable
- Limited access - Coupon only
- Product kill switch
- Product under maintenance
- Subscription is ending / has ended
- Monitor product instance lmits
- Tell limits to product instance
- Which features are enabled
Product API Transactions
Transactions that occur between MAPS and the production applications
- Login
- New User
Data Model
Database Tables
- users
- email_addresses
- products
- prices
- coupons
- product_instances
- addresses - Addresses for invoices and receipts
- limit_sets - Product limitations associated with products
- limits - Individual features limits
- subscriptions
- purchases
- payments - Customer payments
- payment_states_ref
- payment_types_ref
six_payments - Holds SixPayments specific fields associated with credit card payments