Sync Salesforce invoices to QuickBooks with line items

CRMMarketingSalesAccounting

What it does

When a new invoice is created in Salesforce, this automation searches QuickBooks for the related customer and creates an invoice there. It then adds each Salesforce invoice line to the QuickBooks invoice so both systems stay in sync.

Who it's for

Accounting teams who need invoices and line items from Salesforce to appear in QuickBooks automatically.

How teams use this

Sync invoices without duplicate lines

Create a Salesforce invoice and have it appear in QuickBooks with the correct line items, avoiding the extra line that occurs when an invoice is created with a default line. The automation handles the line creation in the loop only.

Keep customer records in sync across systems

When an invoice is created for a new customer in Salesforce, the automation searches QuickBooks first and creates the customer if needed. Both systems then have matching customer and invoice records.

Extend to include custom invoice fields

Add a condition to check for custom fields on the Salesforce invoice, such as a project code or department, and include those details when creating the QuickBooks invoice. This requires mapping the Salesforce fields to QuickBooks custom fields.

Route invoices by customer type

Add a condition after the customer search to route invoices to different QuickBooks accounts based on the customer type in Salesforce. Only invoices matching the condition are synced to the designated account.

How it works

  1. New invoice created in Salesforce. A new invoice is added to Salesforce and this automation retrieves the invoice and account details to begin syncing to QuickBooks.
  2. Get the account and invoice details. Retrieve the account information and invoice details from Salesforce so the customer can be matched in QuickBooks.
  3. Search for the customer in QuickBooks. Look up the customer in QuickBooks by display name. If not found, create the customer so the invoice has a valid customer record.
  4. Get all invoice lines from Salesforce. Fetch the complete list of line items attached to the Salesforce invoice so each one can be added to QuickBooks.
  5. Create invoice and add line items. Create the sales invoice in QuickBooks, then loop through each Salesforce line item and add it to the invoice so the records match exactly.