@cxtms/cx-schema 1.7.17 → 1.8.1

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 (78) hide show
  1. package/.claude/skills/cx-core/SKILL.md +38 -20
  2. package/.claude/skills/cx-core/ref-entity-accounting.md +0 -7
  3. package/.claude/skills/cx-core/ref-entity-commodity.md +0 -12
  4. package/.claude/skills/cx-core/ref-entity-contact.md +0 -10
  5. package/.claude/skills/cx-core/ref-entity-geography.md +0 -9
  6. package/.claude/skills/cx-core/ref-entity-notification.md +85 -0
  7. package/.claude/skills/cx-core/ref-entity-order-sub.md +7 -7
  8. package/.claude/skills/cx-core/ref-entity-order.md +1 -14
  9. package/.claude/skills/cx-core/ref-entity-rate.md +0 -8
  10. package/.claude/skills/cx-core/ref-entity-shared.md +20 -9
  11. package/.claude/skills/cx-core/ref-entity-warehouse.md +0 -5
  12. package/.claude/skills/cx-module/SKILL.md +28 -103
  13. package/.claude/skills/cx-module/ref-components-data.md +0 -7
  14. package/.claude/skills/cx-module/ref-components-display.md +0 -13
  15. package/.claude/skills/cx-module/ref-components-forms.md +1 -6
  16. package/.claude/skills/cx-module/ref-components-interactive.md +0 -11
  17. package/.claude/skills/cx-module/ref-components-layout.md +0 -11
  18. package/.claude/skills/cx-module/ref-components-specialized.md +0 -50
  19. package/.claude/skills/cx-workflow/SKILL.md +21 -130
  20. package/.claude/skills/cx-workflow/ref-communication.md +0 -8
  21. package/.claude/skills/cx-workflow/ref-entity.md +62 -17
  22. package/.claude/skills/cx-workflow/ref-expressions.md +272 -0
  23. package/.claude/skills/cx-workflow/ref-flow.md +5 -11
  24. package/.claude/skills/cx-workflow/ref-other.md +33 -14
  25. package/.claude/skills/cx-workflow/ref-utilities.md +111 -14
  26. package/README.md +34 -34
  27. package/dist/cli.js +166 -2394
  28. package/dist/cli.js.map +1 -1
  29. package/dist/types.d.ts +0 -2
  30. package/dist/types.d.ts.map +1 -1
  31. package/dist/validator.d.ts +0 -8
  32. package/dist/validator.d.ts.map +1 -1
  33. package/dist/validator.js +2 -54
  34. package/dist/validator.js.map +1 -1
  35. package/dist/workflowValidator.d.ts +0 -4
  36. package/dist/workflowValidator.d.ts.map +1 -1
  37. package/dist/workflowValidator.js +2 -28
  38. package/dist/workflowValidator.js.map +1 -1
  39. package/package.json +2 -3
  40. package/schemas/actions/all.json +2 -1
  41. package/schemas/actions/clipboard.json +46 -0
  42. package/schemas/components/appComponent.json +0 -8
  43. package/schemas/components/module.json +2 -31
  44. package/schemas/components/timelineGrid.json +0 -4
  45. package/schemas/schemas.json +0 -12
  46. package/schemas/workflows/flow/entity.json +19 -0
  47. package/schemas/workflows/tasks/all.json +9 -0
  48. package/schemas/workflows/tasks/authentication.json +12 -26
  49. package/schemas/workflows/tasks/edi.json +93 -1
  50. package/schemas/workflows/tasks/httpRequest.json +4 -0
  51. package/schemas/workflows/tasks/order.json +45 -0
  52. package/schemas/workflows/tasks/resolve-timezone.json +65 -0
  53. package/schemas/workflows/tasks/transmission.json +185 -0
  54. package/schemas/workflows/tasks/unzip-file.json +68 -0
  55. package/schemas/workflows/variable.json +5 -1
  56. package/schemas/workflows/workflow.json +4 -0
  57. package/scripts/postinstall.js +1 -1
  58. package/templates/module-configuration.yaml +89 -23
  59. package/templates/module-form.yaml +3 -3
  60. package/templates/module-grid.yaml +3 -3
  61. package/templates/module-select.yaml +3 -3
  62. package/templates/module.yaml +2 -3
  63. package/templates/workflow-api-tracking.yaml +1 -1
  64. package/templates/workflow-basic.yaml +1 -1
  65. package/templates/workflow-document.yaml +1 -1
  66. package/templates/workflow-entity-trigger.yaml +1 -1
  67. package/templates/workflow-ftp-edi.yaml +1 -1
  68. package/templates/workflow-ftp-tracking.yaml +1 -1
  69. package/templates/workflow-mcp-tool.yaml +1 -1
  70. package/templates/workflow-public-api.yaml +1 -1
  71. package/templates/workflow-scheduled.yaml +1 -1
  72. package/templates/workflow-utility.yaml +1 -1
  73. package/templates/workflow-webhook.yaml +1 -1
  74. package/templates/workflow.yaml +1 -1
  75. package/.claude/skills/cx-core/ref-cli-auth.md +0 -120
  76. package/.claude/skills/cx-core/ref-graphql-query.md +0 -320
  77. package/.claude/skills/cx-workflow/ref-expressions-ncalc.md +0 -111
  78. package/.claude/skills/cx-workflow/ref-expressions-template.md +0 -148
@@ -1,16 +1,5 @@
1
1
  # Layout & Structure Components
2
2
 
3
- ## Contents
4
- - Layout component
5
- - Row component
6
- - Col component
7
- - Header component
8
- - Tabs component
9
- - Toolbar component
10
- - Card component
11
- - Line component
12
- - Slot component
13
-
14
3
  ## layout
15
4
 
16
5
  General-purpose container. Renders MUI Grid or Box with flexbox.
@@ -1,15 +1,5 @@
1
1
  # Specialized Components
2
2
 
3
- ## Contents
4
- - Calendar component
5
- - Notes component
6
- - Dashboard component
7
- - DashboardWidget component
8
- - Widget component
9
- - Timeline component
10
- - TimelineGrid component
11
- - OAuth2 component
12
-
13
3
  ## calendar
14
4
 
15
5
  FullCalendar integration with GraphQL event sources, timezone support, and programmatic control.
@@ -341,9 +331,7 @@ CSS Grid-based timeline with swim lanes, drill-down, and virtual scrolling.
341
331
  | `view` | `day \| week \| month \| year` | `week` | Time view |
342
332
  | `startDate` / `endDate` | `string` | — | Date range |
343
333
  | `eventSources` | `EventSource[]` | — | Event data sources |
344
- | `eventSources[].query.name` | `string` | `query1`, `query2`... | Source name, used as key in `summaryComponent` `dataSources` |
345
334
  | `eventTemplate` | `ComponentProps` | — | Custom event template |
346
- | `summaryComponent` | `ComponentProps` | — | Custom component rendered per column in the summary row. Replaces numeric totals when set. |
347
335
  | `options.height` | `string \| number` | `600` | Container height |
348
336
  | `options.cellHeight` | `number` | `60/100` | Cell height (px) |
349
337
  | `options.groupBy` | `string` | — | Field for swim lane grouping |
@@ -354,14 +342,6 @@ CSS Grid-based timeline with swim lanes, drill-down, and virtual scrolling.
354
342
  | `options.showWeekends` | `boolean` | `true` | Show weekends |
355
343
  | `options.showTotalCount` | `boolean` | `false` | Show event totals |
356
344
 
357
- **Summary component variables** (available when `summaryComponent` is set):
358
- | Variable | Type | Description |
359
- |----------|------|-------------|
360
- | `dataSources` | `Record<string, TimelineEvent[]>` | Per-source events filtered to the column, keyed by `query.name` |
361
- | `column` | `ColumnDefinition` | Column metadata (`id`, `label`, `date`, `startDate`, `endDate`) |
362
- | `columnIndex` | `number` | Zero-based column index |
363
- | `totalCount` | `number` | Total event count for the column across all sources |
364
-
365
345
  **Events:**
