@cxtms/cx-schema 1.9.67 → 1.9.242

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.
Files changed (81) hide show
  1. package/dist/cli.js +43 -9
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +1 -1
  4. package/schemas/actions/all.json +5 -1
  5. package/schemas/actions/reload.json +17 -0
  6. package/schemas/actions/setSessionStorage.json +38 -0
  7. package/schemas/actions/sound.json +39 -0
  8. package/schemas/actions/vibrate.json +48 -0
  9. package/schemas/components/avatar.json +1 -0
  10. package/schemas/components/badge.json +79 -0
  11. package/schemas/components/barcodeScanner.json +28 -0
  12. package/schemas/components/camera.json +177 -0
  13. package/schemas/components/card.json +78 -0
  14. package/schemas/components/dashboard-widget.json +39 -0
  15. package/schemas/components/dashboard.json +46 -0
  16. package/schemas/components/dataGrid.json +15 -0
  17. package/schemas/components/field-collection.json +86 -2
  18. package/schemas/components/field.json +39 -4
  19. package/schemas/components/form.json +4 -0
  20. package/schemas/components/index.json +17 -1
  21. package/schemas/components/infoLine.json +1 -0
  22. package/schemas/components/map.json +167 -0
  23. package/schemas/components/module.json +32 -0
  24. package/schemas/components/planner.json +1 -0
  25. package/schemas/components/progressBar.json +1 -0
  26. package/schemas/components/timeline.json +216 -74
  27. package/schemas/components/timelineGrid.json +5 -1
  28. package/schemas/fields/autocomplete-googleplaces.json +2 -2
  29. package/schemas/fields/datetime.json +2 -2
  30. package/schemas/fields/index.json +4 -0
  31. package/schemas/fields/number-select.json +88 -0
  32. package/schemas/fields/rangedatetime.json +10 -2
  33. package/schemas/fields/select-async.json +2 -2
  34. package/schemas/fields/toggle.json +91 -0
  35. package/schemas/schema.graphql +11016 -12171
  36. package/schemas/schemas.json +131 -4
  37. package/schemas/workflows/flow/entity.json +3 -1
  38. package/schemas/workflows/input.json +1 -1
  39. package/schemas/workflows/output.json +1 -1
  40. package/schemas/workflows/tasks/all.json +9 -0
  41. package/schemas/workflows/tasks/commodity.json +8 -0
  42. package/schemas/workflows/tasks/contact-address.json +25 -0
  43. package/schemas/workflows/tasks/dispatch-routes.json +64 -0
  44. package/schemas/workflows/tasks/edi.json +15 -0
  45. package/schemas/workflows/tasks/export.json +21 -0
  46. package/schemas/workflows/tasks/httpRequest.json +4 -0
  47. package/schemas/workflows/tasks/import.json +5 -0
  48. package/schemas/workflows/tasks/order-move.json +38 -0
  49. package/schemas/workflows/tasks/order.json +6 -0
  50. package/schemas/workflows/tasks/organization-config.json +101 -0
  51. package/schemas/workflows/tasks/tracking-event.json +11 -3
  52. package/schemas/workflows/tasks/workflow-execute.json +4 -0
  53. package/schemas/workflows/variable.json +2 -2
  54. package/schemas/workflows/workflow.json +39 -2
  55. package/skills/cxtms-developer/SKILL.md +5 -2
  56. package/skills/cxtms-developer/ref-cli-auth.md +2 -0
  57. package/skills/cxtms-developer/ref-entity-commodity.md +41 -5
  58. package/skills/cxtms-developer/ref-entity-contact.md +46 -0
  59. package/skills/cxtms-developer/ref-entity-dispatch-routing.md +195 -0
  60. package/skills/cxtms-developer/ref-entity-geography.md +26 -1
  61. package/skills/cxtms-developer/ref-entity-job.md +6 -2
  62. package/skills/cxtms-developer/ref-entity-order-sub.md +1 -1
  63. package/skills/cxtms-developer/ref-entity-order.md +38 -3
  64. package/skills/cxtms-developer/ref-entity-organization.md +4 -2
  65. package/skills/cxtms-developer/ref-entity-shared.md +79 -3
  66. package/skills/cxtms-developer/ref-graphql-query.md +246 -4
  67. package/skills/cxtms-module-builder/SKILL.md +33 -6
  68. package/skills/cxtms-module-builder/ref-components-data.md +85 -0
  69. package/skills/cxtms-module-builder/ref-components-display.md +282 -8
  70. package/skills/cxtms-module-builder/ref-components-forms.md +386 -21
  71. package/skills/cxtms-module-builder/ref-components-interactive.md +2 -0
  72. package/skills/cxtms-module-builder/ref-components-layout.md +288 -29
  73. package/skills/cxtms-module-builder/ref-components-specialized.md +168 -20
  74. package/skills/cxtms-workflow-builder/SKILL.md +45 -6
  75. package/skills/cxtms-workflow-builder/ref-entity.md +100 -4
  76. package/skills/cxtms-workflow-builder/ref-expressions-ncalc.md +35 -2
  77. package/skills/cxtms-workflow-builder/ref-expressions-template.md +15 -1
  78. package/skills/cxtms-workflow-builder/ref-flow.md +6 -1
  79. package/skills/cxtms-workflow-builder/ref-query.md +16 -0
  80. package/skills/cxtms-workflow-builder/ref-utilities.md +32 -2
  81. package/templates/workflow-public-api.yaml +1 -0
