Import direct-to-consumer inbound invoices from CSV to Oracle
Document/FileMarketingRecipe ToolsData ParserUtilitiesDatabase
What it does
When a CSV file arrives in an on-prem folder, this automation looks up the division and checks for the customer in the database. It parses the response, inserts the invoice batch into Oracle, and stops with an error if any step fails.
Who it's for
Accounting teams who process direct-to-consumer invoices and need them staged in Oracle without manual entry.
How teams use this
Process daily direct-to-consumer invoice batches
Import CSV files from the on-prem folder each day, validate customers against the database, and stage them in Oracle for reconciliation. The team avoids manual data entry and keeps invoices in sync.
Route invoices by division
Use the lookup table to assign each invoice to the correct division before staging. This ensures invoices land in the right cost center without rework.
Add invoice validation rules
Extend the flow to check invoice amounts against a threshold or filter out duplicate invoice numbers before inserting into Oracle. Only invoices that pass validation are staged.
Alert on customer creation failures
Include a condition to detect when the customer intake function cannot create a customer, then notify the team so they can investigate. This prevents bad data from reaching Oracle.
How it works
- Monitor for new CSV files. Watch an on-prem folder for new CSV files containing inbound invoice data in batch.
- Look up the division code. Search the Lookup Table for the Orig Sys Name to division mapping to find the correct division for each invoice in the batch.
- Check or create the customer. Call the customer intake function to verify the customer exists in the database. If found, fetch the record. If not, create it and return the response.
- Stage invoices in Oracle. Insert the batch of invoice rows into the HOT_INBOUND_INVOICES_STG table, then insert reconciliation rows into HOT_INVOICE_INTERFACE_RECON in Oracle.
- Move the processed file. Execute the move file script to relocate the CSV to the target folder. If any step fails, stop the job with an error and publish the failure to the event topic.