Skip to content

feat(quickbooks): add QuickBooks integration - #245

Open
RishadAlam wants to merge 12 commits into
mainfrom
feat/quickbooks-integration
Open

RishadAlam wants to merge 12 commits into
mainfrom
feat/quickbooks-integration

Conversation

@RishadAlam

@RishadAlam RishadAlam commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Description

Adds QuickBooks as a Bit Integrations action with 64 write actions. The free plugin owns the connection, the dropdown lists and the screens. The actions run in Pro: https://github.com/bit-apps-pro/bit-integrations-pro/pull/165

Motivation & Context

QuickBooks is one of the most requested accounting apps. This ports the bit-pi QuickBooks integration (Bit-Apps-Pro/bit-pi#884). Only write actions are ported (create, update, delete, void, send, deactivate, attach). The bit-pi webhook triggers are left out.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • ⚡ Improvement
  • 🔄 Code refactor

Key Changes

Backend (backend/Actions/QuickBooks)

  • Added QuickBooksController.
    • $authConfig OAuth2.
    • The API client is built from the connection's company_id and environment (production or sandbox). Spaces in the Company ID are removed.
    • Nine dropdown routes (customers, vendors, employees, items, accounts, terms, payment methods, classes, departments) page through up to 5000 records each.
    • The item dropdowns list only Service, Non-inventory and Inventory items. QuickBooks rejects Category and bundle items on a transaction line.
  • Added RecordApiHelper: one switch case per action fires its own quick_books_* hook with the field map, the API client and the dropdown settings, then calls LogHandler::save.

Frontend (AllIntegrations/QuickBooks)

  • Added the connection form. It uses the shared OAuth2 Authorization with the com.intuit.quickbooks.accounting scope, plus extraFields for the Environment and the Company ID.
  • Added staticData.js.
    • Field maps hold the record IDs that an action targets, plus free text.
    • Customers, vendors, items, accounts, terms and similar references are fetched dropdowns.
    • Enums are fixed selects.
    • Optional checkboxes are Utilities.
    • Each transaction takes one line (item or category, plus mapped quantity, unit price and amount).
  • Added the action layout (the note sits below the field map), the field map, the utilities, the wizard and the edit screens.
    • The update actions say that only the mapped fields change.
    • The "+" row button is hidden when an action has only required ID fields.
    • When several dropdown fetches fail together, one error toast shows. The loader stays on until every fetch finishes.
    • Address labels are whole translatable strings (for example "Billing City").
  • Added registration in NewInteg, EditInteg, IntegInfo, SelectAction and tutorialLinks, plus a 128px logo.

Testing

  • Connected through the real Intuit OAuth popup in the UI (sandbox, Development keys). All nine dropdown routes returned live data.
  • Ran all 64 actions live against the Intuit sandbox through QuickBooksController::execute, and every action succeeded.
  • Built and saved a Contact Form 7 → Create Invoice flow in the UI, then ran it. It created invoice #1052.
  • Built and saved a Contact Form 7 → Create Time Activity flow in the UI, with Hours set to 1.5. QuickBooks recorded 1 hour 30 minutes.
  • Tested all 64 actions as a user would: built one flow per action in the UI (dropdowns, field map, utilities, Finish & Save) on a dedicated Contact Form 7 form, submitted the real front-end form in stages (create, update/send, void, delete, deactivate) and checked every flow's log. 67 flows, all succeeded.
  • Opened all 64 actions in the UI. Every fetched dropdown loaded options, and no error toasts appeared.
  • Found and fixed a bug during testing: changing the action cleared every dropdown key, including type, so a saved flow lost its integration type and never ran.
  • eslint is clean. Prettier is clean on the new files.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests added/updated
  • Documentation updated if needed
  • README updated if needed

Changelog

  • New Actions: QuickBooks (64)

🤖 Generated with Claude Code

…outes

The controller builds the API client from the OAuth2 connection, using the
Company ID and the environment that the connection form stores. Nine routes
load customers, vendors, employees, items, accounts, terms, payment methods,
classes and departments, up to 5000 records each.
One switch case per action fires its own quick_books_* hook with the field
map, the API client and the dropdown settings, then saves the task log.
… screens

The connection form asks for the environment and the Company ID next to
the OAuth client keys.
Changing the action clears every dropdown key, and the Item Type and Payment
Method Type dropdowns used the key "type". That also removed the
integration type, so saved flows never ran. The keys are now item_type and
payment_method_type.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Category and bundle items cannot go on a transaction line, so the item query
now returns only Service, NonInventory and Inventory items.
- Update Customer gets Parent Customer, Update Item gets Inventory Asset Account,
  Create Bill Payment gets Department, and Update Vendor and Update Employee get
  the 1099 and Billable Time utilities that Pro already reads.
- Hide the + row button when an action has only required ID fields.
- Show one toast when several dropdown fetches fail together.
- Keep the loader on until every parallel fetch finishes.
- Use mutative in handleInput and quote the developer portal link.
- Use whole translatable strings for billing, shipping and employee address labels.
- Explain that update actions change only the mapped fields.
- Move the Detail Type example out of the label into the account notes.
- Say that Time Activity Hours accepts decimals.
- Rename Service to Service Item, Type to Payment Method Type, and Other to
  Not a credit card.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Keep only translators notes, phpcs pragmas, type tags and the notes that explain a
non-obvious choice.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 08:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants