Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Ordering
    • Labels:
      None
    • Sprint:
      2021.R3 New Features Sprint 1
    • SCRUM Team:
      Globogym Purple Cobras
    • Story Points:
      5
    • Work Type Classification:
      Sustaining

      Description

      Story

      As a user, I would like the minimum and maximum recommend values to be automatically calculated based on the average of my previous orders

      Details

      CFA has asked InFORM to calculate the Min/Max recommended order values based on historical data. We will do this by using the average of several previous orders and adding or subtraction a few standard deviations to allow for the outlying highs and lows. This will allow us to keep a running calculation at an item level of the recommended minimums and maximums.

      We also need to create a configuration for this calculation so that we can enable and disable this functionality at the store level.

      In separate story, we will create a UI that allows the user to update the variables of this calculation but, for now, we will follow the formula below.

      We want to look back at the last 10 orders where the min/max for an item has an ordered value over zero to create the average. For example, if in the last 10 orders there are 3 orders where the item was not ordered, we need to look back in the order history until we find 10 orders with an ordered value.

      If we do not have 10 total orders with an ordered value, we should not populate the calculation. In other words, the minimum numbers of orders with an on order value has to be 10. This should keep the min/max validation from triggering until we have all the data we need.

      We should build the backend ability to be able to enable and disable this min/max feature at the item level. UI to come later.

      This calculation needs to be updated regularly. Ideally, daily just to make sure we have the most current data. However this is updated, we have to be very aware of performance. We need to load test this update to make sure we don't break any queues.

      Initial Data Population

      It is understood that once we turn this feature on, the user will have to order an item and have ordered the item 10 or more times before the min/max populates the order UI.

      Formulas

      Minimum = Average of the past 10 ordered values (excluding zero) minus 2 Standard Deviations of those same 10 orders.
      Maximum = Average of the past 10 ordered values (excluding zero) plus 2 Standard Deviations of the same 10 orders.

      AC

      Confirm

      1. The minimum and maximum recommended order values are automatically calculated based on the formulas above.
      2. The item Min/Max is populated by the calculation when we have 10 or more data points to reference.
        1. Zeros are excluded from the average.
        2. When zeros exists in the previous 10 orders for an item, the calculation reaches back to find 10 orders with ordered values over zero.
      3. The calculated values populate the min/max fields so that min/max order validation functionality works correctly.

        Attachments

        1. check current vendor entity Items.sql
          0.3 kB
          Colin Wyatt-Goodall
        2. check expected min max values on order.sql
          2 kB
          Colin Wyatt-Goodall

          Issue Links

            Activity

              People

              • Assignee:
                jason.powell Jason Powell
                Reporter:
                jason.powell Jason Powell
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 52h
                  52h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 45.75h Time Not Required
                  45.75h

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.