NetSuite Inventory → 5-Channel Video Ads → B2B Checkout → Gross Margin in the Ledger
Every SKU photo, Available-to-Promise (ATP) lot balance and wholesale price tier in NetSuite is syndicated to five ad networks, rendered into motion video ads, converted through a B2B checkout that posts the NetSuite transaction, and reconciled back to realized gross margin. Everything on this page is a scripted simulation with synthetic SIM- identifiers: the figures are arithmetic on the sliders, not client data.
Before any campaign goes live, the bundle snapshots the trailing 90 days of NetSuite sales by SKU, subsidiary and customer cohort into customrecord_do_dm_campaign_ledger (the Day-0 baseline). After launch, every click-attributed transaction is measured against it net of landed cost. The sliders below reproduce that arithmetic on figures you choose; the defaults are modeled placeholders, not results.
- 1. Day-0 baseline snapshot: stored in
customrecord_do_dm_campaign_ledgerbefore the first ad impression. - 2. Click-ID persistence on transactions:
GCLID,FBCLID,TTCLIDand the creative asset ID are written to the NetSuiteEstimate,SalesOrder,CashSaleandInvoice. - 3. Landed COGS deduction:
transactionaccountinglineis joined so the return is measured on realized gross margin dollars, not on platform-reported pixels.
Spend is split across the channels in an illustrative proportion and the incremental gross profit follows the same split. In a live account each row is the sum of the transactions that carry that channel's click token.
| Channel | Ad spend | Incremental revenue | Gross profit added | GP per ad dollar |
|---|
| NetSuite Tran ID | Channel & Format | Captured Click Token | SKU & FIFO Lot Assigned | Ad Spend | B2B Order Total | Landed COGS (GL) | Realized Gross Profit |
|---|---|---|---|---|---|---|---|
| SIM-SO-51042 → SIM-INV-88310 | Google Ads PMax + Search RSA | SIM-GCLID-9941A | IND-VALVE-4402 (LOT-2026-04A) | $410 | $18,400 | $10,304 | +$8,096 (44.0% GM) |
| SIM-CS-19402 (Instant Card) | Instagram Reels (9:16 Video) | SIM-FBCLID-7720B | PACK-FILM-ROLL-19 (LOT-2026-02C) | $285 | $12,600 | $7,434 | +$5,166 (41.0% GM) |
| SIM-SO-51089 (Net-30 PO) | TikTok B2B Video Feed (9:16) | SIM-TTCLID-4418C | COLD-COMPRESS-880 (LOT-2026-01B) | $340 | $24,500 | $13,965 | +$10,535 (43.0% GM) |
| SIM-SO-51114 → SIM-INV-88394 | YouTube In-Stream (16:9 Video) | SIM-GCLID-8812YT | HYD-PUMP-3100 (LOT-2026-05D) | $520 | $31,200 | $17,472 | +$13,728 (44.0% GM) |
| SIM-SO-51138 (ACH Instant) | Facebook Dynamic Catalog (1:1) | SIM-FBCLID-6104F | SS-FLANGE-900 (LOT-2026-03E) | $195 | $9,850 | $5,713 | +$4,137 (42.0% GM) |
Every 15 minutes, and on Item Fulfillment and Item Receipt events, the Map/Reduce engine compares NetSuite quantityavailable with each SKU's safety-stock floor. When a pick takes ATP below the floor, the SKU's ad groups across Google, Facebook, Instagram, TikTok and YouTube are paused on that cycle and reactivated when stock returns. The table is a scripted simulation; deplete or restock a row to watch the rule fire.
| NetSuite SKU / Item ID | FIFO Lot & Age | NetSuite ATP (SIM) | Safety Floor | B2B Case / Pallet Price | 5-Channel Ad Status | Action / Override |
|---|
An ad account that reads a stale export keeps buying clicks to SKUs that have already stocked out. The governor pauses a SKU's ad groups on the next cycle after ATP < custrecord_do_dm_min_atp_floor; the figure above is the monthly ad budget assigned to the simulated SKUs currently paused, arithmetic on the table.
When an inventorynumber lot has been on the shelf for more than 90 days, the feed rule switches that SKU to the pallet-clearance video variant and raises its share of the budget toward wholesale buyers. The figure above is the simulated on-hand value (ATP × unit price) of the rows in the boost variant.
FileCabinet/ItemImages/IND-VALVE-4402.jpg
When a B2B buyer clicks a Google, Facebook, Instagram, TikTok or YouTube ad, they land on a B2B micro-checkout that posts to NetSuite through do_rl_b2b_instant_purchase.js. Configure an order below to inspect the payload the RESTlet would receive and the record it would create. Nothing here calls a NetSuite account: the response is scripted.