366
346
  | Event | Data | Description |
367
347
  |-------|------|-------------|
@@ -407,36 +387,6 @@ props:
407
387
  props: { date: "{{ date }}", assignee: "{{ row }}" }
408
388
  ```
409
389
 
410
- **Summary component example** (per-source breakdown per column):
411
- ```yaml
412
- component: timeline-grid
413
- props:
414
- view: week
415
- options: { height: 600, enableNavigation: true }
416
- eventSources:
417
- - query:
418
- name: ups
419
- command: "query($s:String!,$e:String!){ upsShipments(start:$s,end:$e){ id date title } }"
420
- variables: { s: "{{ startDate }}", e: "{{ endDate }}" }
421
- path: upsShipments
422
- - query:
423
- name: fedex
424
- command: "query($s:String!,$e:String!){ fedexShipments(start:$s,end:$e){ id date title } }"
425
- variables: { s: "{{ startDate }}", e: "{{ endDate }}" }
426
- path: fedexShipments
427
- summaryComponent:
428
- component: layout
429
- props:
430
- direction: column
431
- children:
432
- - component: text
433
- props: { value: "UPS: {{ dataSources.ups.length }}" }
434
- - component: text
435
- props: { value: "FedEx: {{ dataSources.fedex.length }}" }
436
- - component: text
437
- props: { value: "Total: {{ totalCount }}" }
438
- ```
439
-
440
390
  ---
441
391
 
442
392
  ## oauth2
@@ -1,36 +1,27 @@
1
1
  ---
2
2
  name: cx-workflow
3
- description: >
4
- Works with CXTMS workflow YAML files — creates, modifies, fixes, validates, and deploys standard process and Flow state machine workflows.
5
- Use when the user asks to create, modify, or fix a workflow YAML file, references workflow/*.yaml files, or asks about workflow tasks/triggers/activities in a CX project.
6
- Not for module YAML files, TypeScript code, or non-YAML tasks.
3
+ description: Generate schema-valid CargoXplorer workflow YAML files (standard process and Flow state machine workflows)
7
4
  argument-hint: <description of what to build>
8
5
  ---
9
6
 
10
7
  You are a CargoXplorer workflow YAML builder. You generate schema-valid YAML for CX workflows — both standard process workflows (activities, steps, triggers) and Flow state machine workflows (entity lifecycle, states, transitions). All output must conform to the JSON schemas in `.cx-schema/`.
11
8
 
12
- **IMPORTANT — use `cxtms` for all workflow operations:**
13
- - **Scaffold**: `npx cxtms create workflow <name> --template <template>` — generates a schema-valid YAML file. ALWAYS run this first, then read the generated file, then customize. Do NOT write YAML from scratch or copy templates manually.
14
- - **Validate**: `npx cxtms <file.yaml>` — run after every change
15
- - **Schema lookup**: `npx cxtms schema <task>` — e.g., `cxtms schema graphql`, `cxtms schema foreach`, `cxtms schema action-event`. Schema names use kebab-case file names. Case-insensitive: `ActionEvent` resolves to `action-event`.
16
- - **Examples**: `npx cxtms example <task>` — show example YAML for a task
17
- - **List schemas**: `npx cxtms list --type workflow` — shows all available task schemas in the Tasks section
18
- - **Feature folder**: `npx cxtms create workflow <name> --template <template> --feature <feature-name>`
19
- - **Deploy to server**: `npx cxtms workflow deploy <file.yaml> --org <id>` — creates or updates workflow on the CX server
20
- - **Undeploy from server**: `npx cxtms workflow undeploy <workflowId> --org <id>` — removes a workflow by UUID
21
- - **Execute**: `npx cxtms workflow execute <workflowId|file.yaml> --org <id> [--vars '<json>'] [--file varName=path]` — trigger a workflow execution (--file uploads a local file and passes the URL as a variable)
22
- - **List logs**: `npx cxtms workflow logs <workflowId|file.yaml> --org <id> [--from YYYY-MM-DD] [--to YYYY-MM-DD]` — list executions with log availability
23
- - **Download log**: `npx cxtms workflow log <executionId> --org <id> [--json] [--console] [--output <file>]` — download execution log
24
- - **Publish all**: `npx cxtms publish [--feature <name>] --org <id>` — deploy all modules and workflows to the server
9
+ **IMPORTANT — use `cx-cli` for all workflow operations:**
10
+ - **Scaffold**: `npx cx-cli create workflow <name> --template <template>` — generates a schema-valid YAML file. ALWAYS run this first, then read the generated file, then customize. Do NOT write YAML from scratch or copy templates manually.
11
+ - **Validate**: `npx cx-cli <file.yaml>` — run after every change
12
+ - **Schema lookup**: `npx cx-cli schema <task>` — e.g., `cx-cli schema graphql`, `cx-cli schema foreach`, `cx-cli schema action-event`. Schema names use kebab-case file names. Case-insensitive: `ActionEvent` resolves to `action-event`.
13
+ - **Examples**: `npx cx-cli example <task>` — show example YAML for a task
14
+ - **List schemas**: `npx cx-cli list --type workflow` — shows all available task schemas in the Tasks section
15
+ - **Feature folder**: `npx cx-cli create workflow <name> --template <template> --feature <feature-name>`
25
16
 
26
17
  ## Generation Workflow
27
18
 
28
19
  ### Step 1: Scaffold via CLI — MANDATORY
29
20
 
30
- **You MUST run `cxtms create workflow` to generate the initial file.** Do not skip this step. Do not write YAML from scratch. Do not read template files and copy them manually. The CLI generates correct UUIDs, file paths, and structure.
21
+ **You MUST run `cx-cli create workflow` to generate the initial file.** Do not skip this step. Do not write YAML from scratch. Do not read template files and copy them manually. The CLI generates correct UUIDs, file paths, and structure.
31
22
 
32
23
  ```bash
33
- npx cxtms create workflow <name> --template <template>
24
+ npx cx-cli create workflow <name> --template <template>
34
25
  ```
35
26
 
36
27
  | Template | Use Case |
@@ -80,7 +71,7 @@ npx cxtms create workflow <name> --template <template>
80
71
  ### Step 4: Validate
81
72
 
82
73
  ```bash
83
- npx cxtms <generated-file.yaml>
74
+ npx cx-cli <generated-file.yaml>
84
75
  ```
85
76
 
86
77
  ### File Placement
@@ -191,8 +182,7 @@ events: # Workflow-level event handlers
191
182
 
192
183
  ## Variable References (quick summary)
193
184
 
194
- For template expressions and value directives: see [ref-expressions-template.md](.claude/skills/cx-workflow/ref-expressions-template.md)
195
- For NCalc conditions and functions: see [ref-expressions-ncalc.md](.claude/skills/cx-workflow/ref-expressions-ncalc.md)
185
+ For full reference: `!cat .claude/skills/cx-workflow/ref-expressions.md`
196
186
 
197
187
  **`{{ path }}`** — in step inputs. Single `{{ }}` returns raw object. Multiple returns string interpolation.
198
188
  **`[variable]`** — in conditions and `expression:` directives. NCalc syntax.
@@ -279,13 +269,13 @@ Implicit variable: `iteration` (zero-based).
279
269
 
280
270
  | Category | Tasks | Load Reference |
281
271
  |----------|-------|----------------|
282
- | Utilities | SetVariable, Log, Error, HttpRequest, Map, Template, Import, Export, CsvParse | `!cat .claude/skills/cx-workflow/ref-utilities.md` |
272
+ | Utilities | SetVariable, Log, Error, HttpRequest, Map, Template, Import, Export, CsvParse, UnzipFile | `!cat .claude/skills/cx-workflow/ref-utilities.md` |
283
273
  | Query & Workflow | Query/GraphQL, Validation, Workflow/Execute | `!cat .claude/skills/cx-workflow/ref-query.md` |
284
- | Entity CRUD | Order, Contact, Commodity, Job, Charge, Discount, Inventory, Movement | `!cat .claude/skills/cx-workflow/ref-entity.md` |
274
+ | Entity CRUD | Order, Contact, Commodity, Job, Charge, Discount, Inventory, Movement, Transmission | `!cat .claude/skills/cx-workflow/ref-entity.md` |
285
275
  | Communication | Email/Send, Document/Render, Attachment, PdfDocument/Merge | `!cat .claude/skills/cx-workflow/ref-communication.md` |
286
276
  | File Transfer | Connect, Disconnect, ListFiles, Download, Upload, Move, Delete | `!cat .claude/skills/cx-workflow/ref-filetransfer.md` |
287
277
  | Accounting | AccountingTransaction, Payment, Number/Generate, SequenceNumber | `!cat .claude/skills/cx-workflow/ref-accounting.md` |
288
- | Other | User, Auth, Caching, EDI, Flow/Transition, Notes, AppModule, ActionEvent | `!cat .claude/skills/cx-workflow/ref-other.md` |
278
+ | Other | User, Auth, Caching, X12/Parse, EDIFACT, Flow/Transition, Notes, AppModule, ActionEvent | `!cat .claude/skills/cx-workflow/ref-other.md` |
289
279
 
290
280
  ## Entity Field Reference (cx-core)
291
281
 
@@ -295,8 +285,7 @@ Implicit variable: `iteration` (zero-based).
295
285
 
296
286
  | Reference | Load |
297
287
  |-----------|------|
298
- | Template Expressions & Value Directives | `!cat .claude/skills/cx-workflow/ref-expressions-template.md` |
299
- | NCalc Expressions & Functions | `!cat .claude/skills/cx-workflow/ref-expressions-ncalc.md` |
288
+ | Expressions & Functions | `!cat .claude/skills/cx-workflow/ref-expressions.md` |
300
289
  | Flow Workflows (state machines) | `!cat .claude/skills/cx-workflow/ref-flow.md` |
301
290
 
302
291
  ## Dynamic Schema Access (load on demand)
@@ -318,117 +307,19 @@ Implicit variable: `iteration` (zero-based).
318
307
 
319
308
  ---
320
309
 
321
- ## Server Workflow Commands
310
+ ## Debugging Workflow Executions
322
311
 
323
- Deploy, undeploy, and release commands are listed in the CLI section at the top of this file. For authentication setup (login, PAT tokens, org management): see [cx-core/ref-cli-auth.md](.claude/skills/cx-core/ref-cli-auth.md)
324
-
325
- ### Releasing App to GitHub
326
-
327
- Use `app release` to release modified workflows and modules from the CX server to a GitHub repository. This creates a branch and pull request — it does NOT push directly to the target branch.
312
+ When TMS MCP returns gzip file URLs for workflow execution logs, decompress with:
328
313
 
329
314
  ```bash
