Uploaded image for project: 'CFA MX '
  1. CFA MX
  2. CFAMX-8942

CLONE 2020R2 - InFORM Order Guide - Create VEI's for Exclude Rules

    Details

    • SCRUM Team:
      Brotherhood of Mutants
    • Source Code ID(s):

      Description

      As an above store user who administers that Order Guide I want Exclude Rules to be applied when a Vendor Entity Item (VEI) doesn't exist so that I can create all of my rules in one go

      Notes

      • Based on my understanding, of recent prod defects, the issue that we are seeing is due to the fact that when a restaurant is Excluded by a rule, and the VEI has never existed for that store, the exclude rule isn't actually applied to that VEI, instead the Entity is skipped.
      • It seems that our logic, with regards to Exclude rules is:
        • If the VEI exists, update it, and set the discontinue date (based on the rule)
        • If the VEI does not exist, skip the Entity
      • The logic needs to be changed to be:
        • If the VEI exists, update it, and set the discontinue date (based on the rule)
        • If the VEI does not exist, create the VEI, and set the discontinue date (based on the rule)
      • The team running the Order Guide are under the impression that when an exclude rule is created, the item should be available until the Start of the Exclude rule

      Use Case

      Scenario 1 - A store is moving from vendor A (MBM) to Vendor B (QCD) (As seen in Prod)

      1. A seasonal item that is supplied by both MBM and QCD is set to be Excluded thru spring, summer and fall, to be reintroduced in the Winter of 2020.
      2. For MBM, the include rule existed and was applied and later, the Exclude Rule was added. The QCD rules (Include & Exclude) were later added but since the store is not associated with QCD these rules didn't apply.
      3. The item will be discontinued after the store has transitioned from MBM to QCD
      4. The following rules are now in place before the vendor change occurs
        Rule Type Rule Filter Name Start Date End Date
        Zone Include Location-DistributorName MBM 3/17/18  
        Zone Exclude Location-DistributorName MBM 3/31/20 12/21/20
        Zone Include Location-DistributorName QCD 3/17/18  
        Zone Exclude Location-DistributorName QCD 3/31/20 12/21/20
      5. Before the vendor change happens, a VEI exists for vendor A (MBM), and it has a discontinue date of 3/31
      6. Problem: After the vendor change occurs, no VEI is created for vendor B (QCD), because an Exclude Rule exists
      7. However, the desired behavior is that VEI should be available for QCD from 3/17 until the discontinue date (3/31) is met, after which it will be discontinued/excluded for that entity until 12/21/20

      Scenario 2 - New spicy item to exclude (made up) - Restaurants are in both Include and Exclude zones

      1. New Super Spicy Chicken is to be sold in the Atlanta market, however, the ATL-Forsyth/Fulton Operator Team don't want to sell it for the first month, they want to see how other restaurants do.
        • Note: the ATL-Forsyth/Fulton Operator team stores are also in the Atlanta, GA zone
      2. To accommodate this, the following rules are set up:
        Rule Type Rule Filter Name Start Date End Date
        Zone Include Location-Market Name Atlanta, GA 3/17/20  
        Zone Exclude Location-Market Name ATL-Forsyth/Fulton 3/17/20 4/17/20
      3. When these rules are applied VEI's should be created for all entities that belong to these zones, the VEI's for those entities in the Exclude zone should have the Discontinue Date set to 3/17/20
      4. On 4/18/20, when they Reintroduce Discontinued items job runs, the VEI's for the stores in the Exclude zone should be updated so that there is no longer a discontinue date

      Scenario 3 - New item introduced (made up) - Restaurants are in either an Include zone OR an Exclude zone (but not both)

      1. Tofurkey Chicken filets will be introduced for MBM and QCD at the same time, with a vendor introduction date of 3/31
      2. QCD will only offer the item for one month, and then QCD will be excluded
        • Note: this is a hypothetical example, to try and capture all scenarios
        • To accommodate this, the following rules are set up:
          Rule Type Rule Filter Name Start Date End Date
          Zone Include Location-DistributorName MBM 3/31/20  
          Zone Exclude Location-DistributorName QCD 4/30/20  
      3. In this case when the rules are applied:
        • VEIs should be created for MBM stores, with an introduction date of 3/31, and no discontinue date
        • The desired behavior is the VEI should be created for QCD stores, with an introduction date of 3/31(The greater of today and the Vendor Item introduction date), and a discontinue date of 4/30

      Acceptance Criteria

      1. Confirm when a Restaurant Exclude Rule is applied, if the VEI does not exist for the Restaurant, the VEI is created, and the discontinue date is set to reflect that of the rule
      2. Confirm when a Zone Exclude Rule is applied, if the VEI does not exist for any Entities in the zone, the VEI is created, and the discontinue date is set to reflect that of the rule
      3. Confirm when a VEI is created by an Exclude rule, and that Exclude rule expires (based on an End Date for the rule), the VEI becomes active and is available on Store Order Guide
      4. Confirm that when a Vendor change occurs, and a future dated exclude rule is in place for a VEI, the VEI is created for the second vendor, and the VEI is active until the discontinue date

        Attachments

        1. OrderGuideHelper.sql
          3 kB
          Cherlyn Thomas
        2. OrderGuideHelper.sql
          4 kB
          Cherlyn Thomas

          Issue Links

            Activity

              People

              • Assignee:
                charles.wheeler Charles Wheeler
                Reporter:
                Cherlyn.Thomas Cherlyn Thomas
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

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