Skip to content

Commit 51ee301

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): generate sales arrays correctly
1 parent aa494ee commit 51ee301

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
@@ -565,7 +565,6 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
565565
enabled: true,
566566
prompt:
567567
'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.',
568-
generationType: 'json-object',
569568
},
570569
},
571570
{
@@ -699,7 +698,6 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
699698
enabled: true,
700699
prompt:
701700
'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.',
702-
generationType: 'json-object',
703701
},
704702
},
705703
{

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)