NetSuite Workflows
Brand System v10.0 — NetSuite Automation
NetSuite
Workflows &
Automation
Workflows &
Automation
Approval chains, lifecycle states, scheduled jobs, and email alerts.
Complete workflow and automation reference for Global Food Solutions NetSuite implementation. Covers approval routing, status transitions, scheduled scripts, and notification templates built for food distribution at scale.
Approvals
Lifecycles
Schedules
Alerts
Best Practices
02
Approval Workflows
Purchase Order Approval
Threshold-Based
Approval Thresholds
| Amount Range | Approver | SLA | Escalation |
|---|---|---|---|
| < $5,000 | Auto-Approved | Immediate | N/A |
| $5,000 – $24,999 | Department Manager | 24 hours | VP after 24h |
| $25,000 – $49,999 | VP of Operations | 48 hours | CFO after 48h |
| ≥ $50,000 | CFO (Michael Levine) | 72 hours | CEO after 72h |
Conditions
Triggered on
purchaseorder record save when status = Pending Approval. Amount evaluated from total field. Multi-subsidiary: route to subsidiary-specific approver first.
Actions
Set approver field. Send email notification. Create approval task. Log audit trail entry. On approval: set status to Approved, trigger PO creation. On reject: set status to Rejected, notify requester.
Script Reference
Workflow:
Script:
Deployment:
customworkflow_gfs_po_approvalScript:
customscript_gfs_po_approve_ueDeployment:
customdeploy_gfs_po_approve
Sales Order Credit Check
Auto + Manual
Conditions
Customer
creditlimit vs. balance + new order total. Auto-pass if balance + order ≤ 80% of limit. Hold if exceeded or customer has past-due invoices > 30 days.Actions
On pass: auto-approve, set SO status to Pending Fulfillment. On fail: set Credit Hold, email AR manager, create task for review. Manager can override or reject.
Script Reference
Workflow:
Script:
Deployment:
customworkflow_gfs_so_creditScript:
customscript_gfs_credit_check_ueDeployment:
customdeploy_gfs_credit_check
Journal Entry Approval
Sequential
Conditions
Sequential approval: all JEs require at least one review. JEs over
$10,000 require Controller. JEs over $50,000 require CFO sign-off. Intercompany JEs always route to CFO.Actions
Lock record during review. Email next approver. Post on final approval. Rejected JEs return to draft with comments. Audit log captures all approver actions and timestamps.
Script Reference
Workflow:
Script:
Deployment:
customworkflow_gfs_je_approvalScript:
customscript_gfs_je_approve_wfaDeployment:
customdeploy_gfs_je_approve
Vendor Bill 3-Way Match Approval
3-Way Match
Conditions
Compare bill lines against PO lines and item receipt quantities. Tolerance: ≤ 2% price variance, ≤ 5% quantity variance. Exceeding either threshold routes to AP Manager for review.
Actions
On match: auto-approve bill, schedule for next payment run. On variance: flag line items with discrepancies, create AP task, email vendor if quantity short. Manager can approve, adjust, or reject.
Script Reference
Workflow:
Script:
Deployment:
customworkflow_gfs_vb_3wayScript:
customscript_gfs_3way_match_ueDeployment:
customdeploy_gfs_vb_match
RMA Authorization
Multi-Step
Conditions
Customer submits return request. QA must review photos, temperature logs, and reason code. Food safety issues (allergen, contamination) get priority routing. Returns > $5,000 require manager authorization.
Actions
Generate RMA number. Email customer with shipping label. On receipt: inspect product, update disposition (restock, destroy, vendor return). Issue credit memo or replacement SO. Log lot/batch for traceability.
Script Reference
Workflow:
Script:
Deployment:
customworkflow_gfs_rmaScript:
customscript_gfs_rma_auth_ueDeployment:
customdeploy_gfs_rma_auth
■ All approval workflows include audit trail logging, email notifications, and escalation timers. Thresholds configurable via GFS Config custom record.
03
Status Transition Workflows
Order Lifecycle
8 States
Key Transitions
Draft → Pending on submit. Pending → Approved after credit check. Processing → Shipped on item fulfillment. Delivered triggers invoice generation. Closed after full payment.
Backward Transitions
Approved → Draft (cancel). Processing → Pending (hold). Shipped → Processing (return to warehouse). All backward transitions require manager approval and audit log entry.
Automation Hooks
Each transition fires User Event scripts for validation, notification, and related record creation. Temperature monitoring active during Shipped and Delivered states for cold chain compliance.
Purchase Order Lifecycle
7 States
Work Order Lifecycle
6 States
Case Lifecycle
7 States
■ All lifecycle workflows enforce state-valid transitions. Invalid transitions are blocked at the User Event before-submit level with user-friendly error messages.
04
Scheduled Automations
Daily Automations
Daily 6:00 AM ET
Inventory Snapshot
Captures on-hand, committed, available, and in-transit quantities for all active items across Edgewood and Hermitage warehouses. Writes to custom inventory history record for trend analysis.
Daily 7:00 AM ET
Temperature Compliance Report
Pulls IoT sensor data for all cold storage units, flags any excursions outside 33-41F range. Generates compliance report and alerts QA team if violations detected in the last 24 hours.
Daily 8:00 AM ET
Delivery ETA Updates
Queries carrier APIs (FedEx, USPS, LTL partners) for all in-transit shipments. Updates delivery date estimates on sales orders and sends proactive notifications for delays exceeding 24 hours.
Weekly Automations
Monday 6:00 AM ET
Vendor Scorecard Calculation
Calculates on-time delivery rate, fill rate, quality score, and price competitiveness for all active vendors. Updates vendor custom records and flags vendors falling below 85% composite score.
Tuesday 7:00 AM ET
Customer Health Check
Analyzes order frequency, average order value, payment timeliness, and case volume per customer. Assigns health score (Green/Yellow/Red) and alerts sales reps to at-risk accounts.
Friday 6:00 AM ET
AR Aging Email
Generates AR aging summary grouped by 0-30, 31-60, 61-90, 90+ day buckets. Emails finance team with past-due totals and top 10 delinquent accounts requiring collection attention.
Monthly Automations
1st of Month 2:00 AM ET
Rebate Calculation
Processes all rebate-eligible transactions for the prior month. Calculates volume-based rebate tiers, generates credit memos or vendor debit memos, and updates rebate accrual journal entries.
1st of Month 4:00 AM ET
Financial Close Tasks
Creates checklist of month-end close tasks: bank reconciliation, accrual JEs, intercompany eliminations, inventory valuation, revenue recognition. Assigns to finance team members with due dates.
15th of Month 6:00 AM ET
Compliance Cert Check
Scans all vendor and facility certifications (USDA, FDA, SQF, organic, kosher) for upcoming expirations within 30/60/90 days. Sends renewal reminders and flags non-compliant vendors.
■ All scheduled scripts include governance monitoring, checkpoint/resume for long-running jobs, and failure notification emails to the GFS IT team.
05
Email Alerts
Order Confirmation
Trigger
Sales Order saved with status = Pending Fulfillment
Template
gfs_order_confirm_v2Recipients
Customer primary contact, Sales rep (CC), Order entry team (BCC)
Content
Order number, line items, estimated delivery, GFS-branded header with tracking link
Shipment Notification
Trigger
Item Fulfillment record created with tracking number populated
Template
gfs_shipment_notify_v2Recipients
Customer shipping contact, Sales rep (CC)
Content
Tracking number with carrier link, shipped items, estimated arrival, temperature monitoring status
Invoice Delivery
Trigger
Invoice created from Sales Order (after submit)
Template
gfs_invoice_email_v2Recipients
Customer billing contact, Customer AP email (if set)
Content
Invoice PDF attachment, amount due, payment terms, remittance instructions, online payment link
Payment Receipt
Trigger
Customer Payment applied to invoice(s)
Template
gfs_payment_receipt_v2Recipients
Customer billing contact
Content
Payment amount, method, invoices applied, remaining balance, thank-you message
Past Due Reminder
Trigger
Invoice past due by 7, 14, 30, 60 days (escalating sequence)
Template
gfs_pastdue_remind_{n} (4 templates)Recipients
Customer AP contact, escalates to customer executive contact at 60+ days
Content
Outstanding amount, days past due, payment link, tone escalates from friendly to firm
Temperature Excursion Alert
Trigger
IoT sensor reading outside 33-41F for > 15 minutes
Template
gfs_temp_excursion_alertRecipients
QA Manager, Warehouse Supervisor, Facility Manager (immediate), VP Ops (if > 1 hour)
Content
Sensor ID, location, current temp, duration, affected lots, recommended action protocol
Compliance Expiry Warning
Trigger
Vendor/facility cert expires within 30/60/90 days (USDA, FDA, SQF, Kosher)
Template
gfs_cert_expiry_warnRecipients
Compliance Officer, Vendor contact, Procurement Manager
Content
Cert type, vendor name, expiry date, renewal instructions, consequence of lapse (PO hold)
■ All email templates use GFS-branded HTML with cobalt header bar, company logo, and footer. Templates stored as NetSuite email template records with merge field support.
06
Workflow Best Practices
Naming Conventions
▶ Workflows:
customworkflow_gfs_{module}_{action}▶ Scripts:
customscript_gfs_{module}_{type}▶ Deployments:
customdeploy_gfs_{module}_{action}▶ Always prefix with
gfs_ to distinguish from native and third-party customizations▶ Use lowercase with underscores, max 40 characters for script IDs
State Naming
▶ Use past tense for completed states: Approved, Rejected, Shipped, Closed
▶ Use present participle for active states: Processing, Receiving, Reviewing
▶ Use "Pending" prefix for waiting states: Pending Approval, Pending Customer
▶ Keep state names under 20 characters for dashboard display
▶ Assign sort order values in increments of 10 to allow future insertions
Error Handling
▶ Wrap all workflow actions in try/catch blocks with meaningful error messages
▶ Log errors to a custom GFS Audit Log record, not just the execution log
▶ Send email to IT team on critical failures (workflow stuck, script timeout)
▶ Include record type, internal ID, and user context in all error logs
▶ Never silently swallow exceptions; always re-throw after logging if needed
Logging
▶ Use
log.audit() for state transitions and approvals▶ Use
log.error() for failures, never log.debug() in production▶ Include timestamp, user, record ID, old state, new state in transition logs
▶ Structured log format:
[GFS] {module} | {action} | {detail}▶ Retain execution logs for 90 days minimum for compliance audits
Testing
▶ Test all workflow paths in Sandbox before production deployment
▶ Verify forward and backward state transitions with each role type
▶ Test edge cases: zero-amount orders, multi-subsidiary, intercompany
▶ Confirm email templates render correctly in Outlook, Gmail, and Apple Mail
▶ Validate escalation timers fire correctly (use shortened intervals in sandbox)
Deployment Checklist
▶ Document all workflow states, transitions, and conditions in change log
▶ Export workflow as SDF (SuiteCloud Development Framework) for version control
▶ Schedule deployment during off-hours (after 8 PM ET, before 6 AM ET)
▶ Notify affected users 48 hours before workflow changes go live
▶ Keep previous workflow version inactive (not deleted) for 30-day rollback window
■ All GFS workflow customizations are tracked in the customization registry. Contact IT before creating new workflows to avoid duplicate logic.