Once a Partner Unsold Inventory (PUI) is stamped with the eligibility condition, the next step is to run the Stock Rotation and Execution Item Processing DPE. This DPE is responsible for creating the stock rotation and the corresponding invoices to show to the partner.
Required Editions
| Available in: Enterprise, Unlimited, and Developer Editions that have Stock Rotation enabled |
Here are the high-level steps in the template.
- Create SRE for a Rebate Program as soon as it starts.
- Separate SREs will be created for all the Members of a Rebate Program.
- Budget Allocation is optional for for SRE creation.
- Eligible Amount on SRE is calculated from Budget Allocation. There could be multiple budget allocations defined per member and we stamp the aggregated value of Amount on SRE. In case of multiple Budget Allocation records for a member we will aggregate the Allocated Amount for all the records and stamp the aggregated amount on SRE.
- We are always updating budget for SRE which is not in Completed status (New and Inprogress)
- If SRE and SREI are being created in the same run of DPE then SRE will have status as "In Progress".
- If only SRE is created during dpe execution then it will be created in "New" Status, else it's status will be updated later when a line item for it is created
- Execution Reference Number on SRE is computed as concat of AccountId, RebateProgramId, Usage Type.
- To mark SRE as Closed For Submission, we must ensure that the Rebate Program end date + grace days has reached.
- To mark SRE as Complete, we must ensure that the Rebate Program end date + grace days has reached and all the submitted line items are either Complete or Rejected. We do not consider SRE status value “Error” here because error means some action is pending on the line item.
- For SREI creation, a PUI must be stamped with Rebate Type.
- A PUI is picked only when the Rebate Program associated with it starts till end date +grace days.
- If an existing SREI exists for PUI and Rebate Type then we will not create a new one.
- For existing SREs with new line items, status will be updated to In Progress
- Program Rebate Type Eligibility Record is a must for SREI creation as in the first dpe we compare price type from eligible quantity. So, if a PUI is eligible it means it has an eligibility record.
- If we have an existing line item in a new state and there is some change in Unit Price, Price Type, Product Id, our SREI will reflect that change.
- Eligible Quantity will be calculated in dpe for each SREI and also updated in each run for existing line items in "new" state. Eligible Quantity is calculated by applying Supported Quantity Percentage on Remaining Quantity from PUI.
- For price change warning we will not consider New, Rejected and Complete status SREI. A SREI will be flagged with price change warning if the PUI associated with SREI has a child PUI with a different price.
- Price change warnings will not be cleared through DPE. To clear price change warnings and generate a claim, users will have to manually edit the “Has Warning” flag on SREI and then generate a claim before the next run of DPE. If the claim is not generated before the next DPE run, DPE will again stamp the price change warning on SREI.
- For reconciliation warning we will not consider Completed and Rejected SREI
- Reconciliation warning is stamped if the reconciliation record corresponding to the PUI stamped on SREI is “In Progress”.
- Reconciliation warning is cleared through DPE if the reconciliation record corresponding to the PUI stamped on SREI moves to “Closed” status.
- If there are no eligible PUIs for an SRE, it will be marked as Completed after end date + grace days.
- If there is a change in eligibility on PUI we delete the corresponding line item if it is in “New” state and a new line item is created for the new rebate type
- If a SRE is manually created first for a Rebate Program and Account with execution reference number pattern different from DPE (AccountId+RebateProgramId+Usage Type) , DPE will create a new SRE and all the line items will be attached to the new SRE.
- If a SRE is manually created first for a Rebate Program and Account with execution reference number pattern same as in the DPE (AccountId+RebateProgramId+Usage Type) , the DPE will not create a new SRE but reuse the manually created one because it is not possible to create a new SRE with the same execution reference number.
- If DPE first creates a SRE for a Rebate Program and Account then it won’t be possible to manually create the same SRE with the same execution reference number. A SRE with some other reference number can be created for the same account and rebate program, in this case our DPE will not touch the manually created SREs and all the line items will only be attached to the SRE created through DPE.