categorize_by_memo
Categorizes rows in NetSuite GL exports by scanning memo columns for keyword matches; rows without a match fall into 'Uncategorized'.
Instructions
Tag every row with a derived _category based on case-insensitive substring matches across one or more memo columns. NetSuite GL exports usually carry both 'Memo (main)' and 'Memo (line)'; pass both so the keyword sweep covers all the prose. rules maps category name to a list of keywords; the first rule whose keyword appears in any memo wins; rows matching nothing fall into 'Uncategorized'. Returns the tagged rows plus a per-category count breakdown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| memo_columns | Yes | ||
| rules | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| breakdown | Yes |