@@ -42,7 +42,9 @@ aggregations: [...] # Optional
42
42
  Specifies which entity's lifecycle this flow manages.
43
43
 
44
44
  ### Valid Entity Names
45
- Order, Commodity, AccountingTransaction, Workflow, OrganizationConfig, Contact, AppModule, Attachment, OrderCommodity, TrackingEvent, JobOrder
45
+ Order, Commodity, AccountingTransaction, Workflow, OrganizationConfig, Contact, AppModule, Attachment, OrderCommodity, TrackingEvent, JobOrder, OrderMove, DispatchRoute
46
+
47
+ `OrderMove` and `DispatchRoute` flows resolve target statuses by name within the current organization. A transition updates `OrderMoveStatusId` or `DispatchRouteStatusId`; assigning the current status is a no-op.
46
48
 
47
49
  ### Entity Types (required for specific entities)
48
50
 
@@ -162,10 +164,13 @@ states:
162
164
  priority: 1
163
165
  ```
164
166
 
167
+ For Order-triggered auto-transitions, `order.orderStatusName` is available in the lightweight trigger payload and is loaded before trigger mapping when the navigation property was not already present.
168
+
165
169
  **Cross-entity resolution:**
166
170
  | Triggering Entity | Flow Entity | Resolution |
167
171
  |-------------------|-------------|------------|
168
172
  | Order | Commodity | Via `OrderCommodities` join table |
173
+ | Commodity | Order | Via `OrderCommodities` join table; evaluates each distinct related order, then applies the Flow's Order subtype filter |
169
174
 
170
175
  ### From States
171
176
  - Single state: `from: Draft`
@@ -30,6 +30,19 @@ Executes internal GraphQL queries against the CX backend. The query runs via Med
30
30
 
31
31
  The query result is a dictionary. The `mapping` path extracts from the result. Output stored at `ActivityName.GetOrder.order`.
32
32
 
33
+ GraphQL `filter` and `orderBy` strings support custom-value join expressions, including terminal, contact-address, and vessel references registered by the backend:
34
+
35
+ ```graphql
36
+ orders(
37
+ organizationId: $organizationId
38
+ orderBy: "customValues.deliveryLocationId->contactAddress.name"
39
+ filter: "customValues.returnLocationId->contactAddress.name:Chicago*"
40
+ filter: "customValues.vesselId->vessel.name:Ever*"
41
+ ) { items { orderId orderNumber } }
42
+ ```
43
+
44
+ Supported join aliases include `contact`, `order`, `modeOfTransportation`, `country`, `terminal`, and `contactAddress`.
45
+
33
46
  **Notes**:
34
47
  - `organizationId` is always available as a system variable
35
48
  - Variables support template expressions: `"{{ int organizationId }}"`
@@ -77,12 +90,14 @@ If validation fails and `continueOnError` is false (default), execution stops an
77
90
  ## Workflow/Execute
78
91
 
79
92
  Executes a child workflow. Can run sync (wait for result) or async (fire and forget).
93
+ Pass `executionId` when the call represents a retryable business operation; it is treated as an idempotency key, so duplicate attempts return the original result instead of re-running the child workflow.
80
94
 
81
95
  ```yaml
82
96
  - task: "Workflow/Execute@1"
83
97
  name: RunChild
84
98
  inputs:
85
99
  workflowId: "<uuid>"
100
+ executionId: "{{ inputs.operationId? }}"
86
101
  workflowInputs:
87
102
  orderId: "{{ inputs.orderId }}"
88
103
  customerId: "{{ Data.GetOrder.order.customer.contactId }}"
