Skip to content

Commit 7b0de96

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): generate purchasing arrays correctly
1 parent 8e377a8 commit 7b0de96

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
@@ -695,7 +695,6 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
695695
enabled: true,
696696
prompt:
697697
'Generate a JSON array of QuickBooks purchasing lines. Use account lines with lineType account, positive amount, accountId, and optional description; or item lines with lineType item, positive amount, itemId, and optional description, positive quantity, and positive unitPrice. When quantity and unitPrice are both present, amount must equal their product. Return ONLY the JSON array - no explanations, no extra text.',
698-
generationType: 'json-object',
699698
},
700699
},
701700
{
@@ -793,7 +792,6 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
793792
enabled: true,
794793
prompt:
795794
'Generate a JSON array of QuickBooks Bill allocations using only billId and a positive amount. Allocation amounts must total the payment amount. Return ONLY the JSON array - no explanations, no extra text.',
796-
generationType: 'json-object',
797795
},
798796
},
799797
{

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,14 @@ describe('QuickBooks purchasing mutation bodies', () => {
448448
})
449449

450450
describe('QuickBooks purchasing block', () => {
451+
it('does not force array-valued wand prompts through JSON-object generation', () => {
452+
for (const id of ['purchasingLines', 'billAllocations']) {
453+
const subBlock = QuickBooksBlock.subBlocks.find((candidate) => candidate.id === id)
454+
expect(subBlock?.wandConfig?.enabled).toBe(true)
455+
expect(subBlock?.wandConfig?.generationType).toBeUndefined()
456+
}
457+
})
458+
451459
it('parses dynamic purchasing JSON and numeric values in block parameter mapping', () => {
452460
expect(
453461
QuickBooksBlock.tools.config!.params!({

0 commit comments

Comments
 (0)