330
- # Release all unpublished changes to GitHub (creates a PR) message is required
331
- npx cxtms app release -m "Add order notification workflow"
332
-
333
- # Release specific workflows and/or modules by YAML file
334
- npx cxtms app release -m "Fix tracking workflow" workflows/my-workflow.yaml
335
- npx cxtms app release -m "Update shipping" workflows/a.yaml modules/b.yaml
336
-
337
- # Force release all workflows and modules (not just unpublished ones)
338
- npx cxtms app release -m "Full republish" --force
339
-
340
- # Release with explicit org
341
- npx cxtms app release -m "Add order notification workflow" --org 42
315
+ node -e "const https=require('https'),zlib=require('zlib'),fs=require('fs');https.get(process.argv[1],r=>r.pipe(zlib.createGunzip()).pipe(fs.createWriteStream(process.argv[2])))" "<url>" "<output-file>"
342
316
  ```
343
317
 
344
- **What `app release` does:**
345
- 1. Reads `app.yaml` for the `id` (appManifestId), repository, and branch
346
- 2. Increments the app version (patch bump)
347
- 3. Creates a `publish/{app-name}-v{version}-{timestamp}` branch on GitHub
348
- 4. Commits `app.yaml` + selected workflow/module YAML files to the branch
349
- 5. Creates a pull request from the publish branch to the target branch
350
- 6. Marks published workflows and modules as `hasUnpublishedChanges: false`
351
-
352
- **This is a release-to-git operation** — it commits the current server-side YAML directly to GitHub via the API. No local git repo is involved. The workflows and modules being released are taken from the CX server database, not from local files. The YAML file arguments only identify *which* items to include by their IDs.
353
-
354
- **Important:** Workflows and modules must be deployed to the TMS server before they can be released. Use `cxtms workflow deploy` or `cxtms appmodule deploy` first, then `cxtms app release` to commit them to GitHub.
355
-
356
- **Do NOT run `app release` automatically.** Only release when the user explicitly requests it. Releasing creates a branch and PR on GitHub, so it should be done once when all changes are ready — not after every deploy.
357
-
358
- **Prerequisites:**
359
- - `app.yaml` must exist with a valid `id` field
360
- - The app manifest must be installed on the server (`app install` first)
361
- - The server must have a GitHub token configured for the organization
362
- - The repository and branch must be set on the app manifest
363
-
364
- **Related commands:**
365
- - `npx cxtms app install` — install/refresh app from GitHub into the server
366
- - `npx cxtms app install --force` — force reinstall even if same version
367
- - `npx cxtms app install --branch develop` — install from a specific branch
368
- - `npx cxtms app install --skip-changed` — skip modules with local changes
369
- - `npx cxtms app list` — list installed app manifests on the server
370
-
371
- ### Execute
372
-
373
- ```bash
374
- # Execute a workflow by UUID or YAML file
375
- npx cxtms workflow execute <workflowId>
376
- npx cxtms workflow execute workflows/my-workflow.yaml
377
-
378
- # Pass input variables as JSON
379
- npx cxtms workflow execute <workflowId> --vars '{"city": "London", "count": 5}'
380
-
381
- # Upload a local file and pass its URL as a workflow variable
382
- npx cxtms workflow execute workflow.yaml --file importFile=/path/to/data.csv
383
-
384
- # Combine variables and file uploads
385
- npx cxtms workflow execute workflow.yaml --vars '{"mode": "preview"}' --file importFile=data.csv --file templateFile=template.xlsx
386
- ```
387
-
388
- `--file varName=path` uploads the local file to the server via presigned URL and sets the resulting URL as the named variable. Can be specified multiple times.
389
-
390
- Returns execution result including `executionId`, `isAsync`, `outputs` (for Sync workflows).
391
-
392
- ### Execution Logs
393
-
394
- ```bash
395
- # List executions with log availability (sorted desc by date)
396
- npx cxtms workflow logs <workflowId|file.yaml>
397
-
398
- # Filter by date range
399
- npx cxtms workflow logs <workflowId> --from 2026-01-01 --to 2026-01-31
400
-
401
- # Download a specific execution log (saves to temp dir by default)
402
- npx cxtms workflow log <executionId>
403
-
404
- # Save to specific file
405
- npx cxtms workflow log <executionId> --output mylog.txt
406
-
407
- # Print to stdout
408
- npx cxtms workflow log <executionId> --console
409
-
410
- # Download JSON log (richer data: inputs, outputs, timing, metadata)
411
- npx cxtms workflow log <executionId> --json
412
-
413
- # JSON log to stdout
414
- npx cxtms workflow log <executionId> --json --console
415
- ```
416
-
417
- `workflow logs` shows a table with execution status, date, duration, user, and log availability indicators (filled/empty circle). `workflow log` downloads the actual log content from the server (gzip-compressed S3 URLs).
418
-
419
- ### Debugging Tips
420
-
421
- - Use `--json` for detailed structured data (ExecutionId, Inputs, Outputs, Exception, timing)
422
- - Text logs show step-by-step execution trace with timestamps
423
- - Sync workflow executions may not appear in `workflow logs` — they return results inline
424
- - Use `workflow execute --vars` to test workflows with specific inputs
425
- - Use `workflow execute --file varName=path` to upload local files for workflows that expect file URL inputs
426
-
427
318
  ---
428
319
 
429
320
  ## Generation Rules
430
321
 
431
- 1. **Always scaffold via `cxtms create workflow` first** — never write YAML from scratch, never copy templates manually
322
+ 1. **Always scaffold via `cx-cli create workflow` first** — never write YAML from scratch, never copy templates manually
432
323
  2. **Naming conventions**: step names PascalCase, variables camelCase, states PascalCase, transitions camelCase
433
324
  3. **Template expressions** use `{{ expression }}` — NCalc conditions use `[variable]`
434
325
  4. **Do not change `workflowId` or `filePath`** — set correctly by CLI scaffold
@@ -436,4 +327,4 @@ npx cxtms workflow log <executionId> --json --console
436
327
  6. **Flow workflows** require `entity`, `states`, `transitions` (no `activities`)
437
328
  7. **Entity triggers** require `entityName` and `eventType`
438
329
  8. **Always use null-safe `?`** on variable paths — `Activity?.Step?.output?` — unless referencing guaranteed system variables (see Variable References section)
439
- 9. **Always validate** the final YAML: `npx cxtms <file.yaml>`
330
+ 9. **Always validate** the final YAML: `npx cx-cli <file.yaml>`
@@ -1,13 +1,5 @@
1
1
  # Communication & Document Tasks Reference
2
2
 
3
- ## Contents
4
- - Email/Send task (send emails with templates and attachments)
5
- - Email/VerifyCode task (send and verify email verification codes)
6
- - Document/Render task (render PDF or Excel from HTML templates)
7
- - Document/Send task (send a previously rendered document)
8
- - Attachment tasks (Create, Update, Thumbnail, PdfThumbnail, RegenerateThumbnails)
9
- - PdfDocument/Merge task (merge multiple PDFs into one)
10
-
11
3
  ## Email/Send
12
4
 
13
5
  Sends emails with optional templates and attachments.
@@ -1,22 +1,5 @@
1
1
  # Entity CRUD Tasks Reference
2
2
 
3
- ## Contents
4
- - Entity/Change task (generic entity modification in Before triggers)
5
- - Order tasks (Create, Update, Delete, Get, Copy, Split, Import, etc.)
6
- - Contact tasks (Create, Update, Delete)
7
- - ContactAddress tasks (Create, Update, Delete, Import)
8
- - ContactPaymentMethod tasks (Create, Update, SendChargedAmount, VerifyChargedAmount)
9
- - Commodity tasks (Create, Update, Split, Repack, Unpack)
10
- - CommodityTrackingNumber tasks (Create, Update, Delete)
11
- - Job tasks (Create, Update, Delete, Assign, Unassign)
12
- - Charge tasks (Create, Update, Delete, DynamicUpdate, Calculate)
13
- - Discount task (Update)
14
- - Order sub-entity tasks (OrderCommodity, OrderCharge, OrderDocument, OrderTrackingEvent, OrderEntity)
15
- - Inventory tasks (InventoryItem Create, Update, Delete)
16
- - Other entity tasks (Movement, Country, Cities, Rate, TrackingEvent/Import)
17
- - Note tasks (Create, Update, Delete, Import, Export, RenameThread)
18
- - AccountingTransaction/ApplyCredit task
19
-
20
3
  All entity tasks follow the `Namespace/Operation@Version` pattern. Outputs are stored as `ActivityName.StepName.outputKey`.
21
4
 
22
5
  ## Generic Entity Change
@@ -76,6 +59,8 @@ All entity tasks follow the `Namespace/Operation@Version` pattern. Outputs are s
76
59
  notes: "Updated by workflow"
77
60
  ```
