US-014Auto-generate claims from invoiced promotions
As a distributor finance user, I want claims to be generated automatically from invoices that applied an active promotion, so that I don't compile claims by hand and I get paid faster.
Acceptance criteria- Given an invoice applied an active promotion, when the claim period closes, then a claim line is created with the promotion ID, outlet, quantity and value.
- Given a line breaks a business rule, when validation runs, then it is flagged as an exception with the rule shown.
- Given an invoice is cancelled or goods are returned, when claims are generated, then the related claim value is reversed.
US-015Review only the exceptions
As a sales operations reviewer, I want to see only the claim lines that break a rule, with the reason, so that I can approve or reject them quickly.
Acceptance criteria- Given a claim has exceptions, when I open it, then I see only the flagged lines and the rule each one broke.
- Given I reject a line, when I save, then I must add a comment and the distributor is notified.
- Given a claim has no exceptions, when validation finishes, then it goes for approval without appearing in my queue.
US-016Create the credit note automatically
As a brand finance user, I want approved claims to create a credit note in the ERP automatically, so that distributors are reimbursed without re-keying.
Acceptance criteria- Given a claim is approved, when it is sent to the ERP, then a credit note is created that references the claim ID.
- Given the ERP rejects the credit note, when the error returns, then the claim is marked "Pending ERP" and the error is logged.
- Given the credit note is created, when I open the claim, then I see the credit note number and date.