Payroll days, 14:00 Schedule
New payroll file (provider SFTP credential) Watch Folder
File not processed before Claim Gate
new → Read the fixed-width file
Read the fixed-width file Read File
Header: period and pay date Map Columns
Period open in the ledger? Router
closed → Period closed - tell the controller · open → Cut columns by position
Period closed - tell the controller Teams Channel Writer
Cut columns by position Map Columns
={ employee: TRIM(MID(line, 1, 8)), code: TRIM(MID(line, 9, 4)), cents: VALUE(MID(line, 13, 9)), costCenter: RIGHT(line, 6) }On {"line": "E0010042REG 000412500CC-300"} the engine answers {"employee": "E0010042", "code": "REG", "cents": 412500.0, "costCenter": "CC-300"}
Line well formed? Check Data Rules
fails → Malformed lines · passes → GL account for the earning code
=AND(LEN(line) = 27, ISNUMERIC(MID(line, 13, 9)))On {"line": "E0010042REG 000412500CC-300"} the engine answers true
Malformed lines Collect Failed Rows
GL account for the earning code Look Up Values
Known earning code? Filter Rows
unknown → Unknown codes, with the line · known → Entity for the cost center
Unknown codes, with the line Row Inserter
Entity for the cost center Look Up Values
Which entity? Router
US01 → US01 journal lines · UK02 → UK02 journal lines
US01 journal lines Totals
UK02 journal lines Totals
Both journals Merge Rows
Debits equal credits? Router
balanced → Post the journal entries · off → Controller reviews
=IF(ROUND(SUM(lines, debit), 2) = ROUND(SUM(lines, credit), 2), "balanced", "off")On {"lines": [{"debit": 4125.0, "credit": 0}, {"debit": 0, "credit": 4125.0}]} the engine answers "balanced"
Controller reviews Worklist task
approved → Post the journal entries
Post the journal entries NetSuite Create
Archive the payroll file Move or Copy File
Confirmation to payroll Outlook Mail Sender