Skip to content

Commit 1b01e26

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): generate sales arrays correctly
1 parent bad68d9 commit 1b01e26

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/sim/blocks/blocks/quickbooks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
568568
enabled: true,
569569
prompt:
570570
'Generate a JSON array of QuickBooks sales lines. Use item lines with lineType, positive amount, itemId, and optional description, positive quantity, positive unitPrice, and serviceDate. When quantity and unitPrice are both present, amount must equal quantity multiplied by unitPrice. Use description lines with lineType and description. Return ONLY the JSON array - no explanations, no extra text.',
571-
generationType: 'json-object',
572571
},
573572
},
574573
{
@@ -702,7 +701,6 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
702701
enabled: true,
703702
prompt:
704703
'Generate a JSON array of QuickBooks invoice allocations using only invoiceId and a positive amount. Return ONLY the JSON array - no explanations, no extra text.',
705-
generationType: 'json-object',
706704
},
707705
},
708706
{

apps/sim/tools/quickbooks/sales.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,14 @@ describe('QuickBooks customer payments and voids', () => {
475475
})
476476

477477
describe('QuickBooks sales block coercion', () => {
478+
it('does not force array-valued wand prompts through JSON-object generation', () => {
479+
for (const id of ['lines', 'invoiceAllocations']) {
480+
const subBlock = QuickBooksBlock.subBlocks.find((candidate) => candidate.id === id)
481+
expect(subBlock?.wandConfig?.enabled).toBe(true)
482+
expect(subBlock?.wandConfig?.generationType).toBeUndefined()
483+
}
484+
})
485+
478486
it('parses dynamic JSON and numeric values only in block parameter mapping', () => {
479487
expect(
480488
QuickBooksBlock.tools.config!.params!({

0 commit comments

Comments
 (0)