anvilglobaldynamics / torque

Lipi is an easy-to-adopt and easy-to-use mobile-first business management solution for medium size retailers.
https://lipi.live
0 stars 0 forks source link

Plan digital receipt / invoice feature #890

Closed iLGunners closed 4 years ago

iLGunners commented 4 years ago

Abstract

This is a hybrid between POS centric and invoice centric. We slowly move towards digital receipts.

Facebook

https://developers.facebook.com/docs/messenger-platform/reference/send-api/#recipient https://developers.facebook.com/docs/messenger-platform/send-messages/ We can ask here: https://www.facebook.com/groups/fbdevelopers/

WhatsApp

https://developers.facebook.com/docs/whatsapp/getting-started/ https://developers.facebook.com/docs/whatsapp/api/messages/message-templates

Extra

https://www.facebook.com/business/partner-directory/search?platforms=whatsapp&solution_type=messaging

iLGunners commented 4 years ago

Checklist

  1. Latency
  2. Cost
  3. Redundancy
  4. Coding overhead
  5. Spamming

Gateways

For mail and sms we will use separate gateways/aliases for sending following types of messages:

  1. Receipts
  2. Account Emails (Registration, Login, Verification)
  3. Marketing

Spamming

  1. We will put in reasonable limits on the number of times the same receipt can be resent. (Action: Error Message)
  2. We will also realistically cap the frequency of sales per user (not per outlet/organization) to avoid spamming. (Action: Ban User)
  3. We will put in a final limit on sales daily. https://github.com/iShafayet/torque/issues/892

Mail

  1. Primarily through https://mailgun.com
  2. Latency: Less than 30 seconds on mailgun end. They offer custom SLAs which we can opt for later.
  3. Cost: Fairly low. First 10,000 for free. 5 USD for 20,000
  4. Coding overhead: Less than a day. Already in use by our platform.
  5. Redundancy: mailgun is a very reliable service. However, we still plan to have https://sendgrid.com as a backup. Adding this backup will have coding overhead of half a sprint. So, we will roll this in the background at a later time.

SMS

  1. We want this service from GP
  2. Latency
  3. Cost
  4. Coding overhead: Shafayet has worked with GP SMS Apis before. Coding overhead is half a sprint.

Language

  1. Language for messages containing links to receipts should be English
  2. Receipts should also be in English
iLGunners commented 4 years ago

for Lipi Lite

  1. Only fill up sms and whatsapp
  2. From shop's number
  3. It is finicky
  4. Scales internationally without any effort

for Lipi

  1. 0.0135 usd or 1.147 taka per whatsapp msg
  2. Sms we will route through telecom (we need pricing)
  3. We can charge user. Or shop keeper can charge user a bit extra. (i.e. They take 5 BDT processing fee/service charge and pay us 2.5 BDT)

Common

  1. Email is free for both
iLGunners commented 4 years ago

Other software solutions

  1. https://squareup.com/us/en/invoices (good ideas)
  2. https://invoicely.com/
  3. https://quickbooks.intuit.com/global/invoicing/
iLGunners commented 4 years ago

Important

Both Lipi identity and company information on receipt should be clear and bold.

iShafayet commented 4 years ago

Receipt viewing web service

Client

  1. Options: Existing lipi.live domain a) URL https://lipi.live/#/receipt:k302r232r1g b) No new domain/server config c) Needs work to make sure the site runs on non-google browsers d) We may be able to forward https://lipi.live/receipt:k302r232r1g to https://lipi.live/#/receipt:k302r232r1g

  2. Options: New domain a) URL https://<anotheranvildomain>/receipt:k302r232r1g b) Will take time setting up domain, server c) Will have to recode client side if not done on existing codebase d) Separates receipt viewing from core lipi

Server

  1. A new get-receipt api
  2. Database collections for tracking/limiting opening usage of receipts
  3. Apply limits to prevent spamming (https://github.com/iShafayet/torque/issues/890#issuecomment-536497414)
iShafayet commented 4 years ago

Implementation Flow

  1. Create "client for receipt viewing" application/features + server apis
  2. Lipi: Receipt delivery through email (Active) + Updates to client in POS
  3. Lipi: Receipt delivery through sms (Active if we have a gatway, dummy if not)
  4. Create Lipi Lite
  5. Lipi Lite: Receipt Delivery through Own Mobile (SMS and Whatsapp)

Timing

iLGunners commented 4 years ago

Limit receipt sending

Consider limiting how many times receipt of a sales can be sent

iLGunners commented 4 years ago

Final Plan

Step 1. Email receipts (only anti spamming limit) Step 2. Per sales receipt sending limitation
Step 3. Sms receipts (hard limit, burn rate calculated)

Maybe

Step 3. UI display sms email sent Stap 4. Charge after limit