onEdit versus onFormSubmit
Choose the trigger that matches how scans arrive. onFormSubmit is great for capturing events through a simple form, preserving a clean, append‑only log that scales well and isolates user permissions. onEdit suits direct sheet input with a keyboard‑emulating scanner. Each has quotas and limitations, so reduce heavy computations, write in batches, and fail gracefully. Provide user feedback in a status cell or response confirmation page, so operators know immediately whether a scan succeeded, failed validation, or needs a corrective rescan or manual lookup.