Skip to content

Instantly share code, notes, and snippets.

@jpmoyn
Last active March 23, 2020 16:46
Show Gist options
  • Save jpmoyn/4cb76f92540a630bea3ee3e4be5c5f08 to your computer and use it in GitHub Desktop.
Save jpmoyn/4cb76f92540a630bea3ee3e4be5c5f08 to your computer and use it in GitHub Desktop.

Alerts

On Dispatch, especially during peak hours, it is easy for items that need action to slip through the cracks. Alerts aims to solve this problem and increase service levels by highlighting these issues and generating buttons to take action quickly and easily.

How it works

On a repeating interval, the server searches for orders, shifts, or metrics that match the above triggers. If a match is found, it will check if an alert has already been created for the scenario. If not, the details of the problem, as well as the actions to solve the problem, are generated and sent to Dispatch to be displayed.

Current functionality

In Version 1 of alerts, the system will pick up on 5 scenarios:

name trigger action
order_ct current_time is 15+ minutes past when an order is marked as ready OR current_time is 15+ minutes past the estimated ready time based on the restaurant's prep_time call restaurant, apologize, give updated ETA
order_unacknowledged order was assigned 5+ minutes ago and not yet accepted call runner to confirm, reassign if needed
runner_ncns block started 15+ mins ago but runner has not checked in call runner - if no response, push block back and unassign
restaurant_cancel high-volume restaurant cancels more than 25% of their daily orders call the restaurant to understand why they are canceling, prioritize them as necessary
territory_high_drh current territory drh rises above the average target_drh for all retreat points in the territory generate a list of runners shifted later or not working, ask them to start early or pick up a block

Future Alerts

Based on existing ideas as well as feedback from the team, there will be more situations added to the list. Some planned alerts include:

  • Runner moving away from next task
  • Outdated runner location ping
  • Runner out of zone
  • Order has high TDT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment