Generate a blank NetSuite upload template pre-filled with account codes and program mappings
Creates a blank upload template (XLSX or CSV) pre-populated with valid account codes, account names, and program mappings from ReturnPro's dimension tables. This saves time when preparing NetSuite data for staging upload — instead of manually looking up codes, Carlos gets a ready-to-fill template with all valid FK references.
xlsx (default) or csv.~/Downloads/returnpro-data/netsuite-template-{YYYY-MM}.{ext}lib/returnpro/templates.ts::generateNetsuiteTemplate(month, options?) to build the templatedim_accountdim_master_program (program_id, program_name)--programs filter given, only include matching programslib/board/index.ts::logActivity()Generated NetSuite template for 2026-01
Accounts: 193 | Programs: 97
Saved to: ~/Downloads/returnpro-data/netsuite-template-2026-01.xlsx
# Default XLSX template
optimal generate-netsuite-template --month 2026-01
# CSV format, custom output path
optimal generate-netsuite-template --month 2026-01 --format csv --output ./template.csv
# Only BRTON programs
optimal generate-netsuite-template --month 2026-01 --programs BRTON
Requires: RETURNPRO_SUPABASE_URL, RETURNPRO_SUPABASE_SERVICE_KEY
dim_account — read account codes and namesdim_master_program — read program IDs and namesImplementation status: Not yet implemented. Spec only. Lib function lib/returnpro/templates.ts to be extracted from dashboard-returnpro's /api/admin/netsuite-template route.