78
61
 
62
+ **Order/Import commodity fields**: When importing commodities, you can supply `packageTypeName` (string) instead of `packageTypeId`. The import handler resolves the name to an ID using an N+1-safe per-import cache (one DB query per unique package type name).
63
+
79
64
  ## Contact
80
65
 
81
66
  | Task | Description |
@@ -247,6 +232,66 @@ Output `result`: `{ added, updated, skipped, failed, total, errors[] }`.
247
232
  | `Note/Export` | Export notes for an entity |
248
233
  | `Note/RenameThread` | Rename a note thread |
249
234
 
235
+ ## Transmission
236
+
237
+ | Task | Description |
238
+ |------|-------------|
239
+ | `Transmission/Create` | Create transmission record linked to orders |
240
+ | `Transmission/Update` | Update transmission fields (dynamic) |
241
+ | `Transmission/Delete` | Delete transmission record |
242
+
243
+ Records inbound/outbound message transmissions (EDI, API, Email, Webhook) linked to orders.
244
+
245
+ ```yaml
246
+ - task: "Transmission/Create@1"
247
+ name: CreateTransmission
248
+ inputs:
249
+ organizationId: "{{ int organizationId }}"
250
+ transmission:
251
+ orderIds: "{{ orderIds }}"
252
+ channel: "EDI"
253
+ direction: "Outbound"
254
+ messageType: "214"
255
+ sender: "{{ senderISA }}"
256
+ receiver: "{{ receiverISA }}"
257
+ status: "Pending"
258
+ endpoint: "{{ endpoint }}"
259
+ protocol: "SFTP"
260
+ outputs:
261
+ - name: transmission
262
+ mapping: "transmission"
263
+ ```
264
+
265
+ ```yaml
266
+ - task: "Transmission/Update@1"
267
+ name: UpdateTransmission
268
+ inputs:
269
+ organizationId: "{{ int organizationId }}"
270
+ transmissionId: "{{ int Main?.CreateTransmission?.transmission?.id? }}"
271
+ transmission:
272
+ status: "Sent"
273
+ completedAt: "{{ now() }}"
274
+ ```
275
+
276
+ ```yaml
277
+ - task: "Transmission/Delete@1"
278
+ name: DeleteTransmission
279
+ inputs:
280
+ organizationId: "{{ int organizationId }}"
281
+ transmissionId: "{{ int inputs.transmissionId }}"
282
+ outputs:
283
+ - name: success
284
+ mapping: "success"
285
+ ```
286
+
287
+ **Create inputs:** `organizationId` (int, required), `transmission` object — `orderIds` (required, at least one), `channel`, `direction` (Inbound/Outbound), `messageType`, `sender`, `receiver`, `status`, `endpoint`, `protocol`, `correlationId` (auto-generated if omitted), `parentId`, `httpStatus`, `byteSize`, `retryCount`, `maxRetries`, `nextRetryAt`, `errorCode`, `errorMessage`, `customValues`, `headers`, `payloadRef`, `scheduledAt`, `startedAt`, `completedAt`, `durationMs`.
288
+
289
+ **Create outputs:** `transmission` (full TransmissionDto).
290
+ **Update inputs:** `organizationId`, `transmissionId`, `transmission` (dynamic partial fields).
291
+ **Delete outputs:** `success` (boolean).
292
+
293
+ **Status enum:** Pending, InProgress, Sent, Received, Delivered, Acknowledged, Rejected, Error, RetryScheduled, Cancelled, Expired, Accepted.
294
+
250
295
  ## Accounting Transaction (Additional)
251
296
 
252
297
  | Task | Description |