Skip to content

Commit dcad390

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): clarify master data output metadata
1 parent c1d14b5 commit dcad390

3 files changed

Lines changed: 95 additions & 22 deletions

File tree

‎apps/docs/content/docs/en/integrations/quickbooks.mdx‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -91,29 +91,29 @@ List or read one account, customer, vendor, item, or employee
9191
| ↳ `MetaData` | json | Entity creation and update timestamps |
9292
| ↳ `CreateTime` | string | Entity creation timestamp |
9393
| ↳ `LastUpdatedTime` | string | Entity last-updated timestamp |
94-
| ↳ `Name` | string | Item name |
94+
| ↳ `Name` | string | Account or item name |
9595
| ↳ `SubAccount` | boolean | Whether this is a subaccount |
96-
| ↳ `ParentRef` | json | Parent item or category reference |
96+
| ↳ `ParentRef` | json | Parent account, item, or category reference |
9797
| ↳ `value` | string | QuickBooks entity ID |
9898
| ↳ `name` | string | QuickBooks entity display name |
99-
| ↳ `FullyQualifiedName` | string | Hierarchical qualified item name |
99+
| ↳ `FullyQualifiedName` | string | Hierarchical qualified account or item name |
100100
| ↳ `Classification` | string | Account classification |
101101
| ↳ `AccountType` | string | Account type |
102102
| ↳ `AccountSubType` | string | Account subtype |
103103
| ↳ `CurrentBalance` | number | Account current balance |
104-
| ↳ `CurrencyRef` | json | Vendor currency reference |
104+
| ↳ `CurrencyRef` | json | Account, customer, or vendor currency reference |
105105
| ↳ `value` | string | QuickBooks entity ID |
106106
| ↳ `name` | string | QuickBooks entity display name |
107-
| ↳ `DisplayName` | string | Employee display name |
108-
| ↳ `CompanyName` | string | Vendor company name |
107+
| ↳ `DisplayName` | string | Customer, vendor, or employee display name |
108+
| ↳ `CompanyName` | string | Customer or vendor company name |
109109
| ↳ `GivenName` | string | Given name |
110110
| ↳ `FamilyName` | string | Family name |
111-
| ↳ `Taxable` | boolean | Whether the item is taxable |
112-
| ↳ `PrimaryEmailAddr` | json | Employee primary email address |
113-
| ↳ `PrimaryPhone` | json | Employee primary phone number |
114-
| ↳ `BillAddr` | json | Vendor billing address |
111+
| ↳ `Taxable` | boolean | Taxable status for the customer or item |
112+
| ↳ `PrimaryEmailAddr` | json | Customer, vendor, or employee primary email address |
113+
| ↳ `PrimaryPhone` | json | Customer, vendor, or employee primary phone number |
114+
| ↳ `BillAddr` | json | Customer or vendor billing address |
115115
| ↳ `ShipAddr` | json | Customer shipping address |
116-
| ↳ `Balance` | number | Vendor balance |
116+
| ↳ `Balance` | number | Customer or vendor balance |
117117
| ↳ `PrintOnCheckName` | string | Name printed on checks |
118118
| ↳ `Vendor1099` | boolean | Whether the vendor is tracked for 1099 reporting |
119119
| ↳ `AcctNum` | string | Vendor account number |
@@ -143,29 +143,29 @@ List or read one account, customer, vendor, item, or employee
143143
| ↳ `MetaData` | json | Entity creation and update timestamps |
144144
| ↳ `CreateTime` | string | Entity creation timestamp |
145145
| ↳ `LastUpdatedTime` | string | Entity last-updated timestamp |
146-
| ↳ `Name` | string | Item name |
146+
| ↳ `Name` | string | Account or item name |
147147
| ↳ `SubAccount` | boolean | Whether this is a subaccount |
148-
| ↳ `ParentRef` | json | Parent item or category reference |
148+
| ↳ `ParentRef` | json | Parent account, item, or category reference |
149149
| ↳ `value` | string | QuickBooks entity ID |
150150
| ↳ `name` | string | QuickBooks entity display name |
151-
| ↳ `FullyQualifiedName` | string | Hierarchical qualified item name |
151+
| ↳ `FullyQualifiedName` | string | Hierarchical qualified account or item name |
152152
| ↳ `Classification` | string | Account classification |
153153
| ↳ `AccountType` | string | Account type |
154154
| ↳ `AccountSubType` | string | Account subtype |
155155
| ↳ `CurrentBalance` | number | Account current balance |
156-
| ↳ `CurrencyRef` | json | Vendor currency reference |
156+
| ↳ `CurrencyRef` | json | Account, customer, or vendor currency reference |
157157
| ↳ `value` | string | QuickBooks entity ID |
158158
| ↳ `name` | string | QuickBooks entity display name |
159-
| ↳ `DisplayName` | string | Employee display name |
160-
| ↳ `CompanyName` | string | Vendor company name |
159+
| ↳ `DisplayName` | string | Customer, vendor, or employee display name |
160+
| ↳ `CompanyName` | string | Customer or vendor company name |
161161
| ↳ `GivenName` | string | Given name |
162162
| ↳ `FamilyName` | string | Family name |
163-
| ↳ `Taxable` | boolean | Whether the item is taxable |
164-
| ↳ `PrimaryEmailAddr` | json | Employee primary email address |
165-
| ↳ `PrimaryPhone` | json | Employee primary phone number |
166-
| ↳ `BillAddr` | json | Vendor billing address |
163+
| ↳ `Taxable` | boolean | Taxable status for the customer or item |
164+
| ↳ `PrimaryEmailAddr` | json | Customer, vendor, or employee primary email address |
165+
| ↳ `PrimaryPhone` | json | Customer, vendor, or employee primary phone number |
166+
| ↳ `BillAddr` | json | Customer or vendor billing address |
167167
| ↳ `ShipAddr` | json | Customer shipping address |
168-
| ↳ `Balance` | number | Vendor balance |
168+
| ↳ `Balance` | number | Customer or vendor balance |
169169
| ↳ `PrintOnCheckName` | string | Name printed on checks |
170170
| ↳ `Vendor1099` | boolean | Whether the vendor is tracked for 1099 reporting |
171171
| ↳ `AcctNum` | string | Vendor account number |

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import type {
4343
QuickBooksUpdateItemParams,
4444
QuickBooksUpdateVendorParams,
4545
} from '@/tools/quickbooks/types'
46+
import { QUICKBOOKS_MASTER_DATA_PROPERTIES } from '@/tools/quickbooks/types'
4647
import { quickbooksUpdateCustomerTool } from '@/tools/quickbooks/update_customer'
4748
import { quickbooksUpdateItemTool } from '@/tools/quickbooks/update_item'
4849
import { quickbooksUpdateVendorTool } from '@/tools/quickbooks/update_vendor'
@@ -1079,5 +1080,24 @@ describe('QuickBooks tool and block boundaries', () => {
10791080
]) {
10801081
expect(section).toContain(`\`${output}\``)
10811082
}
1083+
1084+
const neutralDescriptions = {
1085+
Name: 'Account or item name',
1086+
ParentRef: 'Parent account, item, or category reference',
1087+
FullyQualifiedName: 'Hierarchical qualified account or item name',
1088+
CurrencyRef: 'Account, customer, or vendor currency reference',
1089+
DisplayName: 'Customer, vendor, or employee display name',
1090+
CompanyName: 'Customer or vendor company name',
1091+
Taxable: 'Taxable status for the customer or item',
1092+
PrimaryEmailAddr: 'Customer, vendor, or employee primary email address',
1093+
PrimaryPhone: 'Customer, vendor, or employee primary phone number',
1094+
BillAddr: 'Customer or vendor billing address',
1095+
Balance: 'Customer or vendor balance',
1096+
} as const
1097+
1098+
for (const [field, description] of Object.entries(neutralDescriptions)) {
1099+
expect(QUICKBOOKS_MASTER_DATA_PROPERTIES[field]?.description).toBe(description)
1100+
expect(section).toContain(description)
1101+
}
10821102
})
10831103
})

