Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Use Cases
- Guest Checkout
- Unique email id and contact no? sorted
- Email id and contact no already used by same customer? sorted
- Email id used but not contact no - not allowed, change contact no after email authentication? Figure out UX.
- Contact no used but not email - Not allowed. Use different phone number, or login into previous account with phone number and change email id.
- Email id and contact no already used by 2 separate customers - Same as c.
- Address selection for guest checkout. TBD with UX, Algo and manual.
- Logged in Checkout
- Unique contact no - sorted
- Contact no already used by another customer - 1.d
- Unified cart across platforms?
- Unified cart across devices? Yes.
- Unified cart across cities? TBD with UX
- Merge carts after login? TBD with UX
- Order Source?
- Schema Changes for Web
- to be deleted(move to panem)
- Users - Remove from web
- Delivery_addresses - Remove from web
- Referral_codes - Remove from web
- Bookings and associations - remove from web
- Wishlist
- Devices
- to be modified
- Customers - keep temporarily until kyc migration
- Payments - add panem user_id, remove all other user credentials
- Carts - add panem user_id and delivery_address_id, will be empty for guest checkouts until panem user created.
- Orders - add panem user_id
- Ghost User Workflow on Web/Mobile
- On first visit, ask user for city and create a ghost user.
- POST /ghost_users
- Request
- :city_id
- :medium
- :device_params
- :device_id
- :device_name
- device_os
- :device_os_version
- :device_app_version
- :track_params
- :source
- :campaign
- :medium
- Response - This would return the ghost_identifier
- Save ghost user identifier in cookie/local storage.
- Cookie Name - furlenco_ghost_identifier
- Header Name - X-Ghost-Identifier
- All subsequent calls will include this ghost user identifier.
- When user logins, Panem Token is returned, which is stored on cookie/local storage
- Cookie Name - furlenco_panem_token
- Header Name - X-Panem-Token
- All subsequent calls should contain this token
- Guest Checkout Workflow on Web/Mobile
- User enters email_id and contact_no for guest checkout.
- Get the user_id from panem and update cart
- POST /guest_user
- Request
- email_id
- contact_no
- Response
- If user for email_id exists
- if user has same contact_no as given, user is returned and user_id is updated in cart.
- If user has different contact_no as given, error - "The email id you provided - #{email_id} already has a contact no - #{masked_contact_no} saved. Proceed if you wish to use the same contact no. You might choose to change it after logging in into your account."
- If user doesn’t have contact_no, contact_no is updated, user id returned, and user_id is saved in cart
- if user for contact_no is present(obviously it’ll have a different email_id since we dealt the previous case earlier), error - "The contact no you provided - #{contact_no} already has a email id - #{masked_email_id} saved. Proceed if you wish to use the same email id. You might choose to change it after logging in into your account."
- if email_id and contact_no are unique, user created, returned and user_id is updated in cart.
- The user has to keep trying until the above step is successful.
- After this, get all delivery_addresses of user(masked since he’s not logged in)
- GET cart/user/delivery_addresses
- Response - [
- { id: 1, full_address: `full masked address of user` },
- { id: 2, full_address: `full masked address of user` }
- ]
- Now the user has the option to either choose one of these addresses or create a new one.
- Choose one delivery_address, this would validate whether it belongs to the user.
- PUT /cart/delivery_addresses
- Request
- delivery_address_id
- Create a delivery_address
- POST cart/delivery_addresses
- Request
- city_id
- pincode
- address
- The delivery_address_id is updated in the cart.
- Now he can checkout.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement