Sync invoice line items from Box CSV to Salesforce

Document/FileMarketingRecipe ToolsCRMData Parser

What it does

When a new CSV file lands in Box, this automation parses the invoice data and searches Salesforce for matching accounts using a SOQL query. It sorts invoices into lists for creation, updates, and revenue line items so the team can process them in bulk.

Who it's for

Accounting teams who need to match invoices to Salesforce accounts and prepare them for batch processing without manual data entry.

How teams use this

Match invoices to existing Salesforce accounts

Parse the CSV and search Salesforce by client ID to link invoices to accounts already in the system. Invoices with matches go to one list and unmatched invoices go to another for review.

Prepare revenue line items for bulk creation

Organize invoice line items into a separate list filtered by type so they can be created as revenue records in Salesforce. Only line items that meet the revenue criteria are included.

Route unmatched invoices for manual review

Invoices that cannot be linked to an existing account are sorted into a separate list and sent to the team for account creation or correction before syncing.

Batch update existing invoice records

Identify invoices already in Salesforce by matching on invoice number and add them to an update list so changes from the CSV are synced without creating duplicates.

How it works

  1. Detect new CSV file in Box. A new CSV file arrives in Box containing invoice and line item data ready to be synced to Salesforce.
  2. Parse the CSV invoice data. Extract invoice records, line items, and account identifiers from the CSV file so they can be matched and organized.
  3. Search Salesforce accounts with SOQL query. Query Salesforce using SOQL to find matching accounts by client ID and retrieve the Account IDs needed to link invoices to existing records.
  4. Sort invoices into processing lists. Organize invoices into separate lists for new accounts, existing accounts, revenue line items to create, and payments to create or update.
  5. Prepare bulk sync to Salesforce. The sorted lists are ready for batch creation and updates so invoices and line items can be synced to Salesforce in bulk.