‎apps/sim/tools/quickbooks/types.ts‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,59 @@ export const QUICKBOOKS_MASTER_DATA_PROPERTIES: Record<string, OutputProperty> =
775775
...QUICKBOOKS_VENDOR_PROPERTIES,
776776
...QUICKBOOKS_ITEM_PROPERTIES,
777777
...QUICKBOOKS_EMPLOYEE_PROPERTIES,
778+
Name: { type: 'string', description: 'Account or item name', optional: true },
779+
ParentRef: {
780+
type: 'json',
781+
description: 'Parent account, item, or category reference',
782+
optional: true,
783+
properties: QUICKBOOKS_REFERENCE_PROPERTIES,
784+
},
785+
FullyQualifiedName: {
786+
type: 'string',
787+
description: 'Hierarchical qualified account or item name',
788+
optional: true,
789+
},
790+
CurrencyRef: {
791+
type: 'json',
792+
description: 'Account, customer, or vendor currency reference',
793+
optional: true,
794+
properties: QUICKBOOKS_REFERENCE_PROPERTIES,
795+
},
796+
DisplayName: {
797+
type: 'string',
798+
description: 'Customer, vendor, or employee display name',
799+
optional: true,
800+
},
801+
CompanyName: {
802+
type: 'string',
803+
description: 'Customer or vendor company name',
804+
optional: true,
805+
},
806+
Taxable: {
807+
type: 'boolean',
808+
description: 'Taxable status for the customer or item',
809+
optional: true,
810+
},
811+
PrimaryEmailAddr: {
812+
type: 'json',
813+
description: 'Customer, vendor, or employee primary email address',
814+
optional: true,
815+
},
816+
PrimaryPhone: {
817+
type: 'json',
818+
description: 'Customer, vendor, or employee primary phone number',
819+
optional: true,
820+
},
821+
BillAddr: {
822+
type: 'json',
823+
description: 'Customer or vendor billing address',
824+
optional: true,
825+
},
826+
Balance: {
827+
type: 'number',
828+
description: 'Customer or vendor balance',
829+
optional: true,
830+
},
778831
}
779832

780833
export const QUICKBOOKS_SALES_TRANSACTION_PROPERTIES: Record<string, OutputProperty> = {

0 commit comments

Comments
 (0)