Link Menu Expand (external link) Document Search Copy Copied

List Invoices

Definition

The “List Invoices” action allows you to automatically retrieve a collection of invoices from your QuickBooks account based on specific criteria you define.

  • Retrieve a customized batch of invoices using pagination controls like maximum results and starting positions.
  • Sort the retrieved invoices by specific attributes such as transaction date, due date, or balance.
  • Select exactly which data fields to return, ensuring your workflow only processes the necessary information.

This action is highly valuable for automating financial reporting, syncing invoice statuses with CRM platforms, or triggering bulk payment reminders across your organization.


Inputs

1. Connection: This field is used to securely link your zenphi workflow to your QuickBooks account.

  • Practical Guidance: You will typically select an existing authorized QuickBooks connection from a dropdown menu, which acts as a static value every time the flow runs.
  • Use Case Context: You would use the “Connection” field to authorize zenphi to read the financial data stored in your specific QuickBooks environment.


2. Max Result: This field determines the maximum number of invoices the action will retrieve at one time, limited to a number between 1 and 1000.

  • Practical Guidance: You can type a static number (like 50) directly into the field, or use the token picker (chain icon) to dynamically pass a number calculated in a previous step.
  • Use Case Context: You would use the “Max Result” field to prevent your workflow from being overwhelmed by too much data if you only need to process the top 10 most recent invoices.


3. Start Position: This field specifies the starting index for retrieving your list of invoices, which is essential for paginating through large datasets.

  • Practical Guidance: You can enter a static number (e.g., 11) or use the token picker to dynamically insert a value updated by a previous loop step.
  • Use Case Context: You would use the “Start Position” field alongside “Max Result” to fetch the next batch of invoices (e.g., invoices 11 through 20) in a recurring workflow.


4. Order by: This field allows you to sort the retrieved invoices based on a specific attribute, such as Id, Transaction Date, Due Date, Document Number, Balance, Create Time, or Last Update Time.

  • Practical Guidance: You will generally select your preferred sorting criteria from a predefined list, setting it as a static value.
  • Use Case Context: You would use the “Order by” field to sort invoices by “Due Date” so your workflow can process the most urgent unpaid invoices first.


5. Select field to return: This field lets you choose exactly which pieces of information (like Total Amount, Balance, or Customer Ref) you want included in the output for each retrieved invoice.

  • Practical Guidance: You can select the desired fields from a dropdown list, ensuring they remain static every time the flow runs.
  • Use Case Context: You would use the “Select field to return” field to limit the retrieved data to just “Bill Email Address” and “Balance” when building an automated email reminder workflow.


Outputs

1. A list of invoices: This output provides a collection of invoice records retrieved from your QuickBooks account, populated strictly with the parameters you chose in the “Select field to return” input.

  • Utility: This list is highly useful because you can pass it directly into a “For Each” loop action to process each invoice individually. For example, you could iterate through this list to send a personalized payment reminder to every customer with an outstanding balance, or extract the “Id” of each invoice to pass into a subsequent “Update Invoice” step.

  • Sync token: The sync token for the invoice.
  • Id: The unique identifier for the invoice.
  • Customer Ref: Reference to the customer for the invoice.
  • Transaction Date: The date the invoice was issued.
  • Bill Email Address: The billing email address.
  • Linked Transactions: List of linked transactions.
  • Linked Txn Id: The unique identifier of the linked transaction.
  • Linked Txn Type: The type of the linked transaction.
  • Line Items: List of line items.
  • Last Updated time: The last time the invoice was updated.
  • Create Time: The time the invoice was created.
  • Private Note: Internal note for the invoice.
  • Customer Memo: Memo or message to the customer.
  • Balance: The remaining balance on the invoice.
  • Currency Code: The ISO code of the currency (e.g., USD).
  • Currency name: The name of the currency (e.g., United States Dollar).
  • Total Amount: The total amount of the invoice.
  • Document Number: The document number of the invoice.
  • Due Date: The due date for payment of the invoice.
  • Tracking Number: The tracking number for the invoice.


Example Use Cases

  1. Automate Payment Reminders Retrieve a list of invoices sorted by due date to automatically send email reminders to customers with outstanding balances.
  2. Generate Financial Reports Fetch a batch of recent invoices to compile and distribute a weekly or monthly sales revenue report to the finance team.
  3. Synchronize CRM Data Pull invoice records from QuickBooks to automatically update customer account statuses and billing histories in your CRM platform.
  4. Audit Unpaid Invoices List invoices with a remaining balance to create an internal audit trail or task list for the accounts receivable department.


Example

Scenario: Your finance team spends hours every week manually checking QuickBooks for overdue invoices and emailing customers to request payment. You want to automate this process by retrieving a list of invoices nearing their due date and automatically sending personalized payment reminders to the associated billing email addresses.

Steps to Implement:

  1. Set the Trigger
    • Select a Scheduled Flow trigger to run the process automatically every Monday morning.
  2. Configure the “List Invoices” Action
    • Add the “List Invoices” action to your flow.
    • Connection: Select your authorized QuickBooks connection from the dropdown menu.
    • Max Result: Enter “100” to retrieve up to 100 invoices in a single run.
    • Order by: Select “Due Date” to prioritize invoices that are due soonest.
    • Select field to return: Choose “Bill Email Address”, “Balance”, “Due Date”, and “Customer Ref” to ensure you only pull the data needed for the reminder emails.
  3. Process the Invoices
    • Add a “For Each” loop action to iterate through the “A list of invoices” output generated by the previous step.
  4. Send Reminders
    • Inside the loop, configure a “Send Email” action using the “Bill Email Address” and “Balance” tokens from the current item to notify each customer of their outstanding amount.

Outcome: The workflow now automatically retrieves relevant invoices from QuickBooks on a set schedule and dispatches payment reminders without any manual intervention. This significantly reduces the administrative burden on the finance team, minimizes human error, and helps accelerate cash flow by ensuring customers are prompted to pay on time.


Best Practices

  1. Optimize Data Retrieval Always use the “Select field to return” input to fetch only the specific data points your workflow requires, which improves flow performance and reduces processing time.
  2. Implement Pagination When dealing with hundreds of invoices, utilize the “Max Result” and “Start Position” fields in conjunction with a loop to process large datasets in manageable batches.
  3. Sort for Efficiency Use the “Order by” field to sort invoices by critical attributes like “Due Date” or “Balance” so your workflow processes the most urgent or high-value records first.
  4. Handle Empty Results Incorporate a condition after the “List Invoices” action to check if the returned list is empty before proceeding to a “For Each” loop, preventing unnecessary workflow errors.