From b8905ad3a3806aaeb9c1bc795390c3f0d8dd2e2f Mon Sep 17 00:00:00 2001 From: SandipBajracharya Date: Wed, 1 Apr 2026 15:13:51 +0545 Subject: [PATCH 1/3] feat(OUT-3277): service item related changes - [x] use name Assembly service while creating fallback item in QBO - [x] get list of service item only from QBO - [x] increase sleep time to 10 seconds before executing invoice update --- src/app/api/quickbooks/invoice/invoice.service.ts | 4 ++-- src/app/api/quickbooks/webhook/webhook.service.ts | 2 +- src/utils/intuitAPI.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/quickbooks/invoice/invoice.service.ts b/src/app/api/quickbooks/invoice/invoice.service.ts index 37eb210f..59530235 100644 --- a/src/app/api/quickbooks/invoice/invoice.service.ts +++ b/src/app/api/quickbooks/invoice/invoice.service.ts @@ -424,7 +424,7 @@ export class InvoiceService extends BaseService { intuitService: IntuitAPI, incomeAccRefVal: string, ): Promise { - const productName = 'Services' + const productName = 'Assembly Service' const tokenService = new TokenService(this.user) const existingProduct = await intuitService.getAnItem(productName) @@ -453,7 +453,7 @@ export class InvoiceService extends BaseService { updatedAt: dayjs().toDate(), } - console.info("Store the 'Assembly fee paid by Client' item ref in DB") + console.info(`Store the ${productName} item ref in DB`) await tokenService.updateQBPortalConnection( updatedPayload, eq(QBPortalConnection.portalId, this.user.workspaceId), diff --git a/src/app/api/quickbooks/webhook/webhook.service.ts b/src/app/api/quickbooks/webhook/webhook.service.ts index bb99d5fe..41e00b42 100644 --- a/src/app/api/quickbooks/webhook/webhook.service.ts +++ b/src/app/api/quickbooks/webhook/webhook.service.ts @@ -90,7 +90,7 @@ export class WebhookService extends BaseService { return await this.handleInvoiceVoided(payload, qbTokenInfo) case WebhookEvents.INVOICE_UPDATED: - await sleep(7000) // invoice.updated event is triggered even when invoice created + await sleep(10000) // invoice.updated event is triggered even when invoice created return await this.handleInvoiceCreated(payload, qbTokenInfo) case WebhookEvents.PAYMENT_SUCCEEDED: diff --git a/src/utils/intuitAPI.ts b/src/utils/intuitAPI.ts index 2716589e..4a446706 100644 --- a/src/utils/intuitAPI.ts +++ b/src/utils/intuitAPI.ts @@ -392,7 +392,7 @@ export default class IntuitAPI { message: `IntuitAPI#getAllItems | Item query start for realmId: ${this.tokens.intuitRealmId}`, }) const stringColumns = columns.map((column) => `${column}`).join(',') - const customerQuery = `select ${stringColumns} from Item where Type IN ('Service', 'Inventory', 'NonInventory') maxresults ${limit}` // Other items with type "Category" cannot be used in invoice line item. It throws an error. + const customerQuery = `select ${stringColumns} from Item where Type = 'Service' maxresults ${limit}` // Only get service items CustomLogger.info({ obj: { customerQuery }, message: 'IntuitAPI#getAllItems', From 718fd5cae687ca82cb877d7e62eb441962e76657 Mon Sep 17 00:00:00 2001 From: SandipBajracharya Date: Wed, 1 Apr 2026 15:16:12 +0545 Subject: [PATCH 2/3] chore(OUT-3277): rename assembly products to assembly services in UI --- src/components/dashboard/settings/SettingAccordion.tsx | 2 +- .../dashboard/settings/sections/product/ProductMapping.tsx | 4 ++-- .../settings/sections/product/ProductMappingTable.tsx | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/dashboard/settings/SettingAccordion.tsx b/src/components/dashboard/settings/SettingAccordion.tsx index 4479eda6..cd482bd3 100644 --- a/src/components/dashboard/settings/SettingAccordion.tsx +++ b/src/components/dashboard/settings/SettingAccordion.tsx @@ -47,7 +47,7 @@ export default function SettingAccordion({ const accordionItems = [ { id: 'product-mapping', - header: 'Product Mapping', + header: 'Service Mapping', content: (
setting.changeSettings( diff --git a/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx b/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx index 941c6c47..51c19eb9 100644 --- a/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx +++ b/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx @@ -93,7 +93,7 @@ export default function ProductMappingTable({ - ASSEMBLY PRODUCTS + ASSEMBLY SERVICES @@ -241,12 +241,12 @@ export default function ProductMappingTable({ ) : ( - Start by creating a product in Assembly. + Start by creating a service in Assembly. - Create Product + Create Service From c6efd98fb8cc3e2f8a82d7b7012d0a04125acf80 Mon Sep 17 00:00:00 2001 From: SandipBajracharya Date: Wed, 1 Apr 2026 17:01:43 +0545 Subject: [PATCH 3/3] chore(OUT-3277): rename product to service --- src/components/dashboard/Main.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/Main.tsx b/src/components/dashboard/Main.tsx index f4c78033..67923e74 100644 --- a/src/components/dashboard/Main.tsx +++ b/src/components/dashboard/Main.tsx @@ -28,7 +28,7 @@ const DashboardCallout = (lastSyncTime: string | null) => ({ [CalloutVariant.WARNING]: { title: 'Finalize your integration', description: - "Review your settings and product mappings to finalize the integration. Once you're ready, click the button to enable the sync.", + "Review your settings and service mappings to finalize the integration. Once you're ready, click the button to enable the sync.", actionLabel: 'Enable app', actionIcon: 'Check' as IconType, buttonVariant: 'primary' as const,