# Product Requirements Document: Backstock Queue

## Validation Checklist

- [x] All required sections are complete
- [x] No [NEEDS CLARIFICATION] markers remain
- [x] Problem statement is specific and measurable
- [x] Problem is validated by evidence (not assumptions)
- [x] Context → Problem → Solution flow makes sense
- [x] Every persona has at least one user journey
- [x] All MoSCoW categories addressed (Must/Should/Could/Won't)
- [x] Every feature has testable acceptance criteria
- [x] Every metric has corresponding tracking events
- [x] No feature redundancy (check for duplicates)
- [x] No contradictions between sections
- [x] No technical implementation details included
- [x] A new team member could understand this PRD

---

## Product Overview

### Vision

A unified work queue system for backstock operations that transforms ad-hoc bin management into organized, trackable, assignable work orders — visible across the backstock report, workbook, and mobile app.

### Problem Statement

Today, backstock operations rely on informal communication and manual tracking. When a manager identifies bins that need to be pulled from offsite storage, they must verbally tell staff or write it on a whiteboard. Similarly, when empty bins need to be filled with specific product categories, there's no system to track these requests. This leads to:

- **Forgotten requests** — pull/fill instructions get lost between shifts
- **No accountability** — no record of who requested what, or when it was completed
- **No visibility** — workbook users can't see pending backstock work alongside their other tasks
- **Disconnected from task system** — backstock work doesn't integrate with the existing task completion workflow that staff already use daily
- **Event prep is siloed** — event-based "bins to pull" exists in a separate view, disconnected from day-to-day queue operations

**Baseline evidence:** Currently there is no tracking of verbal/manual pull requests, making it impossible to measure completion rates, response times, or missed requests. The event system tracks bin pull progress during events, but day-to-day backstock work is entirely unmetered. This feature establishes the first measurable baseline for backstock operations.

### Value Proposition

The Backstock Queue creates a single, organized work pipeline for all backstock operations. Staff see exactly what needs to be pulled or filled, in priority order, with optional notes explaining why. Managers queue work from the backstock report with one click and see it flow into the workbook where staff track and complete it. Event-generated pull lists merge seamlessly into the same queue. Every action is tracked, auto-completing linked tasks, and providing full history for operational reporting.

## User Personas

### Primary Persona: Store Manager
- **Demographics:** 25-50 years old, manages daily store operations, moderate technical expertise, uses the backstock report regularly to monitor inventory health
- **Goals:** Ensure bins are pulled from offsite storage in time for sales events. Keep empty bins filled with the right product. Track staff accountability for backstock tasks.
- **Pain Points:** Has to verbally communicate pull/fill requests, can't verify if work was done without physically checking, lacks visibility into backstock workload across shifts

### Secondary Personas

#### Stocker / Floor Staff
- **Demographics:** 18-35 years old, responsible for physical bin handling, uses the workbook daily, may also use mobile app
- **Goals:** Know exactly which bins to pull or fill during their shift. Complete work in priority order. Get credit for completed work.
- **Pain Points:** Receives conflicting verbal instructions, doesn't always know which bins are highest priority, has to ask manager repeatedly for next task

#### Shift Lead
- **Demographics:** 22-40 years old, oversees a shift team, uses both workbook and backstock report, needs to delegate work
- **Goals:** Assign queue items to specific team members. See at a glance what's been completed vs. outstanding. Ensure event prep is on track.
- **Pain Points:** Can't easily distribute backstock work across team, no way to see which tasks were completed on prior shifts

## User Journey Maps

### Primary User Journey: Manager Queues a Pull Request

1. **Awareness:** Manager reviews the backstock report and notices bins at an offsite location that contain product needed for an upcoming sale or floor restock.
2. **Action:** Manager selects one or more bins from the backstock report table and clicks "Add to Pull Queue." An optional note field allows context (e.g., "Need for weekend sale"). The bin is added to the pull queue.
3. **Visibility:** The queue item immediately appears in the workbook's "Bins to Pull" tab via real-time notification (Ably). A badge count updates.
4. **Assignment (optional):** Manager or shift lead can assign the queue item to a specific employee.
5. **Completion:** Staff member pulls the bin, performs the backstock action (which auto-completes the linked task), and the queue item is marked complete.
6. **Review:** Manager can see completed items in activity/history, confirming the work was done.

### Secondary User Journeys

#### Journey: Staff Picks Up Queue Items from Workbook
1. Staff opens the workbook and sees the "Bins to Pull" tab showing queued items in priority/position order.
2. Staff taps a bin to see details (location, category, notes from manager).
3. Staff performs the pull action via the existing quick-action flow.
4. The queue item and linked task auto-complete. The item moves to history.
5. Staff proceeds to the next item in the queue.

#### Journey: Manager Queues a Fill Request
1. Manager sees empty bins in the backstock report (bins with no main category).
2. Manager selects empty bins and clicks "Add to Fill Queue."
3. Manager optionally selects a target category to fill with and adds a note.
4. The fill request appears in the workbook "Bins to Fill" tab.
5. Staff fills the bin with the specified (or any appropriate) category product.
6. The fill action auto-completes the linked task.

#### Journey: Event Bins Auto-Queue
1. An event enters its build-up phase (existing event system calculates daily targets).
2. The system automatically merges event-generated pull list into the Pull Queue.
3. Event items appear in the queue with event context (event name, deadline).
4. Staff processes event bins alongside manually queued items.
5. As event bins are pulled, the event progress updates automatically.

#### Journey: Mobile Queue Access
1. Staff on the floor opens the mobile app.
2. They can see the queue (pull/fill) and act on items.
3. Actions taken on mobile auto-complete the linked tasks.

## Feature Requirements

### Must Have Features

#### Feature 1: Pull Queue — Add Bins from Backstock Report
- **User Story:** As a manager, I want to select bins from the backstock report and add them to a pull queue so that staff knows which bins to retrieve from storage.
- **Acceptance Criteria:**
  - [ ] User can select one or more bins from the backstock report DataTable
  - [ ] "Add to Pull Queue" action is available (button or context menu)
  - [ ] Optional note/reason field is shown when adding to queue
  - [ ] System prevents duplicate queue entries for the same bin (shows warning if already queued)
  - [ ] Queue item is created immediately and visible in the workbook
  - [ ] A corresponding one-time task is created in the task system with `sourceType = 'backstock_queue'`
  - [ ] Real-time notification (Ably) sent when queue item is added

#### Feature 2: Fill Queue — Add Empty Bins from Backstock Report
- **User Story:** As a manager, I want to select empty bins and queue them to be filled with a specific category of product so that empty bin refilling is tracked and organized.
- **Acceptance Criteria:**
  - [ ] User can select empty bins (no main category) from the backstock report
  - [ ] "Add to Fill Queue" action is available
  - [ ] Optional category selector allows specifying which category to fill with
  - [ ] Optional note field for context
  - [ ] Prevents duplicate entries for the same bin
  - [ ] Queue item created with fill-specific metadata (target category if provided)
  - [ ] Corresponding one-time task created in task system
  - [ ] Real-time notification sent

#### Feature 3: Workbook Queue Display — Bins to Pull Tab
- **User Story:** As a stocker, I want to see all queued pull requests in the workbook so I know exactly which bins to retrieve from storage and in what order.
- **Acceptance Criteria:**
  - [ ] New "Bins to Pull" tab in workbook backstock panel shows all queued pull items
  - [ ] Items displayed in user-defined order (drag-and-drop reorderable by managers)
  - [ ] Each item shows: bin name, location (on-site/off-site), category, age, note/reason, assigned employee (if any)
  - [ ] Event-generated pull items are merged into the same list with event context badge
  - [ ] Badge count on tab shows number of pending items
  - [ ] Tapping an item opens bin detail modal with quick-action capability

#### Feature 4: Workbook Queue Display — Bins to Fill Tab
- **User Story:** As a stocker, I want to see all queued fill requests in the workbook so I know which empty bins need to be restocked and with what product.
- **Acceptance Criteria:**
  - [ ] New "Bins to Fill" tab in workbook backstock panel shows all queued fill items
  - [ ] Items displayed in user-defined order (drag-and-drop reorderable)
  - [ ] Each item shows: bin name, location, target category (if specified), note/reason, assigned employee
  - [ ] Badge count on tab shows number of pending items
  - [ ] Tapping an item opens bin detail modal

#### Feature 5: Auto-Complete Linked Tasks
- **User Story:** As a stocker, I want the task to auto-complete when I perform the backstock action so I don't have to manually mark both the queue item and the task as done.
- **Acceptance Criteria:**
  - [ ] Pull queue items auto-complete when any backstock action is performed on the queued bin (action types: empty=0, add=1, remove_some=2, remove_all=3)
  - [ ] Fill queue items auto-complete when an "add" action (type 1) is performed on the queued bin
  - [ ] Queue item status transitions from "pending" to "completed" when the linked action is performed
  - [ ] Completed items are removed from the active queue and stored in history with completion timestamp
  - [ ] The linked task's completion record is created for the current date
  - [ ] Task completion is reflected in the workbook task list view
  - [ ] If task creation originally failed (queue item exists without linked task), completing the queue item still works — the queue item is marked complete even without a linked task

#### Feature 6: Queue Item Assignment
- **User Story:** As a shift lead, I want to assign queue items to specific employees so I can distribute work evenly across my team.
- **Acceptance Criteria:**
  - [ ] Queue items can be optionally assigned to a specific employee
  - [ ] Employee selector uses the existing `workbookEmployeeSelector` component
  - [ ] Assigned items show the employee's name/avatar in the queue display
  - [ ] Assigned employee can see items assigned to them prominently (filter/highlight)
  - [ ] Unassigned items remain available for anyone to pick up

#### Feature 7: Drag-and-Drop Queue Ordering
- **User Story:** As a manager, I want to drag and drop queue items to set priority order so that staff works on the most important bins first.
- **Acceptance Criteria:**
  - [ ] Queue items can be reordered via drag-and-drop
  - [ ] Position/sort order is persisted and synced across sessions
  - [ ] New items are added to the bottom of the queue by default
  - [ ] Event-merged items can be interleaved with manually queued items
  - [ ] Reorder changes are broadcast via Ably for real-time sync

#### Feature 8: Event Queue Integration
- **User Story:** As the system, when an event enters its build-up phase, I want to automatically merge the event's pull list into the backstock queue so that event prep work and daily operations share one unified view.
- **Acceptance Criteria:**
  - [ ] Event build-up phase is detected when: `DATE_SUB(startDate, INTERVAL buildUpDays DAY) <= CURDATE() AND startDate > CURDATE()` (matches existing `BackstockPanelController::getActiveOrPreparingEvents()` logic)
  - [ ] Qualifying bins are determined by `EventService::getBinsToPull()` — bins linked to event categories that haven't been pulled
  - [ ] Auto-queued event items are created with `source = 'event'` and reference the event ID
  - [ ] Event-sourced queue items display event name and start date as context
  - [ ] Event items can be reordered alongside manual items in the queue
  - [ ] Completing an event-sourced queue item updates the event's progress (bin marked as pulled)
  - [ ] When event ends (`endDate < CURDATE()`) or is deactivated (`isActive = 0`), unprocessed event queue items are auto-cancelled with system note
  - [ ] Event queue merge runs on first workbook load of the day or when event status changes — it does NOT continuously re-add bins that were already cancelled
  - [ ] Duplicate prevention applies: if a bin is already in the queue (manually added), the event merge skips it rather than creating a duplicate

### Should Have Features

#### Feature 9: Mobile Queue Access
- **User Story:** As a stocker on the floor, I want to view and act on queue items from the mobile app so I can process backstock work without returning to a workstation.
- **Acceptance Criteria:**
  - [ ] Mobile API endpoint returns queue items (pull and fill) for the store
  - [ ] Mobile app displays queue in a list format
  - [ ] Staff can perform quick actions on queued bins from mobile
  - [ ] Actions auto-complete linked tasks

#### Feature 10: Queue History and Reporting
- **User Story:** As a manager, I want to see a history of completed and cancelled queue items so I can review team performance and track accountability.
- **Acceptance Criteria:**
  - [ ] Completed and cancelled items are retained indefinitely with timestamps
  - [ ] History is displayed in the existing Activity tab (third tab in the backstock panel), merged with today's backstock actions
  - [ ] Queue history entries show: who queued it, who completed it, when, queue type (pull/fill), and any notes
  - [ ] Filter by date range, employee, queue type (pull/fill)
  - [ ] History entries are visually distinct from non-queue activity (e.g., badge or icon indicating "from queue")

#### Feature 11: Queue Item Re-assignment
- **User Story:** As a shift lead, I want to re-assign a queue item from one employee to another (or unassign it) so I can adjust workload distribution during a shift.
- **Acceptance Criteria:**
  - [ ] Re-assign action available on any pending queue item
  - [ ] Can change assignment to a different employee or clear assignment entirely
  - [ ] Re-assignment is broadcast via Ably for real-time sync
  - [ ] History records both original and new assignment

Note: Duplicate prevention is a core behavior of Features 1 and 2, not a separate feature. Both pull and fill queue creation enforce uniqueness per bin with user-facing warnings.

### Could Have Features

#### Feature 12: Bulk Queue Actions from Backstock Report
- **User Story:** As a manager, I want to select multiple bins at once and add them all to the queue in a single action.
- **Acceptance Criteria:**
  - [ ] Multi-select checkbox on backstock report table
  - [ ] Bulk "Add to Pull Queue" / "Add to Fill Queue" action available
  - [ ] Single note applies to all selected bins (or option to add individual notes)

#### Feature 13: Queue Filters on Workbook
- **User Story:** As a stocker, I want to filter the queue by location or assigned employee so I can focus on bins relevant to me.
- **Acceptance Criteria:**
  - [ ] Filter by location (on-site / off-site / specific location)
  - [ ] Filter by assigned employee (mine / unassigned / all)
  - [ ] Filter persists within session

#### Feature 14: Queue Item Cancellation
- **User Story:** As a manager, I want to cancel a queue item if it's no longer needed so staff doesn't waste time on outdated requests.
- **Acceptance Criteria:**
  - [ ] Cancel action available on queue items
  - [ ] Cancelled items move to history with "cancelled" status
  - [ ] Linked task is also cancelled/removed
  - [ ] Cancellation note field (optional)

### Won't Have (This Phase)

- **Automated queue suggestions** — system won't auto-suggest bins to pull based on sales velocity or floor plan gaps (future ML feature)
- **Cross-store queue sharing** — queue is per-store only, no visibility across locations
- **Queue scheduling** — no "pull this bin at 3pm" time-based scheduling; queue is ordered position-based only
- **Inventory count integration** — queue won't trigger or connect to inventory count workflows
- **Print queue list** — printing of queue items is out of scope for initial release (existing bins-to-pull print modal can be revisited later)
- **Email/SMS/push notifications** — notifications are Ably-only (in-app real-time); no external notification channels
- **History export** — history is viewable in-app but CSV/PDF export is out of scope for phase 1
- **History auto-archival** — all completed/cancelled items are retained indefinitely; no time-based cleanup or archival

## Detailed Feature Specifications

### Feature: Pull Queue — End-to-End Flow

**Description:** The pull queue enables managers to flag bins from the backstock report for retrieval from storage. These queue items appear in the workbook where staff can process them. The queue maintains a user-defined ordering via drag-and-drop and integrates with the existing task system for completion tracking.

**User Flow:**
1. Manager opens the backstock report and identifies bins to be pulled (e.g., offsite bins with specific categories)
2. Manager selects one or more bins in the DataTable
3. Manager clicks "Add to Pull Queue" button in the action toolbar
4. A modal appears with:
   - List of selected bins (name, location, category)
   - Optional note/reason text field
   - Optional employee assignment dropdown
   - Confirmation button
5. System validates no duplicates exist in the queue
6. System creates queue items and corresponding one-time tasks
7. System sends Ably notification to workbook users
8. Workbook's "Bins to Pull" tab updates in real-time with the new items
9. Staff member views the queue, picks an item, and performs the pull action
10. Queue item and linked task auto-complete
11. Item moves to completed history

**Queue Item Lifecycle States:**
- `pending` — Item is in the active queue, awaiting action
- `completed` — Backstock action was performed; item moved to history
- `cancelled` — Item removed from queue (manually or by system); moved to history
- Valid transitions: `pending → completed`, `pending → cancelled`
- No transition back from `completed` or `cancelled` (terminal states)

**Permission Model:**
- "Backstock access" is defined by the existing `checkAccessAndReturnStoreObject($app, $typeNum, 'task-lists')` permission check — the same check used for the workbook backstock panel
- All users passing this check can: add to queue, complete queue items, reorder queue, assign/re-assign items, cancel items
- No additional role or permission tiers are needed for the queue

**Business Rules:**
- Rule 1: A bin can only have ONE active (pending) queue item at a time (pull or fill, not both)
- Rule 2: Queue items created from events inherit the event's context (name, deadline) and display it
- Rule 3: When a queue item is auto-completed, the linked task's `TaskCompletion` record is created for today's date
- Rule 4: Any employee with backstock access (per permission model above) can add items to the queue
- Rule 5: All backstock users can reorder, assign, and cancel queue items
- Rule 6: Queue items for deleted or hidden bins should be auto-cancelled
- Rule 7: Event-generated queue items are tagged with the event source so they can be distinguished in the UI
- Rule 8: Queue item creation and task creation are atomic — if task creation fails, the queue item should not be created (rollback). User sees an error and can retry.
- Rule 9: "Real-time" updates via Ably target delivery within 2-3 seconds for active viewers. If Ably is unavailable, the workbook falls back to manual refresh (pull-based) — a subtle banner indicates "Live updates paused"

**Edge Cases:**
- Scenario 1: Bin is physically pulled before queue item is addressed → Queue item remains until explicitly completed or cancelled; performing the backstock action on it will still auto-complete
- Scenario 2: Bin is deleted while in queue → Queue item auto-cancels with system note "Bin was deleted"
- Scenario 3: Event is cancelled while event bins are in queue → Event-sourced queue items auto-cancel with system note "Event cancelled"
- Scenario 4: User tries to add a bin that's already queued → System prevents creation and shows warning with link to existing queue item
- Scenario 5: Queue item is assigned to employee who is no longer active → Assignment persists but item remains available for anyone to complete
- Scenario 6: Manager reorders queue while staff is viewing → Reorder broadcasts via Ably and staff's view updates in real-time
- Scenario 7: Bin location changes (moved from offsite to onsite) while in pull queue → Queue item reflects current location data when viewed (reads from bin, not cached)
- Scenario 8: Task creation fails during queue item creation → Entire operation rolls back; user sees error "Failed to create queue item, please try again"; no orphaned queue items
- Scenario 9: Ably is down → Queue changes still persist to database; workbook shows stale data until manual refresh; no data loss
- Scenario 10: Two users simultaneously try to add the same bin to queue → First request succeeds; second request gets duplicate warning (database-level uniqueness constraint on active items per bin)
- Scenario 11: Two users simultaneously drag-reorder the queue → Last write wins; both users see the final order after Ably sync (or on next refresh if Ably is down)

### Feature: Fill Queue — End-to-End Flow

**Description:** The fill queue enables managers to flag empty bins that need to be restocked with a specific product category. The flow is similar to pull queue but with a category selection step.

**User Flow:**
1. Manager identifies empty bins in the backstock report (bins with no mainCategory or mainCategory = "Empty")
2. Manager selects empty bins and clicks "Add to Fill Queue"
3. Modal shows selected bins with:
   - Optional category selector (from existing categories — POS and custom)
   - Optional note/reason
   - Optional employee assignment
4. System creates fill queue items and one-time tasks
5. Items appear in workbook "Bins to Fill" tab
6. Staff fills the bin with specified or appropriate product
7. The fill action (backstock action type "add") auto-completes the queue item and task

**Business Rules:**
- Rule 1: Fill queue items without a specified target category show "Any Category" in the UI
- Rule 2: When staff fills a bin, the category used is recorded regardless of whether a target was specified
- Rule 3: If a target category was specified but staff fills with a different category, the queue item still auto-completes (the system records what was actually used, not what was requested)
- Rule 4: A bin can transition from pull queue to fill queue (e.g., pulled from offsite, emptied, then queued for refill) but not simultaneously

**Edge Cases:**
- Scenario 1: Bin becomes non-empty before fill queue item is addressed (someone filled it outside the queue) → Queue item remains; any subsequent action auto-completes it
- Scenario 2: Target category is deleted from the system → Queue item remains with original category text; staff can fill with any available category

## Success Metrics

### Key Performance Indicators

- **Adoption:** >50% of backstock pull/fill requests are done via queue within 30 days of launch (vs. verbal/manual methods)
- **Engagement:** Average of 5+ queue items created per store per day within 60 days
- **Quality:** >80% of queue items are completed (vs. cancelled or abandoned) — indicates queue reflects real work
- **Business Impact:** Reduction in "missed pulls" — bins that should have been pulled for events but weren't (measurable by comparing event prep completion rates before/after)

### Tracking Requirements

| Event | Properties | Purpose |
|-------|------------|---------|
| `backstock_queue_item_created` | queue_type (pull/fill), bin_id, source (manual/event), has_note, has_assignment, has_category | Track queue adoption and usage patterns |
| `backstock_queue_item_completed` | queue_type, bin_id, time_in_queue_minutes, completed_by_assignee (bool), source | Measure queue throughput and assignment effectiveness |
| `backstock_queue_item_cancelled` | queue_type, bin_id, cancellation_reason, time_in_queue_minutes | Identify patterns in cancelled items |
| `backstock_queue_reordered` | queue_type, items_count | Track how often managers use ordering |
| `backstock_queue_assigned` | queue_type, bin_id, assigned_to_employee_id | Track assignment usage |
| `backstock_queue_event_merged` | event_id, bins_count | Track event integration usage |

---

## Constraints and Assumptions

### Constraints
- Must integrate with existing Slim 2 routing patterns and PHP backend architecture
- Must use existing task system (`tasks` table with `sourceType`, `taskMode = 'one_time'`) for task creation
- Must use existing Ably infrastructure for real-time notifications
- Mobile API must follow existing mobile endpoint patterns (`/api/:typeNum/mobile/...`)
- Queue ordering must work with concurrent users (optimistic locking or last-write-wins)
- Must not break existing event-based "bins to pull" functionality during migration
- Migration path: The existing "Bins to Pull" tab (currently showing aged/event bins directly from `BackstockPanelController::getBinsToPull()`) will be replaced by the queue-based view. The existing aged-bins-to-pull logic becomes the seed data for the queue during the transition, but the queue is the new source of truth. No dual-view period — the queue replaces the old view at launch.

### Assumptions
- Stores already have backstock configured with bins, locations, and categories
- The existing `workbookEmployeeSelector` component is available for employee assignment
- Staff already use the workbook daily for task management (established habit)
- Internet connectivity is reliable enough for Ably real-time updates (graceful fallback for offline)
- Most stores have fewer than 500 active bins, so queue performance at that scale is sufficient

## Risks and Mitigations

| Risk | Impact | Likelihood | Mitigation |
|------|--------|------------|------------|
| Staff ignore queue and continue verbal workflow | High | Medium | Make queue the default view in workbook; highlight pending items prominently |
| Event queue merge creates overwhelming queue sizes | Medium | Low | Event items can be interleaved and reordered; managers control ordering |
| Concurrent drag-and-drop reordering causes conflicts | Medium | Medium | Use position-based ordering with optimistic updates; last reorder wins |
| Queue items go stale (never completed or cancelled) | Medium | Medium | Consider future "stale item" highlighting for items older than configurable threshold |
| Mobile app changes require app store review cycles | High | Medium | Build mobile queue as API-first; mobile UI can follow in subsequent release |

## Open Questions

- [x] ~~Where should "Add to Queue" be triggered?~~ → Backstock Report + Mobile
- [x] ~~Category requirement for fill queue?~~ → Optional
- [x] ~~Queue ordering model?~~ → Drag-and-drop with position tracking
- [x] ~~Task auto-completion?~~ → Yes, auto-complete on action
- [x] ~~Permissions model?~~ → Any backstock user can add/complete; all can reorder
- [x] ~~Assignment model?~~ → Assignable to specific employees (optional)
- [x] ~~Event integration?~~ → Merge event bins into main queue
- [x] ~~Workbook tab structure?~~ → Three tabs: Bins to Pull | Bins to Fill | Activity
- [x] ~~Duplicate handling?~~ → Prevent duplicates with warning
- [x] ~~Notes on queue items?~~ → Optional notes
- [x] ~~Real-time updates?~~ → Ably (matching existing patterns)
- [x] ~~History retention?~~ → Keep all history for reporting
- [ ] Should there be a configurable "stale threshold" for queue items that haven't been addressed? (e.g., highlight items older than 24 hours) → Deferred to post-launch; can be added as a Could Have in a future iteration
- [ ] Should the fill queue suggest categories based on the bin's previous category history? → Deferred to post-launch; good UX enhancement but not blocking for initial release

---

## Supporting Research

### Competitive Analysis
This feature is analogous to work order/task queue systems used in warehouse management (WMS) and retail operations software. Key patterns observed:
- **Warehouse pick lists** — ordered lists of items to retrieve from storage locations, typically with position-based priority
- **Retail task management** — systems like Zebra Reflexis or Legion that assign store tasks to employees with completion tracking
- **Kanban-style queues** — visual boards where work items flow from "to do" to "in progress" to "done"

Our approach combines the simplicity of an ordered queue (not full Kanban) with task system integration, which is unique to our platform.

### User Research
Based on existing usage patterns:
- Stores with events use the "bins to pull" feature actively during build-up phases
- The workbook task system has strong daily adoption — tasks are the primary workflow for staff
- Verbal communication of backstock work is the primary pain point reported by multi-shift operations
- The backstock report is used primarily by managers, while the workbook is used by all staff — making the queue a natural bridge

### Market Data
- Retail stores with organized backstock operations report 15-25% reduction in "out-of-stock" events on the sales floor (industry benchmarks)
- Task completion rates increase 30-40% when tasks are visible in a shared queue vs. verbally communicated (operations management research)
