Affiliate commissions
“calculate affiliate commissions by affiliate and month from orders with their referral codes and commission rates”
Calculate affiliate commissions by affiliate and month from Shopify orders with their referral codes and Affiliate commission rates, using the order subtotal.
What the agent built
4 steps, each one an ordinary Mammoth step you can open and change.
- FileShopify ordersCSV export · 24 rows
- FileAffiliate commission ratesCSV export · 8 rows
- StepKeep paid ordersStep 2
- StepMake rate code keyStep 1
- JoinAdd affiliate rates23 of 23 paired
- StepTotal commissions by monthStep 4
- ResultAffiliate Commission Totals18 rows
- ScheduleRuns when you sayProposed
Checked on the sample files: every step ran, 18 rows came out, and the join paired 23 of 23 rows.
- Download Shopify orders sample (24 rows)Shopify admin: Orders > Export > All orders CSV
- Download Affiliate commission rates sample (8 rows)Internal spreadsheet: Commissions > Affiliate Rates
What you get back
The result of that run, the rows to look at first.
| Affiliate | Month | Commission | Order subtotal | Commission rate |
|---|---|---|---|---|
| Sunrise Studio | 2026-10-01 | 6 | 75 | 0.1 |
| Northstar Collective | 2026-10-01 | 17.16 | 132 | 0.1 |
| Harbor House Media | 2026-10-01 | 21 | 210 | 0.1 |
| Verve Loop | 2026-10-01 | 16.20 | 180 | 0.1 |
| Evergreen Audience | 2026-10-01 | 6.16 | 88 | 0.1 |
| Harbor House Media | 2026-11-01 | 24.40 | 244 | 0.1 |
| Sunrise Studio | 2026-11-01 | 22.16 | 277 | 0.1 |
| Ridge Path Creators | 2026-11-01 | 49.20 | 410 | 0.1 |
| Evergreen Audience | 2026-11-01 | 12.74 | 182 | 0.1 |
| Coastline Partners | 2026-11-01 | 34.10 | 310 | 0.1 |
| Sunrise Studio | 2026-09-01 | 9.60 | 120 | 0.1 |
| Harbor House Media | 2026-09-01 | 8.40 | 84 | 0.1 |
How do you calculate affiliate commissions by affiliate and month?
Export your Shopify orders and your affiliate commission rates, then load both files into the workflow. It matches each order to a rate using the referral code, keeps paid orders, and calculates commission from the order subtotal. Then it groups the results by affiliate and month.
How it works
How to use the Affiliate Commission Totals workflow
- 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and checked on the sample files.
- 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
- 3Change it in words, then turn it onSay what to change and see the new result before anything saves. Then choose when it runs.
Affiliate Commission Totals: questions
What export should you use from Shopify?
What happens to rows that do not match a rate?
How do you change the rules?
Get early access to this workflow
It will open already built and checked on the sample files. Swap in your own exports and see your result.
Workflows like this
Decide which pages to keep, update or prune, and find the search terms that spend without converting.
- ROAS by campaignCalculate ROAS by campaign from Google Ads and Shopify exports, matched by week and utm campaign.See the workflow Built by the agent
- Content auditEvery page's clicks now and before, and a keep, update or prune callSee the workflow Template
- Google Ads wasted spendFind search terms with spend and no conversions in the last 30 days, ranked by spend, from a Google Ads export.See the workflow Built by the agent
- Keyword rankings changeCompare this month's average position with last month from Search Console and see which keywords moved up or down in a keyword ranking report.See the workflow Built by the agent
- Negative keyword finderEvery search term that spent money and never converted, with its share of spendSee the workflow Template
- Marketing ROI by campaignCalculate marketing ROI for each campaign from HubSpot exports, using won deal revenue and campaign spend.See the workflow Built by the agent