@go-labs-sg/bb 3.9.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -9
- package/command-manifest.json +75 -14
- package/command-reference.md +23 -15
- package/dist/index.js +1468 -47
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -168,7 +168,8 @@ The shared API rechecks existing records at submission. Canonical matches reuse
|
|
|
168
168
|
Admins can record an already-made payment on an APPROVED bill or claim without transferring money or emailing the supplier/claimant:
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
-
bb bill payment accounts
|
|
171
|
+
bb bill payment accounts # cached list: { accounts, cacheState, inactiveAccounts, refreshedAt, refresh }
|
|
172
|
+
bb bill payment accounts-refresh # optional: queue a refresh now
|
|
172
173
|
bb bill payment record-external <billId> \
|
|
173
174
|
--paymentReference 2343190532 \
|
|
174
175
|
--paymentDate 2026-09-01 \
|
|
@@ -176,7 +177,7 @@ bb bill payment record-external <billId> \
|
|
|
176
177
|
--paymentProof receipt.pdf
|
|
177
178
|
```
|
|
178
179
|
|
|
179
|
-
Choose the bank or card account actually used (including `Events Requisitions`); no account or date is defaulted. Omit `--paymentProof` if a payment-proof PDF is already attached. In non-interactive use, add `--allow-state-change --allow-external-write --allow-financial-write`; no `--allow-email` is needed. The UI offers the same **Record external payment** action next to ordinary **Mark paid**.
|
|
180
|
+
Choose the bank or card account actually used (including `Events Requisitions`); no account or date is defaulted. The account list is Budget Builder's cached copy of QuickBooks' active bank and credit-card accounts; neither command calls QuickBooks during the request. The worker keeps it current on its own: it queues a refresh when the list has never loaded, is more than a day old, or belongs to a different QuickBooks company than the one now connected, so a manual refresh is optional. After a QuickBooks company change, `cacheState` is `REALM_CHANGED`: no accounts are listed and `record-external` is refused until the new company's list lands. The queued payment re-checks the account in QuickBooks and stops in the Integration Queue, without paying, if it is no longer active. It is tied to the QuickBooks company connected when it was recorded, and stops without reading or paying if the connection now reaches a different company. An account in `inactiveAccounts` is accepted only to link a bill QuickBooks already shows as settled (its existing payment is linked, nothing is created); if the QuickBooks bill still has a balance or no linked payment, the job is refused before creating anything and the bill goes back to APPROVED. Omit `--paymentProof` if a payment-proof PDF is already attached. In non-interactive use, add `--allow-state-change --allow-external-write --allow-financial-write`; no `--allow-email` is needed. The UI offers the same **Record external payment** action next to ordinary **Mark paid**.
|
|
180
181
|
|
|
181
182
|
BB marks the bill PAID immediately and queues durable QuickBooks reconciliation. A settled zero-balance QBO bill reuses its existing BillPayment IDs. Otherwise reconciliation creates a payment with the specified date/account and a stable provider request ID. Partially settled or inconsistent QBO bills require manual reconciliation; BB never guesses. Inspect failed/pending work in Integration Queue and **do not pay the bill again**. Exact retries with the same reference/date/account return the recorded settlement; changed details conflict. Ordinary Mark paid keeps its existing payment-advice workflow.
|
|
182
183
|
|
|
@@ -714,15 +715,15 @@ Admin/Lead users can run `bb supplier approve <supplierId>` to directly re-appro
|
|
|
714
715
|
|
|
715
716
|
| Area | Legacy handler labels (reference only; non-exhaustive) |
|
|
716
717
|
| --- | --- |
|
|
717
|
-
| **Budgets** | `list-budgets` (full payload by default; `--summary` or `--includeDetails false` for slim list), `get-budget`, `get-budget-items`, `get-budget-details`, `get-budget-categories` (forward cursor pages of active categories, name A–Z: `--q` / `--limit` / `--cursor`; returns `{ items, pageInfo }`), `get-budget-versions`, `rename-budget-version`, `restore-budget-version`, `update-budget-status` (`ESTIMATE_ACCEPTED` requires win proof, auto-marks `PITCH` or `LOST` projects `WON`, and auto-creates an Asana Event Ops section from Prompt 5 tasks when enabled; Prompt 5 skips quantity-zero items, combines matching non-GO-internal suppliers, keeps each GO internal item separate, removes generated work that repeats another line item or group, adds 5 mandatory supplier subtasks ending in "Get bill and upload to Budget Builder", and sets no subtask due dates; `--projectStatusOnCommercialRejection PITCH\|LOST` is required when rejecting the only accepted/closed budget on a commercial project), `mark-budget-won` (`<budgetId>` + proof file path; `PITCH` or `LOST` projects become `WON` automatically), `create-budget` / `update-budget` (`--payload`; cloned unavailable lines require `unavailableItemReviewAcknowledged: true`), `delete-budget`, `create-budget-approval` (also sends approval request emails), `create-estimate`, `send-estimate-to-contact-person` (same contact-person email workflow as web), `add-budget-items`, `update-budget-item`, `replace-budget-item`, `approve-unavailable-item-exception` (Lead/Admin), `remove-budget-item`, `reorder-budget-items`, `update-budget-item-supplier`, `mark-budget-items-not-utilized
|
|
718
|
-
| **Bills / claims** | `list-bills` (`--isClaimable false` for bills, `--isClaimable true` for claims, omit for both), `list-claims` (claims only), `validate-bill-selection` (`--payload`, plus `--quotationIds q1,q2` or legacy `--quotationId q1`; validates the approved supplier and quotation coverage), `link-bill-quotations` (`<billId> --quotationIds q1,q2`; Admin source-link repair for eligible supplier bills), `stage-bill-attachment` (securely uploads invoice/payment-proof files before creation and returns attachment JSON; ownership and one-hour expiry are enforced by a server-side staged-upload record rather than encoded in the object key), `cleanup-staged-bill-attachments`, `create-bill` (`--payload`; set `isClaimable=false` for a bill and provide approved `quotationIds`, or use `--quotation-exempt` for an eligible server-validated exemption; set `isClaimable=true` for a claim without quotations; supplier bills require positive **before-GST** `extractedAmount` (full invoice subtotal) and `amount` (portion billed), with `amount <= extractedAmount`; line and quotation allocation amounts also exclude GST; an already-paid supplier bill sets `alreadyPaid=true` and requires `paymentReference` plus a staged PDF in `paymentProofAttachments`;
|
|
719
|
-
| **Quotations** | `list-quotations` (project, budget, supplier, status, requester and text-search filters; newest-first cursor pages via `--limit` / `--cursor` / `--direction` returning `{ items, pageInfo }`; `--page` / `--perPage` / `--pageSize` are rejected), `count-quotations` (`quotation.getCounts`: filters only, returns `totalCount`, status facets that ignore their own status filter, and `--includeMetrics true` amount metrics), `get-quotation` (web quotation shape), `get-quotation-line-items` (`<quotationId>`; newest-first cursor pages, `--limit 1-100`, `--cursor`), `upload-quotation-attachment` (`<projectId>` + PDF/JPEG/PNG path up to 20MB; returns attachment JSON for payload use), `cleanup-staged-quotation-attachments`, `create-quotation` (`--payload` for `quotation.createDraft`; include `amountWithoutGst`, `gstAmount`, and `lineAmounts` entries `{ budgetItemId, amount }` for multiple selected items), `update-quotation` (`--payload`; updates a `DRAFT` or `REJECTED` quotation), `delete-quotation`, `submit-quotation`, `approve-quotation`, `reject-quotation`, `download-quotation-pdf` (`original`, `staff`, or `final`) |
|
|
718
|
+
| **Budgets** | `list-budgets` (full payload by default; `--summary` or `--includeDetails false` for slim list), `get-budget`, `get-budget-items`, `get-budget-details`, `get-budget-categories` (forward cursor pages of active categories, name A–Z: `--q` / `--limit` / `--cursor`; returns `{ items, pageInfo }`), `get-budget-versions`, `rename-budget-version`, `restore-budget-version`, `update-budget-status` (`ESTIMATE_ACCEPTED` requires win proof, auto-marks `PITCH` or `LOST` projects `WON`, and auto-creates an Asana Event Ops section from Prompt 5 tasks when enabled; Prompt 5 skips quantity-zero items, combines matching non-GO-internal suppliers, keeps each GO internal item separate, removes generated work that repeats another line item or group, adds 5 mandatory supplier subtasks ending in "Get bill and upload to Budget Builder", and sets no subtask due dates; `--projectStatusOnCommercialRejection PITCH\|LOST` is required when rejecting the only accepted/closed budget on a commercial project), `mark-budget-won` (`<budgetId>` + proof file path; `PITCH` or `LOST` projects become `WON` automatically), `create-budget` / `update-budget` (`--payload`; cloned unavailable lines require `unavailableItemReviewAcknowledged: true`), `delete-budget`, `create-budget-approval` (also sends approval request emails), `create-estimate`, `send-estimate-to-contact-person` (same contact-person email workflow as web), `add-budget-items`, `update-budget-item`, `replace-budget-item`, `approve-unavailable-item-exception` (Lead/Admin), `remove-budget-item`, `reorder-budget-items`, `update-budget-item-supplier`, `mark-budget-items-not-utilized` / `restore-budget-item` (save the line state now and queue the QuickBooks placeholder update: `placeholderSyncQueued`, `placeholderOperationIds`), `create-placeholder-bill` (admin recovery; queues the placeholder create or update and returns `operationId` with `status: QUEUED`; the request makes no QuickBooks call), `create-budget-category`, `update-budget-category`, `delete-budget-category`, `update-budget-commission`, `delete-budget-commission`, `update-budget-discount`, `delete-budget-discount` (`--payload` where noted), `upload-budget-attachment` (`<budgetId>` + local file path; uses `attachment.requestBudgetAttachmentUpload` + PUT + `attachment.confirmBudgetAttachment`) |
|
|
719
|
+
| **Bills / claims** | `list-bills` (`--isClaimable false` for bills, `--isClaimable true` for claims, omit for both), `list-claims` (claims only), `validate-bill-selection` (`--payload`, plus `--quotationIds q1,q2` or legacy `--quotationId q1`; validates the approved supplier and quotation coverage), `link-bill-quotations` (`<billId> --quotationIds q1,q2`; Admin source-link repair for eligible supplier bills), `stage-bill-attachment` (securely uploads invoice/payment-proof files before creation and returns attachment JSON; ownership and one-hour expiry are enforced by a server-side staged-upload record rather than encoded in the object key), `cleanup-staged-bill-attachments`, `create-bill` (`--payload`; set `isClaimable=false` for a bill and provide approved `quotationIds`, or use `--quotation-exempt` for an eligible server-validated exemption; set `isClaimable=true` for a claim without quotations; supplier bills require positive **before-GST** `extractedAmount` (full invoice subtotal) and `amount` (portion billed), with `amount <= extractedAmount`; line and quotation allocation amounts also exclude GST; an already-paid supplier bill sets `alreadyPaid=true` and requires `paymentReference` plus a staged PDF in `paymentProofAttachments`; an Admin's unpaid bill is approved on creation and its QuickBooks bill is created by a queued job (`quickBooksSyncQueued: true`, `operationId`; track it with `list-integration-operations`), an Admin's already-paid bill queues paid-bill finalization, and other roles remain pending approval; the request never writes to QuickBooks), `update-bill` (`--payload`), `update-bill-payment-evidence` (`--payload`; replaces the payment reference and payment-proof PDFs for an already-paid bill), `delete-bill`, `create-bill-approval` (also sends approval request emails), `update-bill-status` (`PAID` requires `--paymentReference`; pass `--paymentProof <receipt.pdf>` to stage and submit a PDF up to 20MB atomically, or omit it only when BB already has payment proof; moving to `PAID` runs the server's paid-bill notification workflow), `patch-bill-payment` (PAID bills: `--paymentTrackingUrl`, `--paymentReference`, `--quickbooksBillId`, `--paymentDate` ISO; clearing a paid bill's QuickBooks link is not allowed), `patch-bill-invoice-number`, `get-bill-attachments` (newest-first cursor pages: `--limit` 1–50, `--cursor`; returns `{ items, pageInfo }`), `upload-bill-attachment` (`<billId>` + local path), `get-bill-details` (the web bill summary: status, amounts, people, payment, line totals), `get-bill-line-items` / `get-bill-approvals` (newest-first cursor pages: `--limit`, `--cursor`; `{ items, pageInfo }`), `get-bill-payment` (payment status, reference, date, tracking URL, QuickBooks link, external payment) |
|
|
720
|
+
| **Quotations** | `list-quotations` (project, budget, supplier, status, requester and text-search filters; newest-first cursor pages via `--limit` / `--cursor` / `--direction` returning `{ items, pageInfo }`; `--page` / `--perPage` / `--pageSize` are rejected), `count-quotations` (`quotation.getCounts`: filters only, returns `totalCount`, status facets that ignore their own status filter, and `--includeMetrics true` amount metrics), `get-quotation` (web quotation shape), `get-quotation-line-items` (`<quotationId>`; newest-first cursor pages, `--limit 1-100`, `--cursor`), `upload-quotation-attachment` (`<projectId>` + PDF/JPEG/PNG path up to 20MB; returns attachment JSON for payload use), `cleanup-staged-quotation-attachments`, `create-quotation` (`--payload` for `quotation.createDraft`; include `amountWithoutGst`, `gstAmount`, and `lineAmounts` entries `{ budgetItemId, amount }` for multiple selected items), `update-quotation` (`--payload`; updates a `DRAFT` or `REJECTED` quotation), `delete-quotation`, `submit-quotation`, `approve-quotation`, `reject-quotation`, `download-quotation-pdf` (`original`, `staff`, or `final`). PDF work runs in queued jobs, not in the request: `create-quotation` / `update-quotation` queue the upload check and PDF conversion, `submit-quotation` and `approve-quotation` queue the staff-signed and final signed PDFs. `get-quotation` reports `pdfProcessing` (`PROCESSING` or `FAILED`, with the step and error) until the PDF is linked, and `download-quotation-pdf` answers "still processing" meanwhile |
|
|
720
721
|
| **Customer invoices** | `check-customer-invoice-readiness`, `list-eligible-customer-invoice-budgets`, `preview-customer-invoice-amount`, `list-available-qbo-customer-invoices`, `list-customer-invoices` (global/project/budget filters; cursor pages via `--limit` / `--cursor` / `--direction` returning `{ items, pageInfo }`, `--page` / `--perPage` rejected; `--sortBy totalInvoiceAmount` sorts provider-confirmed totals including GST, with unknown amounts last), `count-customer-invoices` (`customerInvoice.getCounts`: filters only; `totalCount`, lifecycle status facets that ignore their own status filter, and amount metrics), `get-customer-invoice` (web-shaped batch), `get-customer-invoice-invoices`, `get-customer-invoice-lines`, `get-customer-invoice-approvals`, `get-customer-invoice-history`, `get-customer-invoice-payments` (live QuickBooks payments for one invoice), `get-customer-invoice-email-context`, `preview-qbo-customer-invoice`, `import-qbo-customer-invoice` (BB-only link with reviewed token), `create-customer-invoice`, `resubmit-customer-invoice` (original requester only; one replacement after confirmed expiry voiding; repeated calls return the same replacement), `discard-customer-invoice`, `delete-customer-invoice`, `void-customer-invoice`, `approve-customer-invoice` (admin), `reject-customer-invoice` (admin), `send-customer-invoice-to-contact-person`, `download-customer-invoice-pdf` (non-admins cannot download while approval is pending), `mark-customer-invoice-sent-externally` (admin; `--sentAt` ISO, `--recipients` comma list, optional `--note`; records an APPROVED invoice as SENT/EXTERNAL, sends no email), `sync-customer-invoice` (status only: QuickBooks edits to bill-to address, memo, bill email or total are held as `qboDetailsDrift` and admins are emailed once per QuickBooks revision), `update-customer-invoice-details` (bill-to address and memo; external QuickBooks write; bill email is managed in QuickBooks), `update-customer-invoice-qbo-drift` (admin; `--resolution ACCEPT_QBO` writes BB only, `KEEP_BB` queues BB's address and memo to QuickBooks) |
|
|
721
|
-
| **Approvals** | `list-approvals` / `get-pending-approvals` (`--type budget\|supplier\|bill\|quotation\|customer_invoice\|all`), `approve-bill` / `reject-bill` (send reply email), `approve-budget` / `reject-budget` (send reply email), `approve-supplier` / `reject-supplier` (send reply email), `approve-quotation` / `reject-quotation`, `approve-customer-invoice` / `reject-customer-invoice` |
|
|
722
|
-
| **Companies & projects** | `list-companies`, `get-company`, `create-company
|
|
722
|
+
| **Approvals** | `list-approvals` / `get-pending-approvals` (`--type budget\|supplier\|bill\|quotation\|customer_invoice\|all`), `approve-bill` / `reject-bill` (send reply email), `approve-budget` / `reject-budget` (send reply email), `approve-supplier` / `reject-supplier` (send reply email; approval and Lead/Admin re-approval queue the QuickBooks vendor sync, and the supplier is usable once it confirms), `approve-quotation` / `reject-quotation`, `approve-customer-invoice` / `reject-customer-invoice` |
|
|
723
|
+
| **Companies & projects** | `list-companies`, `get-company`, `create-company` / `use-existing-company` (save the BB company now and queue its QuickBooks customer find/create or link, returning `quickBooksSyncQueued` / `operationId`; a QBO-only import passes `--name` from `search-existing-companies`; estimates, invoices and QuickBooks projects wait until the customer is linked; `get-company-quickbooks-sync-status` shows the queued or stopped link), `update-company` (`--payload`), `delete-company`, `list-projects`, `get-project` (its budget overview returns `totalRevenue`, calculated only from Estimate Accepted and Estimate Closed budgets), `get-project-hub-status` (saved state only, no provider read; a project whose hub link exists only in its Asana notes shows as not set up until `setup-project-hub` links that existing hub; also reports `rotation` while a web-started share-link rotation is `QUEUED` or has `FAILED`; the rotation runs as a queued job and the current link keeps working until it finishes), `setup-project-hub`, `sync-project-hub-commercial-documents`, `create-project` (required: `--name`, `--companyId`, `--contactPersonId`, `--insideSalesId`, `--businessDevelopmentId`, `--venue`, `--startDate` as ISO datetime for project/window start; when `--asanaTaskId` is omitted, the CLI searches open Asana lead tasks in the Deals project, prompts for one of the top five matches, and resolves Slack channel fields from the selected deal card; optional `--asanaSearch`, `--pax`, `--endDate`, `--description`, `--projectManagerId`; always requests QBO project import like the web app; the deal card name is updated by a queued job reported as `asanaNameSyncQueued` / `asanaNameSyncOperationId`), `update-project` (`--payload` with `dateRange.from` / `dateRange.to` for the project window; optional `projectManagerId` and `requestQboAccountantNotification` in JSON; a rename queues the Asana project and deal card rename and returns `asanaNameSyncQueued` / `asanaNameSyncOperationId`; a Business Development change queues the deal card assignee update and returns `asanaAssigneeSyncQueued` / `asanaAssigneeSyncOperationId`, with `integrationWarnings` only when the deal card or Asana user mapping is missing — the request never calls Asana), `delete-project`, `check-project-reconciliation <id>` (runs the web app's live checks without changing status), `reconcile-project <id>` (reruns checks transactionally and marks an eligible project `RECONCILED`), `complete-project <id>` (reruns validation, marks a reconciled project `COMPLETED`, and queues QuickBooks placeholder cleanup), `import-qbo-project`, `update-project-status` (`<id>` `<status>`: `PITCH` \| `WON` \| `COMPLETED` \| `RECONCILED` \| `LOST`; close-out follows `WON` → `RECONCILED` → `COMPLETED`, and reconciliation requires every accepted/closed budget line to have an Approved/Paid bill or claim or be explicitly Not Utilized; marking `COMPLETED` queues deletion of every remaining project placeholder bill from QuickBooks; for `PITCH` → `WON` also pass a Budget Builder user `--projectManagerId` or `--projectManagerEmail`; when marking `WON` without an accepted/closed budget or proof, pass `--wonOverrideReason`) |
|
|
723
724
|
| **Contacts** | `list-contacts`, `create-contact-person` (`--payload`), `update-contact-person` (`--payload`) |
|
|
724
|
-
| **Suppliers & items** | `list-suppliers` (defaults to active suppliers, `--perPage 10`, sorted by `createdAt` desc; supports `--name`, `--sortBy` for scalar supplier fields, `--sortDir`, `--createdBy`, `--gstRegistered`, `--status`, `--supplierTags`, `--active false` for archived suppliers), `create-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `update-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `delete-suppliers` (`--ids` CSV; admin; archives/deactivates related items), `reactivate-suppliers` (`--ids` CSV; admin; reactivates
|
|
725
|
-
| **Dashboard & users** | `whoami` (current authenticated identity and role), `list-users` (forward cursor pages, name A–Z: `--limit` / `--cursor`, optional `--q` matching name or email; `--page` / `--perPage` rejected), `count-users` (`{ totalCount }` for the same `--q`), `create-user` (admin; provisions an API-only service identity with no Google sign-in; `--email`, optional `--name`, optional `--role` defaulting to `USER`), `create-api-key` (`--name`; defaults to the caller; admin-only `--userId` for another user; raw key shown once), `list-api-keys` (newest-first cursor pages: `--limit` 1–100, `--cursor`; returns `{ items, pageInfo }`; defaults to the caller; admin-only `--userId` for another user), `revoke-api-key` (key ID; admin-only `--userId` for another user), `get-user-performance`, `get-dashboard`, `get-monthly-metrics`, `get-system-overview`, `get-estimate-performance`, `get-financial-overview` (performance/dashboard commands are admin-only) |
|
|
725
|
+
| **Suppliers & items** | `list-suppliers` (defaults to active suppliers, `--perPage 10`, sorted by `createdAt` desc; supports `--name`, `--sortBy` for scalar supplier fields, `--sortDir`, `--createdBy`, `--gstRegistered`, `--status`, `--supplierTags`, `--active false` for archived suppliers; each row carries `quickBooksSync` while a QuickBooks vendor job is queued or stopped), `create-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`; a Lead/Admin create or archived-name revival instead queues the QuickBooks vendor create or link, returning `quickBooksSyncQueued` and `operationId`, and the supplier becomes usable once QuickBooks confirms), `update-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `delete-suppliers` (`--ids` CSV; admin; archives/deactivates related items), `reactivate-suppliers` (`--ids` CSV; admin; queues one job per inactive supplier that reactivates or links its QuickBooks vendor and only then makes the supplier and its supplier-deactivated items active; returns `queuedSuppliers` and `operations`), `create-certification` / `create-payment-method` / `create-supplier-role` / `create-supplier-tag` (`--name`), `get-supplier-details` (includes `quickBooksSync` while a QuickBooks vendor job is `QUEUED` or has `FAILED`, and `supplierApprovalSummary` for pending approvers, superseded approvers, and the actual responder/respondedAt metadata), `get-supplier-overview` / `get-supplier-usage` / `get-supplier-items` `<supplierId>` (the supplier page's per-tab reads: profile, approvals and tab counts without usage or items; usage rows with spending; inventory items), `get-supplier-analytics` (admin; cursor pages: `--limit` / `--cursor` / `--direction`, optional `--name`, `--status` CSV, `--gstRegistered true|false`, `--createdBy`, `--timeFrame` (with `--startDate`/`--endDate` for `CUSTOM` only), `--sortBy name|gstRegistered|status|phone|email|updatedAt|createdAt`, `--sortDir`; `--page` / `--perPage` rejected; invalid filters are rejected instead of silently widening results), `count-supplier-analytics` (admin; `{ totalCount }` for the same filters), `list-items` (`--includeQuickBooksDeactivationPending true` discovers interrupted QuickBooks deactivations for Admin retry), `create-item` (`--payload`; saves the item and queues its QuickBooks item create, returning `quickBooksSyncQueued` and `operationId`; edits, archives and reactivation wait until that create links the QuickBooks item), `update-item` (`--payload`), `archive-items` (`--ids` CSV, max 100; Budget Builder-only; open estimates retain unavailable snapshot lines for resolution), `delete-item` (admin; archives in Budget Builder and makes the item inactive in QuickBooks; blocked while an open estimate references it), `get-item`, `list-item-categories` (cursor pages of active categories: `--limit` / `--cursor` / `--direction`, optional `--name`, `--sortBy createdAt|name|itemCount|createdBy`, `--sortDir`; `--page` / `--perPage` rejected), `count-item-categories` (`{ totalCount }` for the same `--name`), `create-item-category` / `update-item-category` / `delete-item-categories` (admin; `--ids` CSV for delete; `create-item-category` saves the category and queues its QuickBooks create or link — `list-item-categories` rows show `quickBooksSync` while it is queued or stopped, and items can be created in the category meanwhile; `update-item-category` saves the name immediately and queues the QuickBooks rename for a linked category, returning `quickBooksSyncQueued` and `operationId`) |
|
|
726
|
+
| **Dashboard & users** | `whoami` (current authenticated identity and role), `list-users` (forward cursor pages, name A–Z: `--limit` / `--cursor`, optional `--q` matching name or email, optional `--projectTeamOnly true` for the active `@getout.sg` users accepted as Inside Sales, Business Development or Project Manager; `--page` / `--perPage` rejected), `count-users` (`{ totalCount }` for the same `--q` and `--projectTeamOnly`), `create-user` (admin; provisions an API-only service identity with no Google sign-in; `--email`, optional `--name`, optional `--role` defaulting to `USER`), `create-api-key` (`--name`; defaults to the caller; admin-only `--userId` for another user; raw key shown once), `list-api-keys` (newest-first cursor pages: `--limit` 1–100, `--cursor`; returns `{ items, pageInfo }`; defaults to the caller; admin-only `--userId` for another user), `revoke-api-key` (key ID; admin-only `--userId` for another user), `get-user-performance`, `get-dashboard`, `get-monthly-metrics`, `get-system-overview`, `get-estimate-performance`, `get-financial-overview` (performance/dashboard commands are admin-only) |
|
|
726
727
|
| **Errors (admin)** | `get-recent-errors`, `get-error`, `get-error-metrics` |
|
|
727
728
|
| **Automation (admin)** | `list-integration-operations` (cursor pages, newest first: `--limit` / `--cursor` / `--direction` with `--search`, `--destination`, `--status`; `--page` / `--perPage` rejected), `count-integration-operations` (`{ filterOptions }` provider options only; no total, so the command does not scan the outbox; filter flags are accepted but ignored), `get-integration-operation <operationId>` (who queued the job, what it is for, saved progress, Retry state), `reconcile-resource-operation <operationId>`, `retry-integration-operation` (QuickBooks jobs with a saved attempt check QuickBooks first and never resend an applied change; Resend resolution requires `--confirmExternalStateReconciled true` plus `--outboundEmailResolution ACCEPTED\|NOT_ACCEPTED_RETRY`; include `--providerMessageId` when accepted) |
|
|
728
729
|
| **Historical / benchmarks** | `get-approved-budgets`, `get-budget-category-benchmarks`, `get-item-pricing-history`, `get-supplier-pricing-history` |
|
package/command-manifest.json
CHANGED
|
@@ -2317,7 +2317,7 @@
|
|
|
2317
2317
|
{
|
|
2318
2318
|
"path": ["bill", "create"],
|
|
2319
2319
|
"legacyAliases": ["create-bill", "create_bill"],
|
|
2320
|
-
"summary": "Create a bill or claim with an approved supplier. All amount fields exclude GST: amount is the portion billed; extractedAmount is the full invoice subtotal; lineAmounts and quotationAllocations also exclude GST. Example: 1800 + 162 GST = 1962 total requires amount=1800 and extractedAmount=1800 for a full bill. The CLI does not strip GST from input. If the selected quotations cannot split the bill amount across every selected line (a line without a quoted amount that cannot be derived from the quotation total), pass lineAmounts; updates that keep the same amount and lines reuse the existing line amounts. --draft-only guarantees DRAFT without email or external writes; otherwise unpaid creation skips email permission but keeps external-write permission. The result includes quotationOverBillingWarnings; a non-empty list means linked non-rejected bills exceed a quotation's quoted amount. It is a warning only and the write still succeeds.",
|
|
2320
|
+
"summary": "Create a bill or claim with an approved supplier. All amount fields exclude GST: amount is the portion billed; extractedAmount is the full invoice subtotal; lineAmounts and quotationAllocations also exclude GST. Example: 1800 + 162 GST = 1962 total requires amount=1800 and extractedAmount=1800 for a full bill. The CLI does not strip GST from input. If the selected quotations cannot split the bill amount across every selected line (a line without a quoted amount that cannot be derived from the quotation total), pass lineAmounts; updates that keep the same amount and lines reuse the existing line amounts. --draft-only guarantees DRAFT without email or external writes; otherwise unpaid creation skips email permission but keeps external-write permission. The result includes quotationOverBillingWarnings; a non-empty list means linked non-rejected bills exceed a quotation's quoted amount. It is a warning only and the write still succeeds. An Admin's unpaid bill is approved on creation and its QuickBooks bill is created by a queued job: the result has quickBooksSyncQueued: true and operationId; follow it with list-integration-operations. The request itself never writes to QuickBooks.",
|
|
2321
2321
|
"globalOptions": [
|
|
2322
2322
|
{
|
|
2323
2323
|
"name": "--help",
|
|
@@ -2697,7 +2697,7 @@
|
|
|
2697
2697
|
"record-external-bill-payment",
|
|
2698
2698
|
"record_external_bill_payment"
|
|
2699
2699
|
],
|
|
2700
|
-
"summary": "Record an already-made payment on an APPROVED bill or claim, with no email and no money transfer. Requires <billId> --paymentReference --paymentDate YYYY-MM-DD --paymentAccount <QBO account ID> [--paymentProof receipt.pdf]. Reuses settled QBO payment links or queues one dated payment from the selected account. Exact retries are safe; do not pay again while reconciliation is pending.",
|
|
2700
|
+
"summary": "Record an already-made payment on an APPROVED bill or claim, with no email and no money transfer. Requires <billId> --paymentReference --paymentDate YYYY-MM-DD --paymentAccount <QBO account ID> [--paymentProof receipt.pdf]. The account must be in the cached list (list-external-payment-accounts); the request makes no QuickBooks call. An inactive account (inactiveAccounts) only links the bill's existing QuickBooks payment when the bill is already settled; if there is none, the job is refused before anything is created and the bill goes back to APPROVED. Reuses settled QBO payment links or queues one dated payment from the selected account; the queued job re-checks the account in QuickBooks and stops in the Integration Queue if it is not active. Exact retries are safe; do not pay again while reconciliation is pending.",
|
|
2701
2701
|
"globalOptions": [
|
|
2702
2702
|
{
|
|
2703
2703
|
"name": "--help",
|
|
@@ -2750,7 +2750,7 @@
|
|
|
2750
2750
|
"list-external-payment-accounts",
|
|
2751
2751
|
"list_external_payment_accounts"
|
|
2752
2752
|
],
|
|
2753
|
-
"summary": "List active QuickBooks bank and credit-card account IDs for recording external payments (admin only).",
|
|
2753
|
+
"summary": "List active QuickBooks bank and credit-card account IDs for recording external payments (admin only), from Budget Builder's cached list: { accounts, cacheState, inactiveAccounts, refreshedAt, refresh }. inactiveAccounts can only link an already-settled bill's existing payment. No QuickBooks call. The worker refreshes the list automatically every day and after a QuickBooks company change; cacheState is READY, NOT_LOADED (first load pending), REALM_CHANGED (refreshing after a company change; no accounts served and external payments refused until it lands) or DISCONNECTED.",
|
|
2754
2754
|
"globalOptions": [
|
|
2755
2755
|
{
|
|
2756
2756
|
"name": "--help",
|
|
@@ -2797,6 +2797,59 @@
|
|
|
2797
2797
|
"effects": [],
|
|
2798
2798
|
"legacyTarget": "list-external-payment-accounts"
|
|
2799
2799
|
},
|
|
2800
|
+
{
|
|
2801
|
+
"path": ["bill", "payment", "accounts-refresh"],
|
|
2802
|
+
"legacyAliases": [
|
|
2803
|
+
"refresh-external-payment-accounts",
|
|
2804
|
+
"refresh_external_payment_accounts"
|
|
2805
|
+
],
|
|
2806
|
+
"summary": "Admin only. Queue a refresh of the cached QuickBooks payment-account list ({ operationId, status: QUEUED }); a refresh already waiting is reused. Optional: the worker already refreshes the list every day and after a QuickBooks company change. Check refreshedAt with list-external-payment-accounts.",
|
|
2807
|
+
"globalOptions": [
|
|
2808
|
+
{
|
|
2809
|
+
"name": "--help",
|
|
2810
|
+
"description": "Show help for this command."
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
"name": "--quiet",
|
|
2814
|
+
"description": "Suppress non-error diagnostics."
|
|
2815
|
+
},
|
|
2816
|
+
{
|
|
2817
|
+
"name": "--debug",
|
|
2818
|
+
"description": "Emit sanitized diagnostic traces."
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
"name": "--api-url",
|
|
2822
|
+
"description": "Override the Budget Builder API base URL."
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
"name": "--no-browser",
|
|
2826
|
+
"description": "Print the authorization URL without opening a browser."
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"name": "--allow-state-change",
|
|
2830
|
+
"description": "Allow a Budget Builder state change in non-interactive use."
|
|
2831
|
+
},
|
|
2832
|
+
{
|
|
2833
|
+
"name": "--allow-email",
|
|
2834
|
+
"description": "Allow sending email in non-interactive use."
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
"name": "--allow-external-write",
|
|
2838
|
+
"description": "Allow writes to external systems in non-interactive use."
|
|
2839
|
+
},
|
|
2840
|
+
{
|
|
2841
|
+
"name": "--allow-delete",
|
|
2842
|
+
"description": "Allow deleting data in non-interactive use."
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
"name": "--allow-financial-write",
|
|
2846
|
+
"description": "Allow financial-record changes in non-interactive use."
|
|
2847
|
+
}
|
|
2848
|
+
],
|
|
2849
|
+
"argumentMode": "legacy-passthrough",
|
|
2850
|
+
"effects": ["state-change"],
|
|
2851
|
+
"legacyTarget": "refresh-external-payment-accounts"
|
|
2852
|
+
},
|
|
2800
2853
|
{
|
|
2801
2854
|
"path": ["bill", "payment", "patch"],
|
|
2802
2855
|
"legacyAliases": ["patch-bill-payment", "patch_bill_payment"],
|
|
@@ -3547,7 +3600,7 @@
|
|
|
3547
3600
|
{
|
|
3548
3601
|
"path": ["quotation", "get"],
|
|
3549
3602
|
"legacyAliases": ["get-quotation", "get_quotation"],
|
|
3550
|
-
"summary": "Get a quotation as shown in the web app: status, amounts, people, line totals, files and approvals. Use get-quotation-line-items for budget-item detail. Argument: <quotationId>.",
|
|
3603
|
+
"summary": "Get a quotation as shown in the web app: status, amounts, people, line totals, files and approvals. pdfProcessing is { status: PROCESSING | FAILED, step: NORMALIZE | STAMP, operationId, error } while a queued PDF conversion or signing step has not linked its PDF, else null. Use get-quotation-line-items for budget-item detail. Argument: <quotationId>.",
|
|
3551
3604
|
"globalOptions": [
|
|
3552
3605
|
{
|
|
3553
3606
|
"name": "--help",
|
|
@@ -3761,7 +3814,7 @@
|
|
|
3761
3814
|
{
|
|
3762
3815
|
"path": ["quotation", "create"],
|
|
3763
3816
|
"legacyAliases": ["create-quotation", "create_quotation"],
|
|
3764
|
-
"summary": "Create a quotation with an approved supplier using --payload JSON. Include projectId, budgetId, supplierId, budgetItemIds, amountWithoutGst, gstAmount, and one uploaded attachment in attachments. Multiple budget items require lineAmounts: [{\"budgetItemId\":\"<first-id>\",\"amount\":750},{\"budgetItemId\":\"<second-id>\",\"amount\":450}], covering every selected budget-item ID exactly once and summing to amountWithoutGst. Amounts exclude GST; use gstAmount: 0 for no GST. Example: amountWithoutGst: 1200 with line amounts 750 and 450.",
|
|
3817
|
+
"summary": "Create a quotation with an approved supplier using --payload JSON. Include projectId, budgetId, supplierId, budgetItemIds, amountWithoutGst, gstAmount, and one uploaded attachment in attachments. Multiple budget items require lineAmounts: [{\"budgetItemId\":\"<first-id>\",\"amount\":750},{\"budgetItemId\":\"<second-id>\",\"amount\":450}], covering every selected budget-item ID exactly once and summing to amountWithoutGst. Amounts exclude GST; use gstAmount: 0 for no GST. Example: amountWithoutGst: 1200 with line amounts 750 and 450. The upload is checked and converted to PDF by a queued job (pdfProcessing in the result and in get-quotation).",
|
|
3765
3818
|
"globalOptions": [
|
|
3766
3819
|
{
|
|
3767
3820
|
"name": "--help",
|
|
@@ -3921,7 +3974,7 @@
|
|
|
3921
3974
|
{
|
|
3922
3975
|
"path": ["quotation", "submit"],
|
|
3923
3976
|
"legacyAliases": ["submit-quotation", "submit_quotation"],
|
|
3924
|
-
"summary": "Submit a quotation for signing and approval. Claim the captured revision and exact allocation selection; concurrent edits, budget-item deletion or restore cascades conflict instead of attaching old signed PDFs. Refresh and resubmit the current content.",
|
|
3977
|
+
"summary": "Submit a quotation for signing and approval. Claim the captured revision and exact allocation selection; concurrent edits, budget-item deletion or restore cascades conflict instead of attaching old signed PDFs. Refresh and resubmit the current content. The signed PDF is stamped by a queued job (pdfProcessing: PROCESSING until linked); a file whose PDF conversion failed must be uploaded again first.",
|
|
3925
3978
|
"globalOptions": [
|
|
3926
3979
|
{
|
|
3927
3980
|
"name": "--help",
|
|
@@ -3971,7 +4024,7 @@
|
|
|
3971
4024
|
{
|
|
3972
4025
|
"path": ["quotation", "approve"],
|
|
3973
4026
|
"legacyAliases": ["approve-quotation", "approve_quotation"],
|
|
3974
|
-
"summary": "Approve your assigned pending quotation as a current Admin. Claim the captured revision and exact allocation selection after signing; concurrent changes conflict and roll back the decision, signed
|
|
4027
|
+
"summary": "Approve your assigned pending quotation as a current Admin. Claim the captured revision and exact allocation selection after signing; concurrent changes conflict and roll back the decision, signed-PDF job and email/outbox. Refresh and review the current content before retrying. The final signed PDF is stamped by a queued job (pdfProcessing); a stopped earlier PDF step blocks approval until it is retried.",
|
|
3975
4028
|
"globalOptions": [
|
|
3976
4029
|
{
|
|
3977
4030
|
"name": "--help",
|
|
@@ -5863,7 +5916,7 @@
|
|
|
5863
5916
|
{
|
|
5864
5917
|
"path": ["supplier", "approve"],
|
|
5865
5918
|
"legacyAliases": ["approve-supplier", "approve_supplier"],
|
|
5866
|
-
"summary": "Approve a pending supplier request and send a requester reply email, or directly re-approve a rejected supplier as Admin/Lead without a pending request or email. QuickBooks is
|
|
5919
|
+
"summary": "Approve a pending supplier request and send a requester reply email, or directly re-approve a rejected supplier as Admin/Lead without a pending request or email. The QuickBooks vendor is created, linked or updated by a queued job (quickBooksSyncQueued, operationId); the supplier stays PENDING_APPROVAL until QuickBooks confirms, and archived suppliers remain archived. Argument: <supplierId>.",
|
|
5867
5920
|
"globalOptions": [
|
|
5868
5921
|
{
|
|
5869
5922
|
"name": "--help",
|
|
@@ -6427,7 +6480,7 @@
|
|
|
6427
6480
|
{
|
|
6428
6481
|
"path": ["company", "use"],
|
|
6429
6482
|
"legacyAliases": ["use-existing-company", "use_existing_company"],
|
|
6430
|
-
"summary": "Reuse a company in BB and QuickBooks, creating only its missing counterpart. Supply --companyId <bbId> and/or --quickbooksId <qboId>; both explicitly connect records with different names. --website <url> fills a missing QBO import website only. --confirmDistinct true confirms no similar record represents this entity.",
|
|
6483
|
+
"summary": "Reuse a company in BB and QuickBooks, creating only its missing counterpart. Supply --companyId <bbId> and/or --quickbooksId <qboId>; both explicitly connect records with different names. Importing a QuickBooks-only company also needs --name <QuickBooks name from search-existing-companies>. --website <url> fills a missing QBO import website only. --confirmDistinct true confirms no similar record represents this entity. BB saves the company now; its QuickBooks customer is checked, found or created and linked by a queued job (quickBooksSyncQueued, operationId). Estimates, invoices and QuickBooks projects wait for that link.",
|
|
6431
6484
|
"globalOptions": [
|
|
6432
6485
|
{
|
|
6433
6486
|
"name": "--help",
|
|
@@ -6477,6 +6530,10 @@
|
|
|
6477
6530
|
"name": "--quickbooksId",
|
|
6478
6531
|
"description": "Existing QBO customer ID; alone imports or reuses its BB company."
|
|
6479
6532
|
},
|
|
6533
|
+
{
|
|
6534
|
+
"name": "--name",
|
|
6535
|
+
"description": "QuickBooks company name (from search-existing-companies); required for a QBO-only import."
|
|
6536
|
+
},
|
|
6480
6537
|
{
|
|
6481
6538
|
"name": "--website",
|
|
6482
6539
|
"description": "Website only when missing from a QBO-only import."
|
|
@@ -6493,7 +6550,7 @@
|
|
|
6493
6550
|
{
|
|
6494
6551
|
"path": ["company", "create"],
|
|
6495
6552
|
"legacyAliases": ["create-company", "create_company"],
|
|
6496
|
-
"summary": "Create or reuse a company in BB and QuickBooks. --name <name> --website <url> [--billingEmails '<json-array>'] (up to 50 invoice Cc defaults, stored in BB only for new companies; reused company defaults are preserved). Similar names require --confirmDistinct true; inactive companies are never reactivated.",
|
|
6553
|
+
"summary": "Create or reuse a company in BB and QuickBooks. --name <name> --website <url> [--billingEmails '<json-array>'] (up to 50 invoice Cc defaults, stored in BB only for new companies; reused company defaults are preserved). Similar names require --confirmDistinct true; inactive companies are never reactivated. BB saves the company now; its QuickBooks customer is found or created by a queued job (quickBooksSyncQueued, operationId), which stops if similar QuickBooks customers exist without --confirmDistinct.",
|
|
6497
6554
|
"globalOptions": [
|
|
6498
6555
|
{
|
|
6499
6556
|
"name": "--help",
|
|
@@ -7952,7 +8009,7 @@
|
|
|
7952
8009
|
{
|
|
7953
8010
|
"path": ["supplier", "create"],
|
|
7954
8011
|
"legacyAliases": ["create-supplier", "create_supplier"],
|
|
7955
|
-
"summary": "Create a supplier using --payload JSON; pending-approval suppliers also request approval and send emails. Reusing an archived name requires Admin; normal users and Leads must ask an Admin to reactivate it before editing. Recreation preserves the existing approval status and creator.",
|
|
8012
|
+
"summary": "Create a supplier using --payload JSON; pending-approval suppliers also request approval and send emails. Reusing an archived name requires Admin; normal users and Leads must ask an Admin to reactivate it before editing. Recreation preserves the existing approval status and creator. Lead/Admin-created suppliers (and archived-name revivals) queue their QuickBooks vendor create or link (quickBooksSyncQueued, operationId) and become usable once QuickBooks confirms; the request makes no QuickBooks call.",
|
|
7956
8013
|
"globalOptions": [
|
|
7957
8014
|
{
|
|
7958
8015
|
"name": "--help",
|
|
@@ -8991,7 +9048,7 @@
|
|
|
8991
9048
|
{
|
|
8992
9049
|
"path": ["item", "category", "create"],
|
|
8993
9050
|
"legacyAliases": ["create-item-category", "create_item_category"],
|
|
8994
|
-
"summary": "Create
|
|
9051
|
+
"summary": "Admin only. Create (or reactivate) an item category. Budget Builder saves it now and a queued job creates or links the QuickBooks category (quickBooksSyncQueued, operationId); the request makes no QuickBooks call.",
|
|
8995
9052
|
"globalOptions": [
|
|
8996
9053
|
{
|
|
8997
9054
|
"name": "--help",
|
|
@@ -9041,7 +9098,7 @@
|
|
|
9041
9098
|
{
|
|
9042
9099
|
"path": ["item", "category", "update"],
|
|
9043
9100
|
"legacyAliases": ["update-item-category", "update_item_category"],
|
|
9044
|
-
"summary": "
|
|
9101
|
+
"summary": "Rename an item category. Budget Builder saves the name immediately; a category linked to QuickBooks is renamed there by a queued job (quickBooksSyncQueued: true, operationId), never during the request.",
|
|
9045
9102
|
"globalOptions": [
|
|
9046
9103
|
{
|
|
9047
9104
|
"name": "--help",
|
|
@@ -9141,7 +9198,7 @@
|
|
|
9141
9198
|
{
|
|
9142
9199
|
"path": ["user", "list"],
|
|
9143
9200
|
"legacyAliases": ["list-users", "list_users"],
|
|
9144
|
-
"summary": "List users with cursor pagination. [--q] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q. --page/--perPage are rejected.",
|
|
9201
|
+
"summary": "List users with cursor pagination. [--q] [--projectTeamOnly true|false] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q and --projectTeamOnly. --projectTeamOnly true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager. --page/--perPage are rejected.",
|
|
9145
9202
|
"globalOptions": [
|
|
9146
9203
|
{
|
|
9147
9204
|
"name": "--help",
|
|
@@ -9187,6 +9244,10 @@
|
|
|
9187
9244
|
"name": "--q <text>",
|
|
9188
9245
|
"description": "Search user names and emails (name A–Z). A bare --q is rejected; use -q/--quiet to hide logs."
|
|
9189
9246
|
},
|
|
9247
|
+
{
|
|
9248
|
+
"name": "--projectTeamOnly <true|false>",
|
|
9249
|
+
"description": "true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager."
|
|
9250
|
+
},
|
|
9190
9251
|
{
|
|
9191
9252
|
"name": "--limit <1-100>",
|
|
9192
9253
|
"description": "Rows per page. Output is { items, pageInfo }."
|
package/command-reference.md
CHANGED
|
@@ -396,7 +396,7 @@ Effects: state-change, email.
|
|
|
396
396
|
|
|
397
397
|
## `bb bill create`
|
|
398
398
|
|
|
399
|
-
Create a bill or claim with an approved supplier. All amount fields exclude GST: amount is the portion billed; extractedAmount is the full invoice subtotal; lineAmounts and quotationAllocations also exclude GST. Example: 1800 + 162 GST = 1962 total requires amount=1800 and extractedAmount=1800 for a full bill. The CLI does not strip GST from input. If the selected quotations cannot split the bill amount across every selected line (a line without a quoted amount that cannot be derived from the quotation total), pass lineAmounts; updates that keep the same amount and lines reuse the existing line amounts. --draft-only guarantees DRAFT without email or external writes; otherwise unpaid creation skips email permission but keeps external-write permission. The result includes quotationOverBillingWarnings; a non-empty list means linked non-rejected bills exceed a quotation's quoted amount. It is a warning only and the write still succeeds.
|
|
399
|
+
Create a bill or claim with an approved supplier. All amount fields exclude GST: amount is the portion billed; extractedAmount is the full invoice subtotal; lineAmounts and quotationAllocations also exclude GST. Example: 1800 + 162 GST = 1962 total requires amount=1800 and extractedAmount=1800 for a full bill. The CLI does not strip GST from input. If the selected quotations cannot split the bill amount across every selected line (a line without a quoted amount that cannot be derived from the quotation total), pass lineAmounts; updates that keep the same amount and lines reuse the existing line amounts. --draft-only guarantees DRAFT without email or external writes; otherwise unpaid creation skips email permission but keeps external-write permission. The result includes quotationOverBillingWarnings; a non-empty list means linked non-rejected bills exceed a quotation's quoted amount. It is a warning only and the write still succeeds. An Admin's unpaid bill is approved on creation and its QuickBooks bill is created by a queued job: the result has quickBooksSyncQueued: true and operationId; follow it with list-integration-operations. The request itself never writes to QuickBooks.
|
|
400
400
|
|
|
401
401
|
Legacy aliases: `create-bill`, `create_bill`.
|
|
402
402
|
|
|
@@ -477,7 +477,7 @@ Effects: state-change, email, financial-write.
|
|
|
477
477
|
|
|
478
478
|
## `bb bill payment record-external`
|
|
479
479
|
|
|
480
|
-
Record an already-made payment on an APPROVED bill or claim, with no email and no money transfer. Requires <billId> --paymentReference --paymentDate YYYY-MM-DD --paymentAccount <QBO account ID> [--paymentProof receipt.pdf]. Reuses settled QBO payment links or queues one dated payment from the selected account. Exact retries are safe; do not pay again while reconciliation is pending.
|
|
480
|
+
Record an already-made payment on an APPROVED bill or claim, with no email and no money transfer. Requires <billId> --paymentReference --paymentDate YYYY-MM-DD --paymentAccount <QBO account ID> [--paymentProof receipt.pdf]. The account must be in the cached list (list-external-payment-accounts); the request makes no QuickBooks call. An inactive account (inactiveAccounts) only links the bill's existing QuickBooks payment when the bill is already settled; if there is none, the job is refused before anything is created and the bill goes back to APPROVED. Reuses settled QBO payment links or queues one dated payment from the selected account; the queued job re-checks the account in QuickBooks and stops in the Integration Queue if it is not active. Exact retries are safe; do not pay again while reconciliation is pending.
|
|
481
481
|
|
|
482
482
|
Legacy aliases: `record-external-bill-payment`, `record_external_bill_payment`.
|
|
483
483
|
|
|
@@ -485,12 +485,20 @@ Effects: state-change, external-write, financial-write.
|
|
|
485
485
|
|
|
486
486
|
## `bb bill payment accounts`
|
|
487
487
|
|
|
488
|
-
List active QuickBooks bank and credit-card account IDs for recording external payments (admin only).
|
|
488
|
+
List active QuickBooks bank and credit-card account IDs for recording external payments (admin only), from Budget Builder's cached list: { accounts, cacheState, inactiveAccounts, refreshedAt, refresh }. inactiveAccounts can only link an already-settled bill's existing payment. No QuickBooks call. The worker refreshes the list automatically every day and after a QuickBooks company change; cacheState is READY, NOT_LOADED (first load pending), REALM_CHANGED (refreshing after a company change; no accounts served and external payments refused until it lands) or DISCONNECTED.
|
|
489
489
|
|
|
490
490
|
Legacy aliases: `list-external-payment-accounts`, `list_external_payment_accounts`.
|
|
491
491
|
|
|
492
492
|
Effects: none.
|
|
493
493
|
|
|
494
|
+
## `bb bill payment accounts-refresh`
|
|
495
|
+
|
|
496
|
+
Admin only. Queue a refresh of the cached QuickBooks payment-account list ({ operationId, status: QUEUED }); a refresh already waiting is reused. Optional: the worker already refreshes the list every day and after a QuickBooks company change. Check refreshedAt with list-external-payment-accounts.
|
|
497
|
+
|
|
498
|
+
Legacy aliases: `refresh-external-payment-accounts`, `refresh_external_payment_accounts`.
|
|
499
|
+
|
|
500
|
+
Effects: state-change.
|
|
501
|
+
|
|
494
502
|
## `bb bill payment patch`
|
|
495
503
|
|
|
496
504
|
Patch Bill Payment.
|
|
@@ -605,7 +613,7 @@ Effects: none.
|
|
|
605
613
|
|
|
606
614
|
## `bb quotation get`
|
|
607
615
|
|
|
608
|
-
Get a quotation as shown in the web app: status, amounts, people, line totals, files and approvals. Use get-quotation-line-items for budget-item detail. Argument: <quotationId>.
|
|
616
|
+
Get a quotation as shown in the web app: status, amounts, people, line totals, files and approvals. pdfProcessing is { status: PROCESSING | FAILED, step: NORMALIZE | STAMP, operationId, error } while a queued PDF conversion or signing step has not linked its PDF, else null. Use get-quotation-line-items for budget-item detail. Argument: <quotationId>.
|
|
609
617
|
|
|
610
618
|
Legacy aliases: `get-quotation`, `get_quotation`.
|
|
611
619
|
|
|
@@ -637,7 +645,7 @@ Effects: state-change, delete.
|
|
|
637
645
|
|
|
638
646
|
## `bb quotation create`
|
|
639
647
|
|
|
640
|
-
Create a quotation with an approved supplier using --payload JSON. Include projectId, budgetId, supplierId, budgetItemIds, amountWithoutGst, gstAmount, and one uploaded attachment in attachments. Multiple budget items require lineAmounts: [{"budgetItemId":"<first-id>","amount":750},{"budgetItemId":"<second-id>","amount":450}], covering every selected budget-item ID exactly once and summing to amountWithoutGst. Amounts exclude GST; use gstAmount: 0 for no GST. Example: amountWithoutGst: 1200 with line amounts 750 and 450.
|
|
648
|
+
Create a quotation with an approved supplier using --payload JSON. Include projectId, budgetId, supplierId, budgetItemIds, amountWithoutGst, gstAmount, and one uploaded attachment in attachments. Multiple budget items require lineAmounts: [{"budgetItemId":"<first-id>","amount":750},{"budgetItemId":"<second-id>","amount":450}], covering every selected budget-item ID exactly once and summing to amountWithoutGst. Amounts exclude GST; use gstAmount: 0 for no GST. Example: amountWithoutGst: 1200 with line amounts 750 and 450. The upload is checked and converted to PDF by a queued job (pdfProcessing in the result and in get-quotation).
|
|
641
649
|
|
|
642
650
|
Legacy aliases: `create-quotation`, `create_quotation`.
|
|
643
651
|
|
|
@@ -671,7 +679,7 @@ Effects: state-change, delete.
|
|
|
671
679
|
|
|
672
680
|
## `bb quotation submit`
|
|
673
681
|
|
|
674
|
-
Submit a quotation for signing and approval. Claim the captured revision and exact allocation selection; concurrent edits, budget-item deletion or restore cascades conflict instead of attaching old signed PDFs. Refresh and resubmit the current content.
|
|
682
|
+
Submit a quotation for signing and approval. Claim the captured revision and exact allocation selection; concurrent edits, budget-item deletion or restore cascades conflict instead of attaching old signed PDFs. Refresh and resubmit the current content. The signed PDF is stamped by a queued job (pdfProcessing: PROCESSING until linked); a file whose PDF conversion failed must be uploaded again first.
|
|
675
683
|
|
|
676
684
|
Legacy aliases: `submit-quotation`, `submit_quotation`.
|
|
677
685
|
|
|
@@ -679,7 +687,7 @@ Effects: state-change.
|
|
|
679
687
|
|
|
680
688
|
## `bb quotation approve`
|
|
681
689
|
|
|
682
|
-
Approve your assigned pending quotation as a current Admin. Claim the captured revision and exact allocation selection after signing; concurrent changes conflict and roll back the decision, signed
|
|
690
|
+
Approve your assigned pending quotation as a current Admin. Claim the captured revision and exact allocation selection after signing; concurrent changes conflict and roll back the decision, signed-PDF job and email/outbox. Refresh and review the current content before retrying. The final signed PDF is stamped by a queued job (pdfProcessing); a stopped earlier PDF step blocks approval until it is retried.
|
|
683
691
|
|
|
684
692
|
Legacy aliases: `approve-quotation`, `approve_quotation`.
|
|
685
693
|
|
|
@@ -977,7 +985,7 @@ Effects: state-change, email.
|
|
|
977
985
|
|
|
978
986
|
## `bb supplier approve`
|
|
979
987
|
|
|
980
|
-
Approve a pending supplier request and send a requester reply email, or directly re-approve a rejected supplier as Admin/Lead without a pending request or email. QuickBooks is
|
|
988
|
+
Approve a pending supplier request and send a requester reply email, or directly re-approve a rejected supplier as Admin/Lead without a pending request or email. The QuickBooks vendor is created, linked or updated by a queued job (quickBooksSyncQueued, operationId); the supplier stays PENDING_APPROVAL until QuickBooks confirms, and archived suppliers remain archived. Argument: <supplierId>.
|
|
981
989
|
|
|
982
990
|
Legacy aliases: `approve-supplier`, `approve_supplier`.
|
|
983
991
|
|
|
@@ -1057,7 +1065,7 @@ Effects: none.
|
|
|
1057
1065
|
|
|
1058
1066
|
## `bb company use`
|
|
1059
1067
|
|
|
1060
|
-
Reuse a company in BB and QuickBooks, creating only its missing counterpart. Supply --companyId <bbId> and/or --quickbooksId <qboId>; both explicitly connect records with different names. --website <url> fills a missing QBO import website only. --confirmDistinct true confirms no similar record represents this entity.
|
|
1068
|
+
Reuse a company in BB and QuickBooks, creating only its missing counterpart. Supply --companyId <bbId> and/or --quickbooksId <qboId>; both explicitly connect records with different names. Importing a QuickBooks-only company also needs --name <QuickBooks name from search-existing-companies>. --website <url> fills a missing QBO import website only. --confirmDistinct true confirms no similar record represents this entity. BB saves the company now; its QuickBooks customer is checked, found or created and linked by a queued job (quickBooksSyncQueued, operationId). Estimates, invoices and QuickBooks projects wait for that link.
|
|
1061
1069
|
|
|
1062
1070
|
Legacy aliases: `use-existing-company`, `use_existing_company`.
|
|
1063
1071
|
|
|
@@ -1065,7 +1073,7 @@ Effects: state-change, external-write.
|
|
|
1065
1073
|
|
|
1066
1074
|
## `bb company create`
|
|
1067
1075
|
|
|
1068
|
-
Create or reuse a company in BB and QuickBooks. --name <name> --website <url> [--billingEmails '<json-array>'] (up to 50 invoice Cc defaults, stored in BB only for new companies; reused company defaults are preserved). Similar names require --confirmDistinct true; inactive companies are never reactivated.
|
|
1076
|
+
Create or reuse a company in BB and QuickBooks. --name <name> --website <url> [--billingEmails '<json-array>'] (up to 50 invoice Cc defaults, stored in BB only for new companies; reused company defaults are preserved). Similar names require --confirmDistinct true; inactive companies are never reactivated. BB saves the company now; its QuickBooks customer is found or created by a queued job (quickBooksSyncQueued, operationId), which stops if similar QuickBooks customers exist without --confirmDistinct.
|
|
1069
1077
|
|
|
1070
1078
|
Legacy aliases: `create-company`, `create_company`.
|
|
1071
1079
|
|
|
@@ -1285,7 +1293,7 @@ Effects: none.
|
|
|
1285
1293
|
|
|
1286
1294
|
## `bb supplier create`
|
|
1287
1295
|
|
|
1288
|
-
Create a supplier using --payload JSON; pending-approval suppliers also request approval and send emails. Reusing an archived name requires Admin; normal users and Leads must ask an Admin to reactivate it before editing. Recreation preserves the existing approval status and creator.
|
|
1296
|
+
Create a supplier using --payload JSON; pending-approval suppliers also request approval and send emails. Reusing an archived name requires Admin; normal users and Leads must ask an Admin to reactivate it before editing. Recreation preserves the existing approval status and creator. Lead/Admin-created suppliers (and archived-name revivals) queue their QuickBooks vendor create or link (quickBooksSyncQueued, operationId) and become usable once QuickBooks confirms; the request makes no QuickBooks call.
|
|
1289
1297
|
|
|
1290
1298
|
Legacy aliases: `create-supplier`, `create_supplier`.
|
|
1291
1299
|
|
|
@@ -1465,7 +1473,7 @@ Effects: none.
|
|
|
1465
1473
|
|
|
1466
1474
|
## `bb item category create`
|
|
1467
1475
|
|
|
1468
|
-
Create
|
|
1476
|
+
Admin only. Create (or reactivate) an item category. Budget Builder saves it now and a queued job creates or links the QuickBooks category (quickBooksSyncQueued, operationId); the request makes no QuickBooks call.
|
|
1469
1477
|
|
|
1470
1478
|
Legacy aliases: `create-item-category`, `create_item_category`.
|
|
1471
1479
|
|
|
@@ -1473,7 +1481,7 @@ Effects: state-change, external-write.
|
|
|
1473
1481
|
|
|
1474
1482
|
## `bb item category update`
|
|
1475
1483
|
|
|
1476
|
-
|
|
1484
|
+
Rename an item category. Budget Builder saves the name immediately; a category linked to QuickBooks is renamed there by a queued job (quickBooksSyncQueued: true, operationId), never during the request.
|
|
1477
1485
|
|
|
1478
1486
|
Legacy aliases: `update-item-category`, `update_item_category`.
|
|
1479
1487
|
|
|
@@ -1489,7 +1497,7 @@ Effects: state-change, delete.
|
|
|
1489
1497
|
|
|
1490
1498
|
## `bb user list`
|
|
1491
1499
|
|
|
1492
|
-
List users with cursor pagination. [--q] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q. --page/--perPage are rejected.
|
|
1500
|
+
List users with cursor pagination. [--q] [--projectTeamOnly true|false] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q and --projectTeamOnly. --projectTeamOnly true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager. --page/--perPage are rejected.
|
|
1493
1501
|
|
|
1494
1502
|
Legacy aliases: `list-users`, `list_users`.
|
|
1495
1503
|
|
|
@@ -1830,7 +1838,7 @@ Effects: state-change.
|
|
|
1830
1838
|
|
|
1831
1839
|
Payload fields (--payload JSON)
|
|
1832
1840
|
Required: positional <sourceId>; asanaCustomFields: object; asanaDefaultAssigneeId: string|null; asanaDefaultAssigneeName: string|null; asanaFollowerIds: string[]; asanaProjectId: string; asanaSectionId: string; asanaWonSectionId: string; asanaLostSectionId: string; googleCalendarId: string; googleCalendarTimeZone: string; goshBriefBaseUrl: URL; slackDefaultAssigneeId: string|null; slackInboundChannelId: string; slackInviteUserIds: string[]; slackPitchChannelPrefix: string
|
|
1833
|
-
Optional: asanaDiscussionSectionId, asanaFirstContactSectionId, asanaFirstProposalSentSectionId, asanaProposalWipSectionId: string|null; asanaCustomFields.*: mapped IDs
|
|
1841
|
+
Optional: asanaDiscussionSectionId, asanaFirstContactSectionId, asanaFirstProposalSentSectionId, asanaProposalWipSectionId: string|null; googlePitchCalendarId: string|null (PITCH project events; must differ from googleCalendarId; null keeps them in googleCalendarId); asanaCustomFields.*: mapped IDs
|
|
1834
1842
|
Example: bb save-inbound-automation-config <sourceId> --payload '{"asanaCustomFields":{},"asanaDefaultAssigneeId":null,"asanaDefaultAssigneeName":null,"asanaFollowerIds":[],"asanaProjectId":"<asana-project-id>","asanaSectionId":"<asana-section-id>","asanaWonSectionId":"<asana-won-id>","asanaLostSectionId":"<asana-lost-id>","googleCalendarId":"team@example.com","googleCalendarTimeZone":"Asia/Singapore","goshBriefBaseUrl":"https://example.com/brief","slackDefaultAssigneeId":null,"slackInboundChannelId":"<slack-channel-id>","slackInviteUserIds":[],"slackPitchChannelPrefix":"pitch"}'
|
|
1835
1843
|
|
|
1836
1844
|
## `bb inbound processing update`
|