Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to track order status #508

Open
josephlausf opened this issue Feb 16, 2016 · 16 comments
Open

Add ability to track order status #508

josephlausf opened this issue Feb 16, 2016 · 16 comments

Comments

@josephlausf
Copy link
Contributor

@xkokushox @marcdoan @vcardillo @demant

Flow

  • Due to background service constraints with the customer app, we'll be using SMS as opposed to triggering local notifications through node when notifying users of order status
  • SMS will contain a deep link into the app
  • The navigation flow into Order Status within the app will follow that of the current flow into Orders screen
  • Order Status screen will only be accessible through orders that are under In progress, meaning the order has been assigned to a driver
  • Orders under In progress will be green and tappable
  • Tapping an order under In progress will navigate into Order Status screen
  • Order Status screen will include:
    • a back button
    • a visual guide to the 4-step process of Prep -> Delivery -> Assembly -> Pickup
    • a map to display the driver and destination markers
    • a Build Another Bento button at the bottom that takes user back to the build screen
  • The visual guide will show a transitional green highlight of each step that has been completed:
  • Once the driver hits Complete, order status will be removed for that particular order in the customer app. If that screen is still in view, automatically pop back to Orders screen

Tech specs

  • @vcardillo is it possible to include driverId with orders under In progress?
  • when user taps on order -> connect and authenticate with node to get token -> using token and driverId, call track -> if successful -> listen to loc stat push
  • render map with updated coordinates from loc channel
  • listen for order completion from push channel
  • if user goes to background or kills app, close socket connection
  • if user returns to foreground directly to Order Status, repeat above
@josephlausf josephlausf self-assigned this Feb 16, 2016
@josephlausf josephlausf added this to the 2.68 [current] milestone Feb 16, 2016
@vcardillo
Copy link
Member

My biggest concern and question:

What happens when the driver's phone stops tracking them for whatever
reason? What happens when the driver falls off Atlas? What does the
customer see?

I think we'll want a way to roll this out to production, incrementally. So
we can put it into the app store, but only certain people can see the
feature at first. Maybe just some of us, to ensure that it's working.
On Feb 16, 2016 2:17 PM, "Joseph Lau" [email protected] wrote:

@xkokushox https://github.com/xkokushox @marcdoan
https://github.com/marcdoan @vcardillo https://github.com/vcardillo
@demant https://github.com/demant
Flow

Due to background service constraints with the customer app, we'll be
using SMS as opposed to triggering local notifications through node when
notifying users of order statuses

SMS will contain a deep link into the app

The navigation flow into Order Status within the app will follow that
of the current flow into Orders screen

Order Status screen will only be accessible through orders that are
under In progress, meaning the order has been assigned to a driver

Orders under In progress will be green and tappable

Tapping an order under In progress will navigate into Order Status
screen

Order Status screen will include:

  • a back button

    • a visual guide to the 4-step process of Prep -> Delivery ->
      Assembly -> Pickup
    • a map to display the driver and destination markers
    • a Build Another Bento button at the bottom that takes user back
      to the build screen

    The visual guide will show a transitional green highlight of each step
    that has been completed:

  • Prep - means that the driver is not yet en-route, but has been
    assigned the order. In this case, we'll only show a message explaining that
    the order is being prepared ( something like this
    https://www.dropbox.com/s/wgl9djw9p6m9s3i/Bento-Delivery-Arrived.png?dl=0
    )

    Once the driver hits Complete, order status will be removed for that
    particular order in the customer app. If that screen is still in view,
    automatically pop back to Orders screen

Tech specs

@vcardillo https://github.com/vcardillo is it possible to include
driverId with orders under In progress?

when user taps on order -> connect and authenticate with node to get
token -> using token and driverId, call track -> if successful ->
listen to loc stat push

render map with updated coordinates from loc channel

listen for order completion from push channel

if user goes to background or kills app, close socket connection

if user returns to foreground directly to Order Status, repeat above


Reply to this email directly or view it on GitHub
#508.

@josephlausf josephlausf modified the milestones: 2.68 [current], 2.69 [next] Feb 19, 2016
@josephlausf
Copy link
Contributor Author

@vcardillo hi, along with driverId in /orderhistory, can you also add lat and long of customer address?

EDIT: Oh, can you also add text for the states PREP and PICKUP to /ioscopy?

