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