1. Pull fulfilled order lines. Shopify orders that have shipped, NetSuite invoices, marketplace settlements, and any wholesale invoicing data. The flow ingests every source.
2. Standardize the order. Order ID, SKU, partner or rep code, ship date, gross revenue, net revenue, return status. One row per order line with a consistent shape.
3. Apply the fee schedule. Per partner, per SKU class, per channel. Tiered rates, flat rates, bonus thresholds. The schedule lives in a table, not a formula.
4. Calculate the payout. Per partner, per period. Net of returns, plus or minus any spiffs, with the right currency and tax treatment.
5. Handle clawbacks and adjustments. Returns that cross periods reverse the commission. Bonus accrual catches up when the threshold hits. Each adjustment is traceable.
6. Roll up by partner. Statement per partner with the order detail, the rate applied, and the payout total. Finance reviews the rollup; the partner reads the statement.
7. Output the package. Per-partner statement, period roll-up, JE-ready file for the commission expense and accrual, optional Slack alert when a partner crosses a bonus threshold.