@vcardillo
Copy link
Member

I can, but what do you need it for? Another problem is, @marcdoan, if an address is edited in Atlas, do you update the lat/long in the DB?

@josephlausf
Copy link
Contributor Author

Thanks, we need the delivery address per order in case customer sets different addresses for different orders

@vcardillo
Copy link
Member

It's on dev and prod.

“prep_status_title” = “Your Bento is being prepped”
“prep_status_description” = “We’ll be en-route shortly!”

“pickup_status_title” = “Your Bento is here!"
“pickup_status_description” = “Please meet your driver at the curbside to pick up your order.”

@josephlausf
Copy link
Contributor Author

Hi, can you add value of text for key type for all of the above ioscopies

{
    key = "prep_status_title";
    type = "<null>";
    value = "Your Bento is being prepped";
}

@vcardillo
Copy link
Member

ok done

On Wed, Mar 2, 2016 at 4:07 PM, Joseph Lau [email protected] wrote:

Hi, can you add value of text for key type for all of the above ioscopies

{
key = "prep_status_title";
type = "";
value = "Your Bento is being prepped";
}


Reply to this email directly or view it on GitHub
#508 (comment).

@josephlausf
Copy link
Contributor Author

@xkokushox

In regards to disconnecting from Node when tracking driver, I think we should go with making a call to Google Maps API. We already have an account for it with an API key plus directions enabled. Here's how it would look like: http://recordit.co/KfhSNHxB5u

I make a call to Google Maps API, passing in, for example, the last location received from Node before being disconnected, which returns a bunch of data from that last location to the final destination. I parse the response, getting a route, which contains all the steps.

Each step includes a start_location, end_location, duration and polyline. I can't animate the driver icon from step to step because it would cause the driver icon to fly over buildings to get from one point to another. What I need are all the points in between the start_location and end_location of each individual step.

To do that, I decode the polyline to get an array of all the coordinates, then loop through the array using a timer that increments based on duration divided by the amount of coordinates returned from polyline (speedFromPointToPoint).

If reestablished connection to Node, then stop the above and update each coordinate based on the data received from Node.

@vcardillo
Copy link
Member

Are you able to get ETA too? Ideally we could show ETA as well.

@vcardillo
Copy link
Member

Check out the Waze SDK, too. Google bought Waze, so it's probably all the same, but check it out anyways. I am hoping we can do ETA on the front end, too.

@josephlausf josephlausf modified the milestones: 2.69 [current], 2.7 [next] Mar 4, 2016
@josephlausf
Copy link
Contributor Author

@vcardillo Hi, can we get orderId in /orderhistory as well? We need to be able to identify an order before checking its status, thanks

@josephlausf
Copy link
Contributor Author

Also, in the case where customer connects to node, but the driver isn't emitting location, we need the last saved location of the driver returned to us in the /api/track?client_id=d-10 call to even be able to simulate the route using Google Maps API.

This is what we get now:

{
"code": 0,
"msg": "",
"ret": {
    "clientId":"d-1",
    "connected":false,
    }
}

We need something like this:

{
"code": 0,
"msg": "",
"ret": {
    "clientId":"d-1",
    "connected":false,
    "last_lat":11,123123,
    "last_lng":123,123
    }
}

``

@josephlausf
Copy link
Contributor Author

Ok, actually calling api/gloc?token=c-1-0-randombits&clientId=d-8 returns the saved location

@josephlausf
Copy link
Contributor Author

Tracking Demo: http://recordit.co/owp1KwGnPA
Deep linking: http://recordit.co/e44Hdy16Vo

@vcardillo
Copy link
Member

How is the deep linking being used with our customers?

On Sat, Mar 12, 2016 at 6:30 PM, Joseph Lau [email protected]
wrote:

Tracking Demo: http://recordit.co/owp1KwGnPA
Deep linking: http://recordit.co/e44Hdy16Vo


Reply to this email directly or view it on GitHub
#508 (comment).

@josephlausf
Copy link
Contributor Author

Hi, the link is set up here: https://dashboard.branch.io/?origin=website-nav-&#/marketing under the marketing title, Deep Link to Orders Screen.

Short URL: https://bnc.lt/orders-screen

This link needs to be attached to the order status text messages, so when the customer gets a text message, they can tap on the link to open up to the Orders screen.

@vcardillo vcardillo added the spec label Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants