Connection
Enter the Worker URL and app key and click Save. Then click Sign in with Google once per browser: reports you import are created as Google Sheets owned by the person signed in. Only @vivarawpets.com accounts can sign in. Sign out forgets it on this browser.
SFUGC Sync
Superfiliate has no API for UGC/Media data, so getting a month's posts into the sheet always starts with a live Claude scrape, not a button in this app — this app is deployed on Cloudflare only, with no GitHub repo, so there's nothing to browse for instructions except this page. Whoever does this needs three things: a Claude session that can drive a browser, login access to Superfiliate's admin (viva-raw.admin.superfiliate.com), and this app's app key (only when Claude asks for it — never hand it over up front).
A short phrase like "sync SFUGC for July 2026" only works if you're in a Claude Code session that already has this project's .claude/skills folder loaded — that's the only way a Claude client discovers what "SFUGC" even means. claude.ai, or Claude Code opened anywhere else, has zero context for it and will just ask you what you're talking about. That's exactly why get staged batch exists: it copies the entire self-contained procedure to your clipboard instead — Superfiliate navigation, the exact 9 Programs to filter to, the field mapping rules (TikTok is always "Short"; Instagram's Reel/Post/Story comes straight off Superfiliate's own Content Type column, not guessed from whether there's a link), and the exact POST /stage call — so it works in any Claude client, no project setup required. The app key is deliberately left out of the copied text (so it never sits in a chat transcript); Claude will ask you for it partway through, and you paste that in separately.
- get staged batch — flags the month in the Worker and copies the full sync prompt to your clipboard (or shows it in a popup to copy manually, if the browser blocks the automatic copy). A webpage can't type into Claude directly for you (a browser security boundary, not a limitation of this app), so paste is as close to one-click as this gets — open your Claude session and paste.
- Load staged batch — once Claude has staged a month, pulls it up here for you to review. Staged batches stick around even after you push, so you can reopen and review what was actually pushed for a month later — the green "Pushed ..." status above always reflects the real push record regardless.
- In the review table: uncheck a row to exclude it, edit any cell inline, or remove a row entirely with the ✕. Collapse/Expand hides the table without losing your edits.
- Push to Sheet — appends the checked rows to the SFUGC tab, skipping anything already there.
- UGC Stats — pick a month and click Check UGC Stats to see TikTok Short / IG Reel / IG Story counts, the top posters by volume (with links to their posts), and the top-ranking posts by engagement. Only counts rows already pushed to the sheet — link and engagement are both required fields in the scrape (not optional) precisely because this panel depends on them; only a Story is allowed to skip Link (Superfiliate gives it none) and Engagement (no view/like count ever shown for one).
SF Reporting
Builds the mid-month/end-of-month Superfiliate earnings report and, for End-of-Month, tracks and sends each affiliate's bonus to their Superfiliate wallet.
- Report Type / Month / SF Export (CSV) — pick Mid-Month or End-of-Month, the month, and upload your Superfiliate export. This same Report Type/Month also drives Fetch from Shopify and the Additions auto-pull below — one picker for the whole tab. The report processes every row in the CSV as-is — it doesn't filter by date, so whatever date range you actually exported is what gets used.
- Fetch from Shopify — pulls repeat-discount orders directly from Shopify for the Report Type/Month above and appends new ones to the Shopify Prelim tab (never duplicates). If a generic checkout code was used, upload the SF export above first so it can still credit the right affiliate. Also auto-adds a Deductions row (below) for any affiliate matched in that period who doesn't already have one, and pulls Additions from the Add tab (see below) — always review before generating a preview.
- Fetch all SF — refreshes the All SF tab from a live Superfiliate export of all enrolled affiliates; ignores Report Type/Month entirely (it's a lifetime refresh, not scoped to a period) — shows when it was last run.
- Deductions / Additions — add rows for repeat-discount offenses or missed-code referrals. Deductions can also get auto-filled by Fetch from Shopify, above; Additions auto-fills on its own from the "Add" tab of the Repeat Discount sheet whenever you pick a Month/Report Type, for whatever's logged there and not yet marked done for that report type — Mid-Month is strictly that month's 1st–15th, End-of-Month has no lower bound so it also sweeps up anything logged late in an earlier month, and the two track independently (a row done for Mid-Month still shows up for EOM). Fetch from Shopify also pulls Additions from the Add tab; rows you removed come back when you click it. Rows already used by a report stay available for that same report. Either way, review before generating — auto-filled rows can still be edited or removed, and a removed one stays gone until you click Fetch from Shopify again or reload the page. Save (next to Generate Preview) persists both lists for this month/type immediately. Additions and bonuses: an affiliate with no orders this period is looked up in All SF when you click Generate Preview. Their referrals always count, but affiliates in Viva Creators, Viva Vet Program or Team Viva never earn a bonus (it shows $0 and they are not listed for wallet credits); everyone else follows the normal ladder. An Addition that isn't in All SF can't be checked, so it is treated as eligible and a red note under the buttons lists it: check those by hand. Manual Additions in the sheet: the block shows Partner, Total Referral, SUM of Conversion (the sum of the Add tab's Order Total for that person's rows; $0.00 for an Addition typed by hand with no Add-tab rows) and Bonus Awarded. The Add tab is read by its header names (Order date, SF Email, Count, Order Number, Order Total, Added to wallet?, Added to Mid Month?, Added to EOM?), so inserting or moving columns is fine, but renaming one of those headers is not: the app then says "Couldn't pull Additions" in red under the buttons until the header is fixed. In the Generate CSV file, referral_rev for those affiliates is their Order Total sum.
- Who saved last, and the yellow "saved this report" bar — under the pickers a grey line says who last saved this month's report and when (Saved report · last saved by <email> · time; "unknown (older save)" means it was saved before names were recorded). Below it, Sheets for this report lists every Google Sheet made for this month and type by anyone, newest first, as title · made by <email> · owner <email> · time · Open. The newest one is tagged latest; a sheet that a later import overwrote is greyed out and tagged replaced. Sheets made by the other person are shared with you automatically, so you can open each other's reports from here. The heading also has an Open EOM folder (or Open Mid Month folder) link to the shared Drive folder that holds all of them. Older sheets show unknown (older import) for who made them, and a sheet only opens if it was shared with you (sheets made before sharing was set up may need their owner to share them). Only the 8 newest are listed, with +N older for the rest. Andy and Nana both use the app, so saving never silently replaces the other person's work: if someone else saved this report after you opened it, a yellow bar names them and nothing is saved (automatic saves stop too, and the Save button tells you to resolve it first). Load their version asks first, then discards your unsaved edits and reloads what they saved. Overwrite with mine replaces their version with what is on your screen. Until you pick one, closing the tab or switching month warns that your edits couldn't be saved.
- Generate Preview — builds the report table and Bonus Cheat Sheet exactly as they'll appear in the sheet. Ctrl/Cmd + scroll to zoom the preview. Without an uploaded CSV, this refuses to run (there's nothing to build from). It also checks two easy-to-forget prep steps for the selected Report Type/Month — has All SF been refreshed since this period started, and has Fetch from Shopify been run at least once for this exact month/type — and if either is missing, shows exactly what's wrong and how to fix it, with the option to proceed anyway (e.g. a period that genuinely has nothing to fetch). Import to a Sheet re-checks the same two things right before creating the real sheet, in case time passed since Preview. The preview has two tabs: Report, and Wallet credits (End-of-Month only) listing who earns a bonus. All the action buttons (Generate Preview, Save, fraud code CSV, Import to a Sheet, Generate CSV, Add wallet credits) sit together in one bar under the preview.
- fraud code CSV — End-of-Month only. Rebuilds the "Fraud Code Usage Template" tab in the Repeat Discount - Shopify Flow sheet from this month's Shopify Prelim data (Order Date, Affiliate Email, Customer Email, Order #, Order Amount, Amount Deducted from Wallet), and downloads the same rows as a CSV for Nana.
- Import to a Sheet — creates the actual Google Sheet from the preview (it stays disabled until a preview exists). You must be signed in with Google first: the sheet is created owned by the signed-in person, and when the hand-over worked the result shows "owned by <email>". It is also shared with the team list (Andy and Nana) automatically, so you don't need to share it by hand. Import to a Sheet saves the new sheet into the shared SF Reporting folders (Mid Month or EOM) that you and Nana can both open; ownership still goes to the person who imported. The result says "saved in the EOM folder" (or Mid Month) only when the Worker confirmed the sheet really is in that folder; if the folder step failed, nothing is claimed about the folder, the sheet is still created (in the Drive root) and a yellow warning says why. Sheets are shared with the team list automatically even though they sit in the shared folder. One-time "Reconnect Google": if a yellow note next to "Connected to Google" at the top says Google needs one more approval, click its Reconnect Google link once, approve full Drive access in the new tab, and come back; the note disappears by itself when you return to this tab. The Reconnect link is only for Andy: it needs the app key saved above and is only needed when Andy's Google connection changes, so everyone else can ignore it. If a sheet for this month and type already exists, the overwrite question says who imported it and when (and leaves the time out if Drive wouldn't say). On overwrite, a sheet owned by a person is renamed "<name> (replaced <date>)" and stays in the shared folder (its owner can delete it if it isn't needed), while a sheet owned by the app account moves to the Drive trash. If the hand-over fails, the result shows "owner: <email>" (the real owner, not you), a yellow warning says so, and the sheet is shared with them as editor instead. Before anything is created, Import can ask two questions. (1) Some Additions have more referrals in the Add tab than in your list: Import marks all of a person's Add-tab rows as used, so the extra referrals would never be counted. Cancel, fix the counts (remove the row and click Fetch from Shopify to pull the current count, or edit the number) and import again. (2) Additions couldn't be checked against All SF (or the All SF lookup failed): a Creators, Vet or Team Viva affiliate among them would be given a bonus they shouldn't get. Cancel and check them first. Neither question appears when everything lines up. Keep the Add tab still: click Fetch from Shopify right before Import and don't edit or sort the Add tab while a report is open. The app remembers where each pulled row was; if one has moved or changed since, it is skipped (not marked used) and a yellow warning next to the result says which. The same goes for a Count: if someone edits a Count in the Add tab between Fetch from Shopify and Import, the app skips that row and tells you. For End-of-Month it also saves the wallet-credit list, and every Bonus Awarded cell above $0 is yellow until that person's wallet has been credited, then green (in the sheet and in the preview here). Generate CSV unlocks afterward, for a plain CSV copy of the same import. It includes manual additions too (affiliates logged in Additions who have no conversions in the export): their program is looked up from All SF, and a note next to the buttons says how many were included and whether any program was missing.
- Wallet credits tab + Add wallet credits — End-of-Month only. The tab lists everyone with a bonus (SF email, referrals, amount) and a Done / Not done status that everyone using the app sees, including when you reopen an old month. Add wallet credits (the dark button) only appears once that month's sheet exists in Drive — never on a preview alone, and never for Mid-Month. Tick or untick people in the tab first to credit only some (e.g. just one test person). Clicking it reads the sheet this month was last imported to, finds each person's Superfiliate account, and opens a confirmation that shows who will be credited, the total, who is blocked and who still needs an override tick. Type the total it asks for (for example CREDIT $15) to unlock Send credits; a total over $5,000 also needs an extra tick. People are then credited one at a time. Only the people counted under "will be credited" are sent. Blocked people (email not found in Superfiliate, two accounts for one email, the same email twice in the sheet, a bonus cell that can't be read) and people who are missing a needed override tick are not sent: they are listed in the Credit log as "NOT sent … credit by hand" so you know whom to credit manually. An amount that isn't the bonus for that person's referral count, and a Superfiliate account that isn't enrolled in any program, each need their own override tick. Bonuses over $99.99 are split into several credits because Superfiliate caps each one at $99.99. Superfiliate refuses repeats, so nobody can be paid twice when the app does the crediting (it cannot know about credits you give by hand). A month that was credited by hand before wallet tracking existed is locked: the button is hidden and nothing for it can be sent from the app. As each person is credited their cell turns from yellow to green in the sheet and their status turns to Done here.
- If a credit run stops — it stops if the Superfiliate permission is missing, Superfiliate is down, the sheet changed after the list was read, or the server doesn't answer. Whoever wasn't reached stays Not done, and it is safe to run Add wallet credits again: anyone the app already paid is refused as a repeat. If the server didn't answer, that one person may or may not have been credited — running it again settles it, so do not credit that person by hand before re-running. If it says a run is already in progress, wait about 2 minutes and try again.
- Status pills + Copy to-do list — click a Done / Not done pill to flip it by hand. It asks first, and it only changes the tracker and the color in the sheet; nothing is sent to Superfiliate (use it for someone you credited by hand). Copy to-do list (above the Credit log) copies everyone still Not done with the amount still owed, and for anyone partly credited how much was already sent. Run Add wallet credits again before crediting anyone by hand.
- Closing the tab — while anything is running (a fetch, an import, a push, a wallet-credit run, a Team Viva screening) a banner at the top says exactly what would be left half-done if you close the tab, and your browser will ask you to confirm before it closes. Browsers don't allow custom wording or buttons in that confirmation, so read the banner first. Month / Report Type / CSV are locked while a process that depends on them runs (Fetch from Shopify, Import to a Sheet, reading the sheet or sending wallet credits, changing a status by hand, fraud code CSV). If an automatic save of your CSV, deductions or additions fails, an Unsaved changes banner appears until you click Save and it says Saved.
- Switching Month or Report Type — loads that month's saved report if there is one. If none has been made, the form is blank with a "No report has been made for … yet" note; nothing carries over from the previous month, and just looking at a month never saves anything. If loading fails you get a Try again button, and saving stays off for that month until it loads (so a blank form can't overwrite a real saved report).
TVR Filter
Screening tool: finds Team Viva Referral Program signups over a date range and flags any whose name/email hints they might actually belong to a different partner category (vet, breeder, trainer, influencer, pet industry, or just a non-generic domain).
- 1 Month / 3 Months / 6 Months — fills From/To with a rolling window ending today. Edit From/To by hand for a custom range; that clears the preset highlight.
- Fetch Team Viva — pulls signups in that range and screens them. This is a preliminary AI-based screen, not a definitive classification — always double-check before acting on a flag.
- Results open in a popup with Download CSV at the bottom for the flagged list only.