cxtms 1.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +384 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4784 -0
- package/dist/cli.js.map +1 -0
- package/dist/extractUtils.d.ts +11 -0
- package/dist/extractUtils.d.ts.map +1 -0
- package/dist/extractUtils.js +19 -0
- package/dist/extractUtils.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +129 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/schemaLoader.d.ts +17 -0
- package/dist/utils/schemaLoader.d.ts.map +1 -0
- package/dist/utils/schemaLoader.js +134 -0
- package/dist/utils/schemaLoader.js.map +1 -0
- package/dist/validator.d.ts +72 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +432 -0
- package/dist/validator.js.map +1 -0
- package/dist/workflowValidator.d.ts +103 -0
- package/dist/workflowValidator.d.ts.map +1 -0
- package/dist/workflowValidator.js +753 -0
- package/dist/workflowValidator.js.map +1 -0
- package/package.json +51 -0
- package/schemas/actions/all.json +27 -0
- package/schemas/actions/clipboard.json +46 -0
- package/schemas/actions/confirm.json +21 -0
- package/schemas/actions/consoleLog.json +16 -0
- package/schemas/actions/dialog.json +25 -0
- package/schemas/actions/fileDownload.json +16 -0
- package/schemas/actions/forEach.json +31 -0
- package/schemas/actions/if.json +12 -0
- package/schemas/actions/mutation.json +25 -0
- package/schemas/actions/navigate.json +18 -0
- package/schemas/actions/navigateBack.json +22 -0
- package/schemas/actions/navigateBackOrClose.json +21 -0
- package/schemas/actions/notification.json +19 -0
- package/schemas/actions/openBarcodeScanner.json +104 -0
- package/schemas/actions/query.json +32 -0
- package/schemas/actions/refresh.json +13 -0
- package/schemas/actions/resetDirtyState.json +22 -0
- package/schemas/actions/setFields.json +21 -0
- package/schemas/actions/setStore.json +13 -0
- package/schemas/actions/validateForm.json +15 -0
- package/schemas/actions/workflow.json +24 -0
- package/schemas/components/README.md +147 -0
- package/schemas/components/appComponent.json +58 -0
- package/schemas/components/barcodeScanner.json +69 -0
- package/schemas/components/button.json +123 -0
- package/schemas/components/calendar.json +489 -0
- package/schemas/components/card.json +176 -0
- package/schemas/components/collection.json +54 -0
- package/schemas/components/dataGrid.json +119 -0
- package/schemas/components/datasource.json +151 -0
- package/schemas/components/dropdown.json +57 -0
- package/schemas/components/field-collection.json +618 -0
- package/schemas/components/field.json +265 -0
- package/schemas/components/form.json +234 -0
- package/schemas/components/index.json +71 -0
- package/schemas/components/layout.json +69 -0
- package/schemas/components/module.json +167 -0
- package/schemas/components/navDropdown.json +36 -0
- package/schemas/components/navbar.json +78 -0
- package/schemas/components/navbarItem.json +28 -0
- package/schemas/components/navbarLink.json +36 -0
- package/schemas/components/row.json +31 -0
- package/schemas/components/slot.json +30 -0
- package/schemas/components/tab.json +34 -0
- package/schemas/components/tabs.json +35 -0
- package/schemas/components/timeline.json +172 -0
- package/schemas/components/timelineGrid.json +328 -0
- package/schemas/fields/README.md +66 -0
- package/schemas/fields/attachment.json +156 -0
- package/schemas/fields/autocomplete-googleplaces.json +130 -0
- package/schemas/fields/checkbox.json +82 -0
- package/schemas/fields/date.json +88 -0
- package/schemas/fields/datetime.json +75 -0
- package/schemas/fields/email.json +75 -0
- package/schemas/fields/index.json +53 -0
- package/schemas/fields/number.json +91 -0
- package/schemas/fields/password.json +70 -0
- package/schemas/fields/radio.json +94 -0
- package/schemas/fields/rangedatetime.json +56 -0
- package/schemas/fields/select-async.json +334 -0
- package/schemas/fields/select.json +115 -0
- package/schemas/fields/tel.json +79 -0
- package/schemas/fields/text.json +86 -0
- package/schemas/fields/textarea.json +95 -0
- package/schemas/fields/time.json +91 -0
- package/schemas/fields/url.json +74 -0
- package/schemas/schema.graphql +12248 -0
- package/schemas/schemas.json +610 -0
- package/schemas/workflows/activity.json +96 -0
- package/schemas/workflows/common/condition.json +48 -0
- package/schemas/workflows/common/expression.json +76 -0
- package/schemas/workflows/common/mapping.json +173 -0
- package/schemas/workflows/common/step.json +38 -0
- package/schemas/workflows/flow/aggregation.json +44 -0
- package/schemas/workflows/flow/entity.json +129 -0
- package/schemas/workflows/flow/state.json +105 -0
- package/schemas/workflows/flow/transition.json +143 -0
- package/schemas/workflows/input.json +122 -0
- package/schemas/workflows/output.json +61 -0
- package/schemas/workflows/schedule.json +26 -0
- package/schemas/workflows/tasks/accounting-transaction.json +95 -0
- package/schemas/workflows/tasks/action-event.json +65 -0
- package/schemas/workflows/tasks/all.json +152 -0
- package/schemas/workflows/tasks/appmodule.json +56 -0
- package/schemas/workflows/tasks/attachment.json +97 -0
- package/schemas/workflows/tasks/authentication.json +86 -0
- package/schemas/workflows/tasks/caching.json +68 -0
- package/schemas/workflows/tasks/charge.json +92 -0
- package/schemas/workflows/tasks/commodity.json +92 -0
- package/schemas/workflows/tasks/contact-address.json +72 -0
- package/schemas/workflows/tasks/contact-payment-method.json +72 -0
- package/schemas/workflows/tasks/contact.json +82 -0
- package/schemas/workflows/tasks/csv.json +81 -0
- package/schemas/workflows/tasks/document-render.json +105 -0
- package/schemas/workflows/tasks/document-send.json +84 -0
- package/schemas/workflows/tasks/edi.json +157 -0
- package/schemas/workflows/tasks/email-send.json +110 -0
- package/schemas/workflows/tasks/error.json +72 -0
- package/schemas/workflows/tasks/export.json +90 -0
- package/schemas/workflows/tasks/filetransfer.json +102 -0
- package/schemas/workflows/tasks/flow-transition.json +68 -0
- package/schemas/workflows/tasks/foreach.json +69 -0
- package/schemas/workflows/tasks/generic.json +47 -0
- package/schemas/workflows/tasks/graphql.json +78 -0
- package/schemas/workflows/tasks/httpRequest.json +161 -0
- package/schemas/workflows/tasks/import.json +64 -0
- package/schemas/workflows/tasks/inventory.json +67 -0
- package/schemas/workflows/tasks/job.json +88 -0
- package/schemas/workflows/tasks/log.json +73 -0
- package/schemas/workflows/tasks/map.json +58 -0
- package/schemas/workflows/tasks/movement.json +54 -0
- package/schemas/workflows/tasks/note.json +59 -0
- package/schemas/workflows/tasks/number.json +65 -0
- package/schemas/workflows/tasks/order-tracking-event.json +109 -0
- package/schemas/workflows/tasks/order.json +139 -0
- package/schemas/workflows/tasks/payment.json +85 -0
- package/schemas/workflows/tasks/pdf-document.json +60 -0
- package/schemas/workflows/tasks/postal-codes.json +92 -0
- package/schemas/workflows/tasks/resolve-timezone.json +65 -0
- package/schemas/workflows/tasks/setVariable.json +76 -0
- package/schemas/workflows/tasks/switch.json +75 -0
- package/schemas/workflows/tasks/template.json +73 -0
- package/schemas/workflows/tasks/tracking-event.json +137 -0
- package/schemas/workflows/tasks/transmission.json +185 -0
- package/schemas/workflows/tasks/unzip-file.json +68 -0
- package/schemas/workflows/tasks/user.json +70 -0
- package/schemas/workflows/tasks/validation.json +99 -0
- package/schemas/workflows/tasks/while.json +53 -0
- package/schemas/workflows/tasks/workflow-execute.json +82 -0
- package/schemas/workflows/trigger.json +90 -0
- package/schemas/workflows/variable.json +46 -0
- package/schemas/workflows/workflow.json +335 -0
- package/scripts/postinstall.js +291 -0
- package/scripts/setup-vscode.js +80 -0
- package/skills/cxtms-developer/SKILL.md +118 -0
- package/skills/cxtms-developer/ref-cli-auth.md +120 -0
- package/skills/cxtms-developer/ref-entity-accounting.md +180 -0
- package/skills/cxtms-developer/ref-entity-commodity.md +239 -0
- package/skills/cxtms-developer/ref-entity-contact.md +163 -0
- package/skills/cxtms-developer/ref-entity-geography.md +154 -0
- package/skills/cxtms-developer/ref-entity-job.md +77 -0
- package/skills/cxtms-developer/ref-entity-notification.md +85 -0
- package/skills/cxtms-developer/ref-entity-order-sub.md +160 -0
- package/skills/cxtms-developer/ref-entity-order.md +183 -0
- package/skills/cxtms-developer/ref-entity-organization.md +41 -0
- package/skills/cxtms-developer/ref-entity-rate.md +182 -0
- package/skills/cxtms-developer/ref-entity-shared.md +176 -0
- package/skills/cxtms-developer/ref-entity-warehouse.md +115 -0
- package/skills/cxtms-developer/ref-graphql-query.md +309 -0
- package/skills/cxtms-module-builder/SKILL.md +477 -0
- package/skills/cxtms-module-builder/ref-components-data.md +293 -0
- package/skills/cxtms-module-builder/ref-components-display.md +411 -0
- package/skills/cxtms-module-builder/ref-components-forms.md +369 -0
- package/skills/cxtms-module-builder/ref-components-interactive.md +317 -0
- package/skills/cxtms-module-builder/ref-components-layout.md +390 -0
- package/skills/cxtms-module-builder/ref-components-specialized.md +477 -0
- package/skills/cxtms-workflow-builder/SKILL.md +438 -0
- package/skills/cxtms-workflow-builder/ref-accounting.md +66 -0
- package/skills/cxtms-workflow-builder/ref-communication.md +169 -0
- package/skills/cxtms-workflow-builder/ref-entity.md +342 -0
- package/skills/cxtms-workflow-builder/ref-expressions-ncalc.md +128 -0
- package/skills/cxtms-workflow-builder/ref-expressions-template.md +161 -0
- package/skills/cxtms-workflow-builder/ref-filetransfer.md +80 -0
- package/skills/cxtms-workflow-builder/ref-flow.md +210 -0
- package/skills/cxtms-workflow-builder/ref-other.md +157 -0
- package/skills/cxtms-workflow-builder/ref-query.md +105 -0
- package/skills/cxtms-workflow-builder/ref-utilities.md +417 -0
- package/templates/module-configuration.yaml +44 -0
- package/templates/module-form.yaml +152 -0
- package/templates/module-grid.yaml +229 -0
- package/templates/module-select.yaml +139 -0
- package/templates/module.yaml +84 -0
- package/templates/workflow-api-tracking.yaml +189 -0
- package/templates/workflow-basic.yaml +76 -0
- package/templates/workflow-document.yaml +155 -0
- package/templates/workflow-entity-trigger.yaml +90 -0
- package/templates/workflow-ftp-edi.yaml +158 -0
- package/templates/workflow-ftp-tracking.yaml +161 -0
- package/templates/workflow-mcp-tool.yaml +112 -0
- package/templates/workflow-public-api.yaml +135 -0
- package/templates/workflow-scheduled-execute.yaml +75 -0
- package/templates/workflow-scheduled.yaml +125 -0
- package/templates/workflow-utility.yaml +96 -0
- package/templates/workflow-webhook.yaml +128 -0
- package/templates/workflow.yaml +140 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Accounting Transaction Entity Field Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- AccountingTransaction Fields
|
|
5
|
+
- Charge Entity
|
|
6
|
+
- Payment Entity
|
|
7
|
+
- Accounting Enums
|
|
8
|
+
- Accounting CustomValues
|
|
9
|
+
|
|
10
|
+
Field names as used in workflow expressions: `{{ entity.transactionNumber }}`, `{{ entity.customValues.myField }}`.
|
|
11
|
+
|
|
12
|
+
## AccountingTransaction Fields
|
|
13
|
+
|
|
14
|
+
### Scalar Fields
|
|
15
|
+
|
|
16
|
+
| Field | Type | Notes |
|
|
17
|
+
|-------|------|-------|
|
|
18
|
+
| `accountingTransactionId` | `int` | Primary key |
|
|
19
|
+
| `organizationId` | `int` | Tenant scope |
|
|
20
|
+
| `divisionId` | `int` | Division scope |
|
|
21
|
+
| `transactionNumber` | `string` | Business-facing number |
|
|
22
|
+
| `transactionDate` | `DateTime` | Date of transaction |
|
|
23
|
+
| `dueDate` | `DateTime` | Payment due date |
|
|
24
|
+
| `paidDate` | `DateTime?` | When fully paid |
|
|
25
|
+
| `accountingTransactionType` | `AccountingTransactionType` enum | Invoice, Bill, CreditMemo |
|
|
26
|
+
| `accountingTransactionStatus` | `AccountingTransactionStatus` enum | Open, Paid, Void |
|
|
27
|
+
| `amountDue` | `decimal` | Charges total minus payments |
|
|
28
|
+
| `amountPaid` | `decimal` | Sum of applied payments |
|
|
29
|
+
| `paidAs` | `PaidAs` enum | Prepaid, Collect |
|
|
30
|
+
| `isDraft` | `bool` | Not yet submitted |
|
|
31
|
+
| `note` | `string?` | |
|
|
32
|
+
| `accountId` | `int?` | FK to AccountingAccount |
|
|
33
|
+
| `applyToContactID` | `int?` | FK to Contact (customer/vendor) |
|
|
34
|
+
| `billToContactAddressId` | `int?` | FK to ContactAddress |
|
|
35
|
+
| `paymentTermsId` | `int?` | FK to PaymentTerm |
|
|
36
|
+
| `created` | `DateTime` | |
|
|
37
|
+
| `createdBy` | `string` | User ID |
|
|
38
|
+
| `lastModified` | `DateTime` | |
|
|
39
|
+
| `lastModifiedBy` | `string` | User ID |
|
|
40
|
+
|
|
41
|
+
### Navigation Properties
|
|
42
|
+
|
|
43
|
+
| Field | Type | Notes |
|
|
44
|
+
|-------|------|-------|
|
|
45
|
+
| `applyToContact` | `Contact` | Customer or vendor |
|
|
46
|
+
| `billToContactAddress` | `ContactAddress` | Billing address |
|
|
47
|
+
| `division` | `Division` | |
|
|
48
|
+
| `organization` | `Organization` | |
|
|
49
|
+
| `paymentTerm` | `PaymentTerm` | |
|
|
50
|
+
| `account` | `AccountingAccount` | |
|
|
51
|
+
| `createdUser` | `User` | |
|
|
52
|
+
| `updatedUser` | `User` | |
|
|
53
|
+
|
|
54
|
+
### Collection Properties
|
|
55
|
+
|
|
56
|
+
| Field | Type | Notes |
|
|
57
|
+
|-------|------|-------|
|
|
58
|
+
| `charges` | `[Charge]` | Via AccountingTransactionCharges join |
|
|
59
|
+
| `payments` | `[Payment]` | Via AccountingTransactionPayment join |
|
|
60
|
+
| `jobs` | `[Job]` | Via JobAccountingTransaction join |
|
|
61
|
+
|
|
62
|
+
### Computed/Resolved GraphQL Fields
|
|
63
|
+
|
|
64
|
+
| Field | Returns | Notes |
|
|
65
|
+
|-------|---------|-------|
|
|
66
|
+
| `getChargesTotalAmount` | `decimal` | Sum of non-void charges |
|
|
67
|
+
| `getAmountDue` | `decimal` | Charges total minus amountPaid |
|
|
68
|
+
| `getRelatedOrders(filter, orderBy)` | `[Order]` | Orders linked via charges |
|
|
69
|
+
| `getRelatedOrdersByOrderType(orderType)` | `[Order]` | Filtered by order type |
|
|
70
|
+
| `getRelatedOrderByOrderType(orderType)` | `Order` | First match |
|
|
71
|
+
| `changeHistory(startDate, endDate, maxResults)` | `[ChangeHistory]` | Audit trail |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Charge Entity
|
|
76
|
+
|
|
77
|
+
| Field | Type | Notes |
|
|
78
|
+
|-------|------|-------|
|
|
79
|
+
| `chargeId` | `int` | Primary key |
|
|
80
|
+
| `organizationId` | `int?` | |
|
|
81
|
+
| `description` | `string?` | |
|
|
82
|
+
| `chargeType` | `ChargeType` enum | Income, Expense, Credit |
|
|
83
|
+
| `chargeStatus` | `ChargeStatus` enum | Pending, Open, Posted, Paid, Void |
|
|
84
|
+
| `amount` | `decimal` | Calculated: `quantity * price` |
|
|
85
|
+
| `price` | `decimal` | Unit price |
|
|
86
|
+
| `quantity` | `decimal` | |
|
|
87
|
+
| `unit` | `string?` | e.g., "TV", "Pallet", "Kg" |
|
|
88
|
+
| `applyBy` | `ApplyBy` enum | Pieces, Weight, ChargeableWeight, Volume, Container, Calculated, FlatRate |
|
|
89
|
+
| `applyToContactId` | `int` | FK to Contact (who pays) |
|
|
90
|
+
| `paidAs` | `PaidAs` enum | Prepaid, Collect |
|
|
91
|
+
| `currencyId` | `int` | FK to Currency |
|
|
92
|
+
| `accountingItemId` | `int` | FK to AccountingItem |
|
|
93
|
+
| `salesTaxId` | `int?` | FK to SalesTax |
|
|
94
|
+
| `salesTaxRate` | `decimal` | |
|
|
95
|
+
| `salesTaxAmount` | `decimal` | Computed: `salesTaxRate * amount` |
|
|
96
|
+
| `totalAmount` | `decimal` | Computed: `amount + salesTaxAmount` |
|
|
97
|
+
| `showInDocuments` | `bool` | |
|
|
98
|
+
| `isConsolidated` | `bool` | |
|
|
99
|
+
| `allowAutomaticUpdate` | `bool` | |
|
|
100
|
+
| `note` | `string?` | |
|
|
101
|
+
| `rateId` | `int?` | FK to Rate |
|
|
102
|
+
| `customValues` | `Dictionary` | Own customValues |
|
|
103
|
+
|
|
104
|
+
**Navigation:** `applyToContact`, `currency`, `accountingItem`, `salesTax`, `rate`, `orders` (many-to-many)
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Payment Entity
|
|
109
|
+
|
|
110
|
+
| Field | Type | Notes |
|
|
111
|
+
|-------|------|-------|
|
|
112
|
+
| `paymentId` | `int` | Primary key |
|
|
113
|
+
| `organizationId` | `int` | |
|
|
114
|
+
| `divisionId` | `int` | |
|
|
115
|
+
| `applyToContactId` | `int` | FK to Contact |
|
|
116
|
+
| `amountReceived` | `decimal` | Total payment amount |
|
|
117
|
+
| `currencyId` | `int` | FK to Currency |
|
|
118
|
+
| `paymentDate` | `DateTime` | |
|
|
119
|
+
| `checkNumber` | `string` | |
|
|
120
|
+
| `memo` | `string` | |
|
|
121
|
+
| `accountingAccountId` | `int` | FK to AccountingAccount |
|
|
122
|
+
| `paymentStatus` | `PaymentStatus` enum | Posted=1, Void=2 |
|
|
123
|
+
| `customValues` | `Dictionary` | Own customValues |
|
|
124
|
+
|
|
125
|
+
**Navigation:** `applyToContact`, `currency`, `accountingAccount`, `division`, `organization`, `accountingTransactions` (many-to-many)
|
|
126
|
+
|
|
127
|
+
**Join entity `AccountingTransactionPayment`** has `amountApplied` field — the amount from this payment applied to a specific transaction.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Enums
|
|
132
|
+
|
|
133
|
+
### AccountingTransactionType
|
|
134
|
+
| Value | Int | Description |
|
|
135
|
+
|-------|-----|-------------|
|
|
136
|
+
| `Invoice` | 0 | Revenue — billed to customer |
|
|
137
|
+
| `Bill` | 1 | Expense — owed to vendor |
|
|
138
|
+
| `CreditMemo` | 2 | Credit adjustment |
|
|
139
|
+
|
|
140
|
+
### AccountingTransactionStatus
|
|
141
|
+
`Open=0`, `Paid=1`, `Void=2`
|
|
142
|
+
|
|
143
|
+
### ChargeType
|
|
144
|
+
`Income`, `Expense`, `Credit`
|
|
145
|
+
|
|
146
|
+
### ChargeStatus
|
|
147
|
+
`Pending`, `Open`, `Posted`, `Paid`, `Void`
|
|
148
|
+
|
|
149
|
+
### ApplyBy
|
|
150
|
+
`Pieces`, `Weight`, `ChargeableWeight`, `Volume`, `Container`, `Calculated`, `FlatRate`
|
|
151
|
+
|
|
152
|
+
### PaymentStatus
|
|
153
|
+
`Posted=1`, `Void=2`
|
|
154
|
+
|
|
155
|
+
### PaidAs
|
|
156
|
+
`Prepaid=0`, `Collect=1`
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## CustomValues
|
|
161
|
+
|
|
162
|
+
`Dictionary<string, object?>` stored as PostgreSQL `jsonb`. Present on:
|
|
163
|
+
- `AccountingTransaction.customValues`
|
|
164
|
+
- `Charge.customValues`
|
|
165
|
+
- `Payment.customValues`
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
# Access in workflow expressions
|
|
169
|
+
invoiceNumber: "{{ entity.transactionNumber }}"
|
|
170
|
+
customerName: "{{ entity.applyToContact.name }}"
|
|
171
|
+
customField: "{{ entity.customValues.myField }}"
|
|
172
|
+
|
|
173
|
+
# Charge access via collection
|
|
174
|
+
chargeAmount: "{{ entity.charges[0].amount }}"
|
|
175
|
+
|
|
176
|
+
# NCalc conditions
|
|
177
|
+
conditions:
|
|
178
|
+
- expression: "[entity.accountingTransactionStatus] = 'Open'"
|
|
179
|
+
- expression: "[entity.amountDue] > 0"
|
|
180
|
+
```
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Commodity Entity Field Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Commodity Scalar Fields
|
|
5
|
+
- Commodity Navigation Properties
|
|
6
|
+
- Commodity Collection Properties
|
|
7
|
+
- Commodity Computed/Resolved GraphQL Fields
|
|
8
|
+
- Commodity Container/Child Pattern (Self-Referencing)
|
|
9
|
+
- CommodityTrackingNumber Sub-Entity
|
|
10
|
+
- OrderCommodity Join Entity
|
|
11
|
+
- Commodity Enums
|
|
12
|
+
- Commodity CustomValues
|
|
13
|
+
- CommodityEvent (Bridge Entity)
|
|
14
|
+
|
|
15
|
+
Field names as used in workflow expressions: `{{ entity.description }}`, `{{ entity.customValues.myField }}`.
|
|
16
|
+
|
|
17
|
+
## Scalar Fields
|
|
18
|
+
|
|
19
|
+
| Field | Type | Notes |
|
|
20
|
+
|-------|------|-------|
|
|
21
|
+
| `commodityId` | `int` | Primary key |
|
|
22
|
+
| `organizationId` | `int` | Tenant scope |
|
|
23
|
+
| `description` | `string` | Required |
|
|
24
|
+
| `pieces` | `int` | Number of pieces |
|
|
25
|
+
| `quantity` | `int?` | Inner quantity per piece |
|
|
26
|
+
| `unit` | `string?` | Unit of measure (e.g., "TV", "Pallet", "Kg") |
|
|
27
|
+
| `note` | `string?` | |
|
|
28
|
+
| `serialNumber` | `string?` | Domain only (not in GraphQL) |
|
|
29
|
+
| `isDeleted` | `bool?` | Soft delete |
|
|
30
|
+
|
|
31
|
+
### Weight Fields
|
|
32
|
+
|
|
33
|
+
| Field | Type | Notes |
|
|
34
|
+
|-------|------|-------|
|
|
35
|
+
| `weight` | `decimal?` | Per piece (or total if `weightByTotal`) |
|
|
36
|
+
| `weightTotal` | `decimal?` | Calculated: `weight * pieces` |
|
|
37
|
+
| `weightUnit` | `WeightUnit` enum | Lb, Kg |
|
|
38
|
+
| `weightByTotal` | `bool` | When true, weight = sum of children |
|
|
39
|
+
|
|
40
|
+
### Dimension Fields
|
|
41
|
+
|
|
42
|
+
| Field | Type | Notes |
|
|
43
|
+
|-------|------|-------|
|
|
44
|
+
| `length` | `decimal?` | |
|
|
45
|
+
| `width` | `decimal?` | |
|
|
46
|
+
| `height` | `decimal?` | |
|
|
47
|
+
| `dimensionsUnit` | `DimensionsUnit` enum | In, Cm, M, Ft |
|
|
48
|
+
|
|
49
|
+
### Volume Fields
|
|
50
|
+
|
|
51
|
+
| Field | Type | Notes |
|
|
52
|
+
|-------|------|-------|
|
|
53
|
+
| `volumePiece` | `decimal?` | Calculated: `L * W * H` converted to volumeUnit |
|
|
54
|
+
| `volumeTotal` | `decimal?` | Calculated: `pieces * volumePiece` |
|
|
55
|
+
| `volumeUnit` | `VolumeUnit` enum | Ft, Vlb, Vkg, M, In, Cm |
|
|
56
|
+
|
|
57
|
+
### Value Fields
|
|
58
|
+
|
|
59
|
+
| Field | Type | Notes |
|
|
60
|
+
|-------|------|-------|
|
|
61
|
+
| `unitaryValue` | `decimal?` | Value per unit |
|
|
62
|
+
| `unitaryValueTotal` | `decimal?` | Calculated: `unitaryValue * quantity * pieces` |
|
|
63
|
+
| `valueByTotal` | `bool` | When true, value = sum of children |
|
|
64
|
+
|
|
65
|
+
### Foreign Keys
|
|
66
|
+
|
|
67
|
+
| Field | Type | Notes |
|
|
68
|
+
|-------|------|-------|
|
|
69
|
+
| `commodityStatusId` | `int?` | FK to CommodityStatus |
|
|
70
|
+
| `commodityTypeId` | `int?` | FK to CommodityType |
|
|
71
|
+
| `packageTypeId` | `int?` | FK to PackageType |
|
|
72
|
+
| `warehouseLocationId` | `int?` | FK — cascades to children |
|
|
73
|
+
| `containerCommodityId` | `int?` | FK self-ref (parent commodity) |
|
|
74
|
+
| `jobId` | `Guid?` | FK to Job |
|
|
75
|
+
| `inventoryItemId` | `int?` | FK to InventoryItem |
|
|
76
|
+
| `billToContactId` | `int?` | FK to Contact |
|
|
77
|
+
| `created` | `DateTime` | |
|
|
78
|
+
| `createdBy` | `string` | User ID |
|
|
79
|
+
| `lastModified` | `DateTime` | |
|
|
80
|
+
| `lastModifiedBy` | `string` | User ID |
|
|
81
|
+
|
|
82
|
+
## Navigation Properties
|
|
83
|
+
|
|
84
|
+
| Field | Type | Notes |
|
|
85
|
+
|-------|------|-------|
|
|
86
|
+
| `commodityStatus` | `CommodityStatus` | `.statusName`, `.statusStage` |
|
|
87
|
+
| `commodityType` | `CommodityType` | `.code`, `.description` |
|
|
88
|
+
| `packageType` | `PackageType` | `.name` |
|
|
89
|
+
| `warehouseLocation` | `WarehouseLocation` | |
|
|
90
|
+
| `containerCommodity` | `Commodity` | Parent commodity |
|
|
91
|
+
| `job` | `Job` | |
|
|
92
|
+
| `inventoryItem` | `InventoryItem` | |
|
|
93
|
+
| `billToContact` | `Contact` | |
|
|
94
|
+
| `createdUser` | `User` | |
|
|
95
|
+
| `updatedUser` | `User` | |
|
|
96
|
+
|
|
97
|
+
## Collection Properties
|
|
98
|
+
|
|
99
|
+
| Field | Type | Notes |
|
|
100
|
+
|-------|------|-------|
|
|
101
|
+
| `containerCommodities` | `[Commodity]` | Child commodities in this container |
|
|
102
|
+
| `orderCommodities` | `[OrderCommodity]` | Join to orders (has own `customValues`) |
|
|
103
|
+
| `commodityTrackingNumbers` | `[CommodityTrackingNumber]` | Tracking numbers |
|
|
104
|
+
| `commodityTags` | `[CommodityTag]` | Tags (has own `customValues`) |
|
|
105
|
+
| `allTags` | `[CommodityAllTagsView]` | View: includes inherited tags |
|
|
106
|
+
| `trackingEvents` | `[TrackingEvent]` | |
|
|
107
|
+
| `shipments` | `[Order]` | Related orders (GraphQL) |
|
|
108
|
+
|
|
109
|
+
## Computed/Resolved GraphQL Fields
|
|
110
|
+
|
|
111
|
+
| Field | Returns | Notes |
|
|
112
|
+
|-------|---------|-------|
|
|
113
|
+
| `totalAmount` | `decimal` | Computed: `unitaryValue * quantity` |
|
|
114
|
+
| `packageTypeName` | `string` | From packageType.name |
|
|
115
|
+
| `trackingNumbers` | `[TrackingNumber]` | From commodityTrackingNumbers |
|
|
116
|
+
| `getChildCommodities(filter)` | `[Commodity]` | Child commodities |
|
|
117
|
+
| `getParentCommodity` | `Commodity` | Parent commodity |
|
|
118
|
+
| `getRelatedOrders(filter)` | `[Order]` | Related orders |
|
|
119
|
+
| `getRelatedOrder(filter)` | `Order` | First related order |
|
|
120
|
+
| `getCommodityTrackingNumber(idPropertyName)` | `TrackingNumber` | Lookup |
|
|
121
|
+
| `getCommodityAttachments(filter)` | `[Attachment]` | |
|
|
122
|
+
| `changeHistory(startDate, endDate, maxResults)` | `[ChangeHistory]` | Audit trail |
|
|
123
|
+
|
|
124
|
+
## Container/Child Pattern (Self-Referencing)
|
|
125
|
+
|
|
126
|
+
Commodities form a tree via `containerCommodityId`:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Container Commodity (parent)
|
|
130
|
+
├── Child Commodity 1
|
|
131
|
+
├── Child Commodity 2
|
|
132
|
+
└── Child Commodity 3
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- Parent → children: `containerCommodities` collection
|
|
136
|
+
- Child → parent: `containerCommodity` navigation
|
|
137
|
+
- When `weightByTotal=true`, weight is computed as sum of children
|
|
138
|
+
- Changing warehouse location on parent cascades to children
|
|
139
|
+
- Changing commodity status on parent cascades to children
|
|
140
|
+
- Deleting parent cascades to children
|
|
141
|
+
|
|
142
|
+
## CommodityTrackingNumber Sub-Entity
|
|
143
|
+
|
|
144
|
+
| Field | Type | Notes |
|
|
145
|
+
|-------|------|-------|
|
|
146
|
+
| `commodityTrackingNumberId` | `int` | PK |
|
|
147
|
+
| `trackingNumber` | `string` | |
|
|
148
|
+
| `trackingNumberType` | `string?` | BOL, PRO, PO, etc. |
|
|
149
|
+
| `isPrimary` | `bool` | |
|
|
150
|
+
| `syncOrderId` | `int?` | |
|
|
151
|
+
|
|
152
|
+
## OrderCommodity Join Entity
|
|
153
|
+
|
|
154
|
+
Links commodities to orders with per-association metadata:
|
|
155
|
+
|
|
156
|
+
| Field | Type | Notes |
|
|
157
|
+
|-------|------|-------|
|
|
158
|
+
| `commodityId` | `int` | |
|
|
159
|
+
| `orderId` | `int` | |
|
|
160
|
+
| `customValues` | `Dictionary` | **Own** customValues, separate from Commodity |
|
|
161
|
+
| `commodity` | `Commodity` | Navigation |
|
|
162
|
+
| `order` | `Order` | Navigation |
|
|
163
|
+
|
|
164
|
+
## Enums
|
|
165
|
+
|
|
166
|
+
### WeightUnit
|
|
167
|
+
`Lb`, `Kg`
|
|
168
|
+
|
|
169
|
+
### DimensionsUnit
|
|
170
|
+
`In`, `Cm`, `M`, `Ft`
|
|
171
|
+
|
|
172
|
+
### VolumeUnit
|
|
173
|
+
| Value | Description |
|
|
174
|
+
|-------|-------------|
|
|
175
|
+
| `Ft` | Cubic feet |
|
|
176
|
+
| `Vlb` | Volumetric lbs |
|
|
177
|
+
| `Vkg` | Volumetric kg |
|
|
178
|
+
| `M` | Cubic meters |
|
|
179
|
+
| `In` | Cubic inches |
|
|
180
|
+
| `Cm` | Cubic cm |
|
|
181
|
+
|
|
182
|
+
### CommodityStatusStage
|
|
183
|
+
`Pending=1`, `InProgress`, `Completed`
|
|
184
|
+
|
|
185
|
+
### CommodityStatus (enum, distinct from entity)
|
|
186
|
+
`Pending`, `OnRoute`, `Delivered`, `Cancelled`, `InQuote`, `OnHand`, `OnPacking`, `InTransit`
|
|
187
|
+
|
|
188
|
+
## CustomValues
|
|
189
|
+
|
|
190
|
+
`Dictionary<string, object?>` stored as PostgreSQL `jsonb`. Access in workflows:
|
|
191
|
+
|
|
192
|
+
```yaml
|
|
193
|
+
# Template expressions
|
|
194
|
+
value: "{{ entity.description }}"
|
|
195
|
+
value: "{{ entity.customValues.myField }}"
|
|
196
|
+
value: "{{ entity.containerCommodity.description }}"
|
|
197
|
+
|
|
198
|
+
# Access weight with unit conversion
|
|
199
|
+
weight: "{{ entity.weight }}"
|
|
200
|
+
|
|
201
|
+
# NCalc conditions
|
|
202
|
+
conditions:
|
|
203
|
+
- expression: "[entity.pieces] > 0 AND isNullOrEmpty([entity.customValues.lotNumber?]) = false"
|
|
204
|
+
|
|
205
|
+
# Update via Commodity/Update task
|
|
206
|
+
inputs:
|
|
207
|
+
commodityId: "{{ entity.commodityId }}"
|
|
208
|
+
commodity:
|
|
209
|
+
CustomValues.lotNumber: "LOT-001"
|
|
210
|
+
CustomValues.hazmat: true
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Entities with own customValues:**
|
|
214
|
+
- `Commodity.customValues` — commodity-level fields
|
|
215
|
+
- `OrderCommodity.customValues` — per-order-per-commodity fields
|
|
216
|
+
- `CommodityType.customValues` — type-level fields
|
|
217
|
+
- `CommodityTag.customValues` — tag-level fields
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## CommodityEvent (Bridge Entity)
|
|
222
|
+
|
|
223
|
+
Links tracking events to individual commodities for granular item-level tracking.
|
|
224
|
+
|
|
225
|
+
| Field | Type | Notes |
|
|
226
|
+
|-------|------|-------|
|
|
227
|
+
| `commodityEventId` | `int` | PK |
|
|
228
|
+
| `commodityId` | `int` | FK to Commodity |
|
|
229
|
+
| `trackingEventId` | `int` | FK to TrackingEvent |
|
|
230
|
+
|
|
231
|
+
**Navigation:** `commodity`, `trackingEvent` (with `eventDefinition`)
|
|
232
|
+
|
|
233
|
+
Used in Flow workflow aggregations:
|
|
234
|
+
```yaml
|
|
235
|
+
aggregations:
|
|
236
|
+
- name: "hasCommodityEvent"
|
|
237
|
+
parameter: "eventCode"
|
|
238
|
+
expression: "any([Commodity.CommodityEvents], [each.TrackingEvent.EventDefinition.EventCode] = [eventCode])"
|
|
239
|
+
```
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Contact Entity Field Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Contact Scalar Fields
|
|
5
|
+
- Contact Navigation Properties
|
|
6
|
+
- Contact Collection Properties
|
|
7
|
+
- Contact Computed/Resolved GraphQL Fields
|
|
8
|
+
- ContactType Enum
|
|
9
|
+
- ContactAddress Sub-Entity
|
|
10
|
+
- Contact Other Related Enums
|
|
11
|
+
- Contact CustomValues
|
|
12
|
+
|
|
13
|
+
Field names as used in workflow expressions: `{{ entity.name }}`, `{{ entity.customValues.myField }}`.
|
|
14
|
+
|
|
15
|
+
## Scalar Fields
|
|
16
|
+
|
|
17
|
+
| Field | Type | Notes |
|
|
18
|
+
|-------|------|-------|
|
|
19
|
+
| `contactId` | `int` | Primary key |
|
|
20
|
+
| `organizationId` | `int` | Tenant scope |
|
|
21
|
+
| `name` | `string` | Required. Company/display name |
|
|
22
|
+
| `contactFirstName` | `string?` | |
|
|
23
|
+
| `contactLastName` | `string?` | |
|
|
24
|
+
| `contactType` | `ContactType` enum | See enum below |
|
|
25
|
+
| `accountNumber` | `string?` | |
|
|
26
|
+
| `emailAddress` | `string?` | |
|
|
27
|
+
| `phoneNumber` | `string?` | |
|
|
28
|
+
| `mobilePhoneNumber` | `string?` | |
|
|
29
|
+
| `faxNumber` | `string?` | |
|
|
30
|
+
| `website` | `string?` | |
|
|
31
|
+
| `idNumber` | `string?` | EIN, DUNS, etc. |
|
|
32
|
+
| `idNumberType` | `IDNumberType?` enum | EIN, DUNS, ForeignEntityId, Other |
|
|
33
|
+
| `divisionId` | `int` | Primary division FK |
|
|
34
|
+
| `paymentTermId` | `int?` | FK to PaymentTerm |
|
|
35
|
+
| `creditLimit` | `decimal?` | |
|
|
36
|
+
| `paidAs` | `PaidAs?` enum | Prepaid, Collect |
|
|
37
|
+
| `isACorporation` | `bool?` | |
|
|
38
|
+
| `isDeleted` | `bool` | Soft delete flag |
|
|
39
|
+
| `contactStatusId` | `int?` | FK to ContactStatus |
|
|
40
|
+
| `entityTypeId` | `int?` | FK to EntityType |
|
|
41
|
+
| `parentContactId` | `int?` | Self-referencing FK |
|
|
42
|
+
| `tags` | `[string]` | String array |
|
|
43
|
+
| `created` | `DateTime` | |
|
|
44
|
+
| `createdBy` | `string` | User ID |
|
|
45
|
+
| `lastModified` | `DateTime` | |
|
|
46
|
+
| `lastModifiedBy` | `string` | User ID |
|
|
47
|
+
|
|
48
|
+
## Navigation Properties
|
|
49
|
+
|
|
50
|
+
| Field | Type | Notes |
|
|
51
|
+
|-------|------|-------|
|
|
52
|
+
| `division` | `Division` | Primary division |
|
|
53
|
+
| `paymentTerm` | `PaymentTerm` | |
|
|
54
|
+
| `contactStatus` | `ContactStatus` | `.statusName`, `.statusStage` (Active/Inactive) |
|
|
55
|
+
| `entityType` | `EntityType` | |
|
|
56
|
+
| `parentContact` | `Contact` | Self-referencing parent |
|
|
57
|
+
| `createdUser` | `User` | |
|
|
58
|
+
| `updatedUser` | `User` | |
|
|
59
|
+
|
|
60
|
+
## Collection Properties
|
|
61
|
+
|
|
62
|
+
| Field | Type | Notes |
|
|
63
|
+
|-------|------|-------|
|
|
64
|
+
| `contactAddresses` | `[ContactAddress]` | Addresses with types (Billing, Shipping, Other) |
|
|
65
|
+
| `contacts` | `[Contact]` | Linked contacts (TO this contact) |
|
|
66
|
+
| `linksToContacts` | `[Contact]` | Contacts this one links TO |
|
|
67
|
+
| `contactLinks` | `[ContactLink]` | Link details (type: ParentContact, FactoringCompany, SalesPerson) |
|
|
68
|
+
| `equipmentTypes` | `[EquipmentType]` | Carrier only |
|
|
69
|
+
| `discounts` | `[Discount]` | Via ContactDiscount join |
|
|
70
|
+
| `rates` | `[Rate]` | Carrier rates |
|
|
71
|
+
| `additionalDivisions` | `[Division]` | Beyond primary division |
|
|
72
|
+
| `orders` | `[Order]` | Via OrderCarrier |
|
|
73
|
+
|
|
74
|
+
## Computed/Resolved GraphQL Fields
|
|
75
|
+
|
|
76
|
+
| Field | Returns | Notes |
|
|
77
|
+
|-------|---------|-------|
|
|
78
|
+
| `getContactAddressByType(addressType)` | `[ContactAddress]` | Filter by "Billing", "Shipping", "Other" |
|
|
79
|
+
| `getFirstContactAddressByType(addressType)` | `ContactAddress` | First match |
|
|
80
|
+
| `getContactAttachments(filter, orderBy)` | `[Attachment]` | |
|
|
81
|
+
| `getCustomValuesAttachment(filter)` | `Attachment` | From customValues `attachmentId` key |
|
|
82
|
+
| `availableCredit` | `[AvailableCreditByCurrency]` | Carrier/Customer only |
|
|
83
|
+
| `changeHistory(startDate, endDate, maxResults)` | `[ChangeHistory]` | Audit trail |
|
|
84
|
+
|
|
85
|
+
## ContactType Enum
|
|
86
|
+
|
|
87
|
+
| Value | Int | Notes |
|
|
88
|
+
|-------|-----|-------|
|
|
89
|
+
| `Customer` | 1 | Can have accounting |
|
|
90
|
+
| `Carrier` | 2 | Can have accounting, equipment types |
|
|
91
|
+
| `Vendor` | 3 | |
|
|
92
|
+
| `Contact` | 4 | Generic, must have linked contact |
|
|
93
|
+
| `Driver` | 5 | |
|
|
94
|
+
| `Employee` | 6 | Can have user account |
|
|
95
|
+
| `SalesPerson` | 7 | |
|
|
96
|
+
| `ForwardingAgent` | 8 | |
|
|
97
|
+
| `FactoringCompany` | 9 | |
|
|
98
|
+
| `Lead` | 10 | |
|
|
99
|
+
| `PoolPoint` | 11 | |
|
|
100
|
+
| `DistributionCenter` | 12 | |
|
|
101
|
+
| `Store` | 13 | |
|
|
102
|
+
| `ContactUser` | 14 | User associated with contact |
|
|
103
|
+
| `USPPI` | 15 | US Principal Party in Interest |
|
|
104
|
+
|
|
105
|
+
## ContactAddress Sub-Entity
|
|
106
|
+
|
|
107
|
+
| Field | Type | Notes |
|
|
108
|
+
|-------|------|-------|
|
|
109
|
+
| `contactAddressId` | `int` | PK |
|
|
110
|
+
| `addressLine` | `string?` | |
|
|
111
|
+
| `addressLine2` | `string?` | |
|
|
112
|
+
| `addressType` | `AddressType` enum | Billing=1, Shipping=2, Other=3 |
|
|
113
|
+
| `cityName` | `string?` | |
|
|
114
|
+
| `countryCode` | `string?` | FK to Country |
|
|
115
|
+
| `stateCode` | `string?` | FK to State |
|
|
116
|
+
| `postalCode` | `string?` | |
|
|
117
|
+
| `isInactive` | `bool?` | |
|
|
118
|
+
| `latitude` | `double?` | From Location.Y (GraphQL resolved) |
|
|
119
|
+
| `longitude` | `double?` | From Location.X (GraphQL resolved) |
|
|
120
|
+
| `customValues` | `Dictionary` | Own customValues (separate from Contact) |
|
|
121
|
+
| `country` | `Country` | Navigation |
|
|
122
|
+
| `state` | `State` | Navigation |
|
|
123
|
+
|
|
124
|
+
GraphQL resolver: `formattedAddress(outputFormat, addressFormat, lang, multiline)` — formatted string.
|
|
125
|
+
|
|
126
|
+
## Other Related Enums
|
|
127
|
+
|
|
128
|
+
| Enum | Values |
|
|
129
|
+
|------|--------|
|
|
130
|
+
| `IDNumberType` | EIN, DUNS, ForeignEntityId, Other |
|
|
131
|
+
| `PaidAs` | Prepaid, Collect |
|
|
132
|
+
| `AddressType` | Billing=1, Shipping=2, Other=3 |
|
|
133
|
+
| `ContactLinkType` | ParentContact=1, FactoringCompany, SalesPerson, ContactAddressLink |
|
|
134
|
+
| `ContactStatusStage` | Active=0, Inactive=1 |
|
|
135
|
+
| `PaymentType` | Card=1, AccountCredit=2, Cash=3, Check=4, BankTransfer=5, Other=7 |
|
|
136
|
+
|
|
137
|
+
## CustomValues
|
|
138
|
+
|
|
139
|
+
`Dictionary<string, object?>` stored as PostgreSQL `jsonb`. Access in workflows:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
# Template expressions
|
|
143
|
+
value: "{{ entity.name }}"
|
|
144
|
+
value: "{{ entity.customValues.myField }}"
|
|
145
|
+
|
|
146
|
+
# Access contact address
|
|
147
|
+
address: "{{ entity.contactAddresses[0].addressLine }}"
|
|
148
|
+
|
|
149
|
+
# NCalc conditions
|
|
150
|
+
conditions:
|
|
151
|
+
- expression: "[entity.contactType] = 'Customer'"
|
|
152
|
+
|
|
153
|
+
# Update via Contact/Update task
|
|
154
|
+
inputs:
|
|
155
|
+
contactId: "{{ entity.contactId }}"
|
|
156
|
+
contact:
|
|
157
|
+
CustomValues.myField: "newValue"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Entities with own customValues:**
|
|
161
|
+
- `Contact.customValues` — contact-level custom fields
|
|
162
|
+
- `ContactAddress.customValues` — address-level custom fields
|
|
163
|
+
- `ContactPaymentMethod.customValues` — payment method custom fields
|