@@ -91,6 +106,7 @@ Executes a child workflow. Can run sync (wait for result) or async (fire and for
91
106
  The child workflow's outputs are available as step outputs: `ActivityName.RunChild.outputName`.
92
107
 
93
108
  **Circular call detection**: The executor maintains a call stack and throws if a workflow calls itself recursively.
109
+ **Idempotency**: Reuse an `executionId` only for retries of the same workflow operation. A reused ID for another workflow or organization is rejected.
94
110
 
95
111
  ## Workflow/Create, Workflow/Update, Workflow/Delete
96
112
 
@@ -155,6 +155,9 @@ Performs HTTP requests to external APIs.
155
155
  inputs:
156
156
  url: "{{ apiBaseUrl }}/api/v1/orders"
157
157
  method: POST
158
+ params:
159
+ status: "active"
160
+ limit: 10
158
161
  contentType: "application/json"
159
162
  headers:
160
163
  - name: "Authorization"
@@ -166,6 +169,8 @@ Performs HTTP requests to external APIs.
166
169
  mapping: "response?.body?"
167
170
  ```
168
171
 
172
+ **`params`** (optional): Dictionary of URL query parameters. Keys and values are automatically URL-encoded and appended to the URL. Use when the query string comes from workflow variables rather than being hardcoded in the URL.
173
+
169
174
  **Response structure**: The task returns a `Dictionary<string, object>` (case-insensitive) with key `response`. The response contains `StatusCode`, `Headers`, and `Body` (PascalCase in C#, but access is case-insensitive). Use `response?.body?` to get the parsed body. You can drill deeper: `response?.body?.output?`, `response?.body?.items?[0]?`.
170
175
 
171
176
  **Case sensitivity**: Variable paths go through `Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)` — so `body` and `Body` both work. Convention: use lowercase `body`.
@@ -297,11 +302,19 @@ Exports data to file format.
297
302
  inputs:
298
303
  data: "{{ Data?.GetOrders?.result?.items? }}"
299
304
  format: "csv"
305
+ headers: ["orderNumber", "firstTrackingNumber"]
306
+ columnMappings:
307
+ orderNumber: "Order #"
308
+ firstTrackingNumber: "First Tracking #"
309
+ exportTemplates:
310
+ firstTrackingNumber: "shipments?[0]?.trackingNumber?"
300
311
  outputs:
301
312
  - name: file
302
313
  mapping: "file?"
303
314
  ```
304
315
 
316
+ **Computed export columns:** `exportTemplates` is an optional map of output header name → NCalc expression. Expressions are evaluated against each original row before the export record is written. Use null-safe paths for nested/collection data, e.g. `oceanShipments?[0]?.trackingNumber?`. `columnMappings` controls display labels; `exportTemplates` controls values.
317
+
305
318
  ## Import@1
306
319
 
307
320
  Imports data from file content or URL. Supports `file://` URLs for local files (e.g. from UnzipFile output).
@@ -317,6 +330,23 @@ Imports data from file content or URL. Supports `file://` URLs for local files (
317
330
  mapping: "data?"
318
331
  ```
319
332
 
333
+ Use `columnMappings` when inbound CSV/XLSX headers do not match the internal field paths. Keys are the field paths workflows should consume; values are the headers present in the file.
334
+
335
+ ```yaml
336
+ - task: "Utilities/Import@1"
337
+ name: ImportMappedData
338
+ inputs:
339
+ fileUrl: "{{ inputs.fileUrl }}"
340
+ format: "csv"
341
+ columnMappings:
342
+ contact.name: "Customer Name"
343
+ contact.emailAddress: "Email"
344
+ customValues.externalId: "External ID"
345
+ outputs:
346
+ - name: data
347
+ mapping: "data?"
348
+ ```
349
+
320
350
  ```yaml
321
351
  # Import from local file (e.g. extracted from ZIP)
322
352
  - task: "Utilities/Import@1"
@@ -363,7 +393,7 @@ Groups a collection of dictionaries by one or more fields. Produces `{ key, valu
363
393
 
364
394
  ## Import Tasks
365
395
 
366
- Import tasks handle bulk data ingestion. All support `file://` URLs for chaining with UnzipFile.
396
+ Import tasks handle bulk data ingestion. All support `file://` URLs for chaining with UnzipFile. Dictionary-based imports skip empty cell values instead of overwriting existing data with blanks. Accounting Account, Accounting Item, Currency, Payment Term, and Sales Tax imports match by primary key first when an ID is present, then by configured key fields; matched rows are skipped unless `updateIfExists` is true.
367
397
 
368
398
  ### Order/Import@1
369
399
 
@@ -379,7 +409,7 @@ Imports postal/ZIP codes. Inputs: `organizationId`, `fileUrl`/`stream`/`postalCo
379
409
 
380
410
  ### TrackingEvent/Import@1
381
411
 
382
- Imports tracking events for an order. Inputs: `orderId`, `events`, `matchByFields` (default: `["eventDefinitionName", "eventDate"]`), `skipIfExists`, `createEventDefinitions`. Auto-links commodities via `CommodityId`.
412
+ Imports tracking events for exactly one order, dispatch route, or dispatch route stop. Inputs: one of `orderId` / `dispatchRouteId` / `dispatchRouteStopId`, `events`, `matchByFields` (default: `["eventDefinitionName", "eventDate"]`), `skipIfExists`, `createEventDefinitions`. Order targets can auto-link commodities; route and stop targets do not.
383
413
 
384
414
  ```yaml
385
415
  # Full ZIP-to-import pipeline
@@ -48,6 +48,7 @@ outputs:
48
48
  type: object
49
49
  description: "Order details"
50
50
  schema:
51
+ type: object
51
52
  properties:
52
53
  orderId:
53
54
  type: integer