@celigo/api-specs 0.2.3 → 0.2.4-IO-168454-EPIC-fb
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 +71 -80
- package/dist/account.yml +456 -55
- package/dist/agent.yml +15 -0
- package/dist/ai-agent.yml +1000 -192
- package/dist/alert.yml +1226 -0
- package/dist/api.yml +6375 -178
- package/dist/apim.yml +0 -4
- package/dist/asynchelper.yml +441 -62
- package/dist/audit.yml +57 -2
- package/dist/bartendertemplate.yml +508 -0
- package/dist/connection.yml +2533 -189
- package/dist/connector.yml +8 -0
- package/dist/ediprofile.yml +15 -0
- package/dist/editransaction.yml +250 -14
- package/dist/enduser.yml +6063 -47
- package/dist/environment.yml +8 -0
- package/dist/eventreport.yml +8 -0
- package/dist/export.yml +1624 -1804
- package/dist/filedefinition.yml +47 -0
- package/dist/filedefinitionrules.yml +722 -0
- package/dist/fileserver.yml +1457 -0
- package/dist/filestorage.yml +1087 -535
- package/dist/flow.yml +896 -209
- package/dist/guardrail.yml +310 -499
- package/dist/httpconnector.yml +8 -0
- package/dist/httpconnectorendpoint.yml +610 -126
- package/dist/httpconnectorresource.yml +1160 -84
- package/dist/iclient.yml +245 -114
- package/dist/import.yml +2583 -448
- package/dist/integration.yml +1114 -45
- package/dist/job.yml +188 -92
- package/dist/lookupcache.yml +45 -14
- package/dist/marketplace.yml +352 -107
- package/dist/mcp-oauth-provider.yml +15 -30
- package/dist/mcp-server.yml +7004 -68
- package/dist/networkpolicy.yml +1221 -0
- package/dist/notification.yml +59 -9
- package/dist/processor.yml +8 -3
- package/dist/recyclebin.yml +32 -2
- package/dist/script.yml +91 -16
- package/dist/stack.yml +642 -5
- package/dist/storagequery.yml +935 -0
- package/dist/subscription.yml +428 -67
- package/dist/sync.yml +435 -79
- package/dist/tag.yml +8 -0
- package/dist/template.yml +47 -1
- package/dist/tool.yml +7932 -3273
- package/dist/topic.yml +1806 -0
- package/dist/tradingpartnerconnector.yml +18 -0
- package/dist/user.yml +465 -42
- package/package.json +13 -1
- package/schemas.json +2358 -1887
package/dist/asynchelper.yml
CHANGED
|
@@ -505,7 +505,11 @@ components:
|
|
|
505
505
|
- For regular fields: Set to the exact property name (e.g., "firstName", "price", "isActive")
|
|
506
506
|
- For object fields: Set to the object property name, then add child mappings in the 'mappings' array
|
|
507
507
|
- For array fields: Set to the array property name, then configure 'buildArrayHelper'
|
|
508
|
-
-
|
|
508
|
+
- Two structural blanks: the inner array item of an array of arrays (it has no field name),
|
|
509
|
+
and the single top-level `objectarray` item of a `rows [ ]` mapping (the array output
|
|
510
|
+
structure — see the array's description). A child-bearing wrapper and a source-only row that
|
|
511
|
+
already exist in a saved document also stay unnamed when the tree is re-sent — filling in a
|
|
512
|
+
name changes the output; it does not complete the row
|
|
509
513
|
|
|
510
514
|
IMPORTANT: Do NOT use dot notation (e.g., "customer.firstName") in this field. Instead, create proper
|
|
511
515
|
hierarchical structure with nested mappings:
|
|
@@ -520,8 +524,9 @@ components:
|
|
|
520
524
|
}
|
|
521
525
|
```
|
|
522
526
|
|
|
523
|
-
When parsing existing mappings, empty
|
|
524
|
-
|
|
527
|
+
When parsing existing mappings, an empty `generate` inside a parent array is an inner array; an
|
|
528
|
+
empty `generate` on the ONLY top-level item, with `dataType: objectarray`, is the `rows [ ]` JSON
|
|
529
|
+
structure — array output, bound as `rows` in templates — and is intentional, not a missing name.
|
|
525
530
|
examples:
|
|
526
531
|
- name
|
|
527
532
|
- address
|
|
@@ -607,9 +612,11 @@ components:
|
|
|
607
612
|
This field supports THREE DISTINCT PATTERNS that are easily distinguished:
|
|
608
613
|
|
|
609
614
|
**1. json Path Syntax**
|
|
610
|
-
- MUST start with '
|
|
615
|
+
- MUST start with '$' — the record root. An object record is addressed as
|
|
616
|
+
'$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
|
|
611
617
|
- Used for precisely targeting data in structured JSON objects
|
|
612
|
-
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
|
|
618
|
+
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
|
|
619
|
+
'$[*].Tax' (every row of a grouped record)
|
|
613
620
|
- Wildcards like [*] extract multiple values/objects
|
|
614
621
|
|
|
615
622
|
```json
|
|
@@ -620,7 +627,8 @@ components:
|
|
|
620
627
|
- Contains '{{' and '}}' pattern
|
|
621
628
|
- Evaluated by the AFE 2.0 handlebars template engine
|
|
622
629
|
- Can include logic, formatting, and computation
|
|
623
|
-
- Access input record fields with {{record.fieldName}} notation
|
|
630
|
+
- Access input record fields with {{record.fieldName}} notation; a grouped
|
|
631
|
+
(array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
|
|
624
632
|
- Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
|
|
625
633
|
- Valid on `object`, `objectarray`, and primitive-array dataTypes as
|
|
626
634
|
well as scalars — the rendered template output must parse into the
|
|
@@ -631,7 +639,7 @@ components:
|
|
|
631
639
|
```
|
|
632
640
|
|
|
633
641
|
**3. Hard-Coded Value (literal string)**
|
|
634
|
-
- Does NOT start with '
|
|
642
|
+
- Does NOT start with '$'
|
|
635
643
|
- Does NOT contain handlebars '{{' syntax
|
|
636
644
|
- System treats it as a literal string value
|
|
637
645
|
- VERY COMMON for setting static/constant values
|
|
@@ -653,10 +661,38 @@ components:
|
|
|
653
661
|
- The system maintains this context even in deeply nested mappings
|
|
654
662
|
- For object mappings without child mappings, extract should return a complete object
|
|
655
663
|
- When both extract and mappings are defined for objects, extract is applied first
|
|
664
|
+
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
665
|
+
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
666
|
+
grouped saved searches) roots at the array, so its rows are addressed as
|
|
667
|
+
`$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
|
|
668
|
+
record's shape resolves to nothing without an error.
|
|
656
669
|
|
|
657
670
|
For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
|
|
658
671
|
For hard-coded values, simply use the literal string as the extract value.
|
|
659
672
|
x-celigo-ai-guidance:
|
|
673
|
+
- |-
|
|
674
|
+
## GROUPED (ARRAY) RECORDS
|
|
675
|
+
Decide the JSONPath root from the record's shape before writing
|
|
676
|
+
any extract. When the record is an array of rows, `$.field`,
|
|
677
|
+
`$.properties.field` and `$.rows[*].field` all resolve to
|
|
678
|
+
nothing — the processor still reports success and the request
|
|
679
|
+
body ships as `{}`. Address rows as `$[0].field` (that row's
|
|
680
|
+
value, typed) or `$[*].field` (every row: joined with commas
|
|
681
|
+
into a `string` destination; rejected with
|
|
682
|
+
`incompatible_destination_conversion` into a `number`
|
|
683
|
+
destination). Column labels with spaces work as
|
|
684
|
+
`$[*][Order Number]`, `$[*].[Order Number]`, or
|
|
685
|
+
`$[*]['Order Number']`. For one destination element per row
|
|
686
|
+
the two array kinds take different helper forms: a primitive
|
|
687
|
+
array (`stringarray` / `numberarray`) uses `buildArrayHelper:
|
|
688
|
+
[{"extract": "$[*].field"}]`; an `objectarray` uses
|
|
689
|
+
`buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
|
|
690
|
+
with the children addressing the row relatively (`$.field`,
|
|
691
|
+
`{{rows.field}}`). An `extract` placed directly on the
|
|
692
|
+
array-typed field yields nothing. Handlebars
|
|
693
|
+
extracts bind the array record as `rows` (`{{rows.0.field}}`),
|
|
694
|
+
an object record as `record`. The reverse holds too: `$[*]` on
|
|
695
|
+
an object record iterates the object's values, not rows.
|
|
660
696
|
- |-
|
|
661
697
|
## SIZE LIMIT
|
|
662
698
|
The platform's import save validator caps this field at **1024
|
|
@@ -738,7 +774,8 @@ components:
|
|
|
738
774
|
Explicit JSON `null` is itself a valid fallback: the destination field is written as
|
|
739
775
|
JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
|
|
740
776
|
action). Omitting the key entirely means no fallback — the field is left out of the
|
|
741
|
-
output when the extract is empty (the UI's "Do nothing" action).
|
|
777
|
+
output when the extract is empty (the UI's "Do nothing" action). Failing the record
|
|
778
|
+
instead is `conditional.when: fail_record_when_empty`, which excludes a default.
|
|
742
779
|
x-celigo-ai-guidance:
|
|
743
780
|
- |-
|
|
744
781
|
`"default": null` and `"default": ""` are distinct saved values, not
|
|
@@ -747,6 +784,12 @@ components:
|
|
|
747
784
|
Preserve them verbatim when editing or migrating a mapping — dropping
|
|
748
785
|
the key changes runtime behavior from "use null/empty string as
|
|
749
786
|
default value" to "do nothing" (field omitted from the output).
|
|
787
|
+
- |-
|
|
788
|
+
The four "Action to take if source field has no value" choices map to:
|
|
789
|
+
do nothing → no `default` key (optionally `conditional.when:
|
|
790
|
+
extract_not_empty`); use null → `"default": null`; use empty string or
|
|
791
|
+
a custom value → `"default": "<value>"`; cause the record to fail →
|
|
792
|
+
`conditional.when: fail_record_when_empty` with no `default` key.
|
|
750
793
|
examples:
|
|
751
794
|
- N/A
|
|
752
795
|
- '0'
|
|
@@ -914,7 +957,11 @@ components:
|
|
|
914
957
|
(`$.items[*]`), `"$"` (the record root), or omission — a
|
|
915
958
|
constructed entry (child `mappings` with the extract omitted or
|
|
916
959
|
`"$"`; the two spellings are equivalent) contributes exactly one
|
|
917
|
-
element, and entries append in order.
|
|
960
|
+
element, and entries append in order. On a grouped (array)
|
|
961
|
+
record the record itself is the array to iterate: `"$[*]"`
|
|
962
|
+
yields one `objectarray` element per row (children address the
|
|
963
|
+
row as `$.field`), and `"$[*].field"` yields one primitive-array
|
|
964
|
+
value per row. Indexed or comma-joined
|
|
918
965
|
entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
|
|
919
966
|
processor renders the entire destination array as null with no
|
|
920
967
|
validation error. To emit a fixed number of static elements, add
|
|
@@ -935,7 +982,9 @@ components:
|
|
|
935
982
|
|
|
936
983
|
**For Simple Arrays (stringarray, numberarray, booleanarray)**
|
|
937
984
|
- Only the 'extract' field is used to pull values
|
|
938
|
-
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values
|
|
985
|
+
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
|
|
986
|
+
on a grouped (array) record the record itself is the array, so the
|
|
987
|
+
path roots at it ($[*].name — one value per row)
|
|
939
988
|
- Each result is converted to the appropriate primitive type
|
|
940
989
|
```json
|
|
941
990
|
{
|
|
@@ -1037,11 +1086,13 @@ components:
|
|
|
1037
1086
|
- When both extract and mappings are provided, the system creates special composite objects
|
|
1038
1087
|
that maintain hierarchical context during processing
|
|
1039
1088
|
- This enables accessing both the current array element AND its parent context
|
|
1040
|
-
- An ITERATING entry's extract MUST
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1089
|
+
- An ITERATING entry's extract MUST be a JSON path that iterates an array:
|
|
1090
|
+
'$.items[*]' when the array is a field of an object record, or '$[*]'
|
|
1091
|
+
(objectarray) / '$[*].field' (primitive arrays) when the record itself is a
|
|
1092
|
+
grouped array of rows. A CONSTRUCTED entry (child mappings building one
|
|
1093
|
+
element) instead omits extract or sets it to exactly "$" — never rewrite "$"
|
|
1094
|
+
into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
|
|
1095
|
+
entire destination array as null without raising a validation error
|
|
1045
1096
|
- Each array helper entry acts independently, potentially adding multiple elements
|
|
1046
1097
|
|
|
1047
1098
|
The buildArrayHelper is the most complex part of the mappings system - always analyze the
|
|
@@ -1071,6 +1122,22 @@ components:
|
|
|
1071
1122
|
- $.order.lineItems[*]
|
|
1072
1123
|
- $.parents[*].children[*]
|
|
1073
1124
|
- $
|
|
1125
|
+
name:
|
|
1126
|
+
type: string
|
|
1127
|
+
maxLength: 200
|
|
1128
|
+
description: |
|
|
1129
|
+
Display label for this source object in the mapper, so the sources of
|
|
1130
|
+
an object array can be told apart instead of all showing as `$`.
|
|
1131
|
+
Has no effect at runtime; stored only when non-empty.
|
|
1132
|
+
x-celigo-ai-guidance:
|
|
1133
|
+
- |-
|
|
1134
|
+
Carry an existing `name` through every edit — it is the user's label
|
|
1135
|
+
for the tab, and an entry sent without it loses the label. Duplicate
|
|
1136
|
+
names across entries are allowed. Set one only when the user names
|
|
1137
|
+
the source object; never invent labels.
|
|
1138
|
+
examples:
|
|
1139
|
+
- Billing address
|
|
1140
|
+
- Shipping address
|
|
1074
1141
|
sourceDataType:
|
|
1075
1142
|
type: string
|
|
1076
1143
|
description: |
|
|
@@ -1119,17 +1186,31 @@ components:
|
|
|
1119
1186
|
type: object
|
|
1120
1187
|
description: |
|
|
1121
1188
|
Defines conditional rules for including each array element in the result.
|
|
1189
|
+
x-celigo-ai-guidance:
|
|
1190
|
+
- |-
|
|
1191
|
+
Judged against this entry's own `extract` (the array source). The
|
|
1192
|
+
design scopes the UI's tab-level "Action to take if source field has
|
|
1193
|
+
no value" to copy-as-is tabs (no child `mappings`); the API accepts
|
|
1194
|
+
`fail_record_when_empty` on a mapped entry as well, and the mapper
|
|
1195
|
+
processor honors it there — the record fails when that array is
|
|
1196
|
+
missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
|
|
1197
|
+
true`, message `<generate>: Source field has no value`; probed
|
|
1198
|
+
2026-10-09). Say so when writing it on a mapped entry: the user may
|
|
1199
|
+
not find the setting in the mapper's tab. To fail on an empty field
|
|
1200
|
+
inside each element, set the action on that child mapping instead.
|
|
1122
1201
|
properties:
|
|
1123
1202
|
when:
|
|
1124
1203
|
type: string
|
|
1125
1204
|
description: |
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1205
|
+
Condition judged on the entry's extract — skip the elements the
|
|
1206
|
+
extract does not return, or fail the whole record when the source
|
|
1207
|
+
array is missing or empty.
|
|
1129
1208
|
enum:
|
|
1130
1209
|
- extract_not_empty
|
|
1210
|
+
- fail_record_when_empty
|
|
1131
1211
|
x-enumDescriptions:
|
|
1132
|
-
extract_not_empty: Include
|
|
1212
|
+
extract_not_empty: Include an array element only when the extract returns a non-empty value for it
|
|
1213
|
+
fail_record_when_empty: Fail the record when the entry's source array is missing or empty
|
|
1133
1214
|
examples:
|
|
1134
1215
|
- extract_not_empty
|
|
1135
1216
|
mappings:
|
|
@@ -1229,6 +1310,20 @@ components:
|
|
|
1229
1310
|
extract: $.price
|
|
1230
1311
|
dataType: number
|
|
1231
1312
|
status: Active
|
|
1313
|
+
if:
|
|
1314
|
+
properties:
|
|
1315
|
+
conditional:
|
|
1316
|
+
properties:
|
|
1317
|
+
when:
|
|
1318
|
+
const: fail_record_when_empty
|
|
1319
|
+
required:
|
|
1320
|
+
- when
|
|
1321
|
+
required:
|
|
1322
|
+
- conditional
|
|
1323
|
+
then:
|
|
1324
|
+
not:
|
|
1325
|
+
required:
|
|
1326
|
+
- default
|
|
1232
1327
|
status:
|
|
1233
1328
|
type: string
|
|
1234
1329
|
description: |
|
|
@@ -1236,9 +1331,10 @@ components:
|
|
|
1236
1331
|
Required on every mapping entry. Controls whether the mapping is applied.
|
|
1237
1332
|
|
|
1238
1333
|
**Guidance**
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1334
|
+
Only `Active` rows run. `Draft` and `Inactive` rows keep their
|
|
1335
|
+
configuration, are saved with minimal validation, and are skipped at
|
|
1336
|
+
runtime and in preview; a non-Active parent skips its whole subtree
|
|
1337
|
+
whatever its children say. The API rejects a mapping missing this field
|
|
1242
1338
|
(validation error: "Mapping object must have status field present.").
|
|
1243
1339
|
x-celigo-ai-guidance:
|
|
1244
1340
|
- |-
|
|
@@ -1247,12 +1343,28 @@ components:
|
|
|
1247
1343
|
field validations. The value is case-sensitive. The API rejects:
|
|
1248
1344
|
- Missing field: `[status_field_absent] Mapping object must have status field present.`
|
|
1249
1345
|
- Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
|
|
1346
|
+
- |-
|
|
1347
|
+
`"Inactive"` is the user's "Set inactive" on a row: use it only when
|
|
1348
|
+
asked to disable or park a row, never to mean incomplete (that is
|
|
1349
|
+
`"Draft"`). Setting a parent `Inactive` means no `Active` row may
|
|
1350
|
+
remain under it — the save rejects an `Active` row under an
|
|
1351
|
+
`Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
|
|
1352
|
+
no message text) and never cascades or promotes on its own; `Draft`
|
|
1353
|
+
descendants are kept as they are, and a `Draft` parent does not gate
|
|
1354
|
+
its children. The UI's Set inactive on a parent marks the parent and
|
|
1355
|
+
every child `Inactive` (IO-166197). Re-enabling a child
|
|
1356
|
+
means re-enabling its ancestors in the same payload. Edits that keep
|
|
1357
|
+
existing rows must carry their stored status forward — rewriting a
|
|
1358
|
+
`Draft` or `Inactive` row to `Active` turns a row the user parked
|
|
1359
|
+
back on.
|
|
1250
1360
|
enum:
|
|
1251
1361
|
- Active
|
|
1252
1362
|
- Draft
|
|
1363
|
+
- Inactive
|
|
1253
1364
|
x-enumDescriptions:
|
|
1254
|
-
Active: The mapping is enabled and applied during processing
|
|
1255
|
-
Draft: In-progress mapping; saved without the Active-only field validations
|
|
1365
|
+
Active: The mapping is enabled and applied during processing
|
|
1366
|
+
Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
|
|
1367
|
+
Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
|
|
1256
1368
|
examples:
|
|
1257
1369
|
- Active
|
|
1258
1370
|
conditional:
|
|
@@ -1281,6 +1393,10 @@ components:
|
|
|
1281
1393
|
- `extract_not_empty`: Apply only when the extract field returns a value
|
|
1282
1394
|
Useful for conditional mapping based on input data availability
|
|
1283
1395
|
|
|
1396
|
+
- `fail_record_when_empty`: Fail the record when the extract field returns
|
|
1397
|
+
no value (the UI's "Cause record to fail" action when the source field
|
|
1398
|
+
has no value)
|
|
1399
|
+
|
|
1284
1400
|
**Example**
|
|
1285
1401
|
```json
|
|
1286
1402
|
{
|
|
@@ -1293,28 +1409,75 @@ components:
|
|
|
1293
1409
|
}
|
|
1294
1410
|
}
|
|
1295
1411
|
```
|
|
1412
|
+
x-celigo-ai-guidance:
|
|
1413
|
+
- |-
|
|
1414
|
+
`when` holds one value, and two different settings share it: the
|
|
1415
|
+
composite-import operation gate (`record_created` / `record_updated`,
|
|
1416
|
+
the UI's "Only perform mapping when") and the empty-source action
|
|
1417
|
+
(`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
|
|
1418
|
+
take if source field has no value"). A row cannot carry both — writing
|
|
1419
|
+
one replaces the other and the save succeeds, so a composite import
|
|
1420
|
+
row that needs both has to choose. Never author `fail_record_when_empty`
|
|
1421
|
+
on a row that already carries `record_created` or `record_updated`.
|
|
1296
1422
|
properties:
|
|
1297
1423
|
when:
|
|
1298
1424
|
type: string
|
|
1299
1425
|
description: |
|
|
1300
|
-
|
|
1301
|
-
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1426
|
+
Condition that gates this mapping — either an operation gate on a
|
|
1427
|
+
composite (create-or-update) import or the action to take when the
|
|
1428
|
+
extract returns no value. Empty means null, undefined or an empty
|
|
1429
|
+
string; `0`, `false` and whitespace are values.
|
|
1430
|
+
x-celigo-ai-guidance:
|
|
1431
|
+
- |-
|
|
1432
|
+
`fail_record_when_empty` is the fourth "Action to take if source field
|
|
1433
|
+
has no value" and is mutually exclusive with the other three: send it
|
|
1434
|
+
with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
|
|
1435
|
+
on the same row — or a `default` on a `buildArrayHelper` entry — is
|
|
1436
|
+
rejected at save with `[unsupported_mapping] "<key>" and conditional.when
|
|
1437
|
+
"fail_record_when_empty" cannot be present in mapping simultaneously.`
|
|
1438
|
+
(the lookup variant adds `Use lookup "allowFailures" instead.`);
|
|
1439
|
+
lookups fail through `allowFailures: false`, and a hard-coded row
|
|
1440
|
+
always has a value. At runtime an empty extract fails the record with
|
|
1441
|
+
an `errors[]` entry `{code: "extract_empty", fatal: true, source:
|
|
1442
|
+
"mapping", message: "<generate>: Source field has no value"}`
|
|
1443
|
+
("Input field has no value" in a Transformation 2.0); `0` and `false`
|
|
1444
|
+
are values and map through.
|
|
1304
1445
|
enum:
|
|
1305
1446
|
- record_created
|
|
1306
1447
|
- record_updated
|
|
1307
1448
|
- extract_not_empty
|
|
1449
|
+
- fail_record_when_empty
|
|
1308
1450
|
x-enumDescriptions:
|
|
1309
|
-
record_created: Apply this mapping only when creating a new record
|
|
1310
|
-
record_updated: Apply this mapping only when updating an existing record
|
|
1311
|
-
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
1451
|
+
record_created: Apply this mapping only when creating a new record
|
|
1452
|
+
record_updated: Apply this mapping only when updating an existing record
|
|
1453
|
+
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
1454
|
+
fail_record_when_empty: Fail the record when the extract field returns no value
|
|
1312
1455
|
examples:
|
|
1313
1456
|
- record_created
|
|
1314
1457
|
- record_updated
|
|
1315
1458
|
- extract_not_empty
|
|
1459
|
+
- fail_record_when_empty
|
|
1316
1460
|
required:
|
|
1317
1461
|
- dataType
|
|
1462
|
+
if:
|
|
1463
|
+
properties:
|
|
1464
|
+
conditional:
|
|
1465
|
+
properties:
|
|
1466
|
+
when:
|
|
1467
|
+
const: fail_record_when_empty
|
|
1468
|
+
required:
|
|
1469
|
+
- when
|
|
1470
|
+
required:
|
|
1471
|
+
- conditional
|
|
1472
|
+
then:
|
|
1473
|
+
not:
|
|
1474
|
+
anyOf:
|
|
1475
|
+
- required:
|
|
1476
|
+
- default
|
|
1477
|
+
- required:
|
|
1478
|
+
- lookupName
|
|
1479
|
+
- required:
|
|
1480
|
+
- hardCodedValue
|
|
1318
1481
|
Mappings:
|
|
1319
1482
|
type: array
|
|
1320
1483
|
description: |
|
|
@@ -1338,6 +1501,34 @@ components:
|
|
|
1338
1501
|
|
|
1339
1502
|
The system will process these nested structures recursively during runtime, ensuring proper construction
|
|
1340
1503
|
of complex hierarchical data while maintaining excellent performance.
|
|
1504
|
+
|
|
1505
|
+
On save, a leaf row with neither a source (`extract`, `hardCodedValue`, `lookupName`) nor a
|
|
1506
|
+
destination (`generate`) is dropped silently, at every nesting level, and so is an object or
|
|
1507
|
+
object-array row left with no source, no destination and no remaining child `mappings` or
|
|
1508
|
+
`buildArrayHelper` entries; a row with only one of the two, and a source-less, destination-less
|
|
1509
|
+
wrapper that still has children, are kept.
|
|
1510
|
+
|
|
1511
|
+
The shape of the array is the mapper's **JSON structure**. Named top-level items produce an object
|
|
1512
|
+
record (`record { }`). Exactly one top-level item with `dataType: objectarray` and no `generate` is
|
|
1513
|
+
the `rows [ ]` structure: the mapped record is an array — usually one element per element of the
|
|
1514
|
+
source array that root's `buildArrayHelper` iterates — Handlebars templates such as `http.body`
|
|
1515
|
+
bind it as `rows` instead of `record`, and the mapping editor shows that row's destination disabled.
|
|
1516
|
+
x-celigo-ai-guidance:
|
|
1517
|
+
- |-
|
|
1518
|
+
Rows that exist in the saved document — including `Draft` and `Inactive` rows and
|
|
1519
|
+
rows with only a source or only a destination — are the user's state: an edit that
|
|
1520
|
+
re-sends the tree must carry them through unchanged unless the user asked to change
|
|
1521
|
+
them. Only a row with neither source nor destination — and, for an object or
|
|
1522
|
+
object-array row, no remaining children — can be left out; the save would drop it
|
|
1523
|
+
anyway. A wrapper with children but no `generate` is kept by the save, so keep it.
|
|
1524
|
+
- |-
|
|
1525
|
+
A single unnamed top-level `objectarray` item is the `rows [ ]` JSON structure, not a
|
|
1526
|
+
missing destination: keep it unnamed when editing (naming it turns the output into an
|
|
1527
|
+
object, and a template that iterates `rows` then renders nothing), and author that
|
|
1528
|
+
shape only when the request body must be an array or a template iterates `rows`.
|
|
1529
|
+
The editor's save check accepts the unnamed root only in the `rows [ ]` structure;
|
|
1530
|
+
any other row with a source and no `generate` fails with "One or more destination
|
|
1531
|
+
field values not entered".
|
|
1341
1532
|
items:
|
|
1342
1533
|
type: object
|
|
1343
1534
|
properties:
|
|
@@ -1353,7 +1544,11 @@ components:
|
|
|
1353
1544
|
- For regular fields: Set to the exact property name (e.g., "firstName", "price", "isActive")
|
|
1354
1545
|
- For object fields: Set to the object property name, then add child mappings in the 'mappings' array
|
|
1355
1546
|
- For array fields: Set to the array property name, then configure 'buildArrayHelper'
|
|
1356
|
-
-
|
|
1547
|
+
- Two structural blanks: the inner array item of an array of arrays (it has no field name),
|
|
1548
|
+
and the single top-level `objectarray` item of a `rows [ ]` mapping (the array output
|
|
1549
|
+
structure — see the array's description). A child-bearing wrapper and a source-only row that
|
|
1550
|
+
already exist in a saved document also stay unnamed when the tree is re-sent — filling in a
|
|
1551
|
+
name changes the output; it does not complete the row
|
|
1357
1552
|
|
|
1358
1553
|
IMPORTANT: Do NOT use dot notation (e.g., "customer.firstName") in this field. Instead, create proper
|
|
1359
1554
|
hierarchical structure with nested mappings:
|
|
@@ -1368,8 +1563,9 @@ components:
|
|
|
1368
1563
|
}
|
|
1369
1564
|
```
|
|
1370
1565
|
|
|
1371
|
-
When parsing existing mappings, empty
|
|
1372
|
-
|
|
1566
|
+
When parsing existing mappings, an empty `generate` inside a parent array is an inner array; an
|
|
1567
|
+
empty `generate` on the ONLY top-level item, with `dataType: objectarray`, is the `rows [ ]` JSON
|
|
1568
|
+
structure — array output, bound as `rows` in templates — and is intentional, not a missing name.
|
|
1373
1569
|
examples:
|
|
1374
1570
|
- name
|
|
1375
1571
|
- address
|
|
@@ -1455,9 +1651,11 @@ components:
|
|
|
1455
1651
|
This field supports THREE DISTINCT PATTERNS that are easily distinguished:
|
|
1456
1652
|
|
|
1457
1653
|
**1. json Path Syntax**
|
|
1458
|
-
- MUST start with '
|
|
1654
|
+
- MUST start with '$' — the record root. An object record is addressed as
|
|
1655
|
+
'$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
|
|
1459
1656
|
- Used for precisely targeting data in structured JSON objects
|
|
1460
|
-
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
|
|
1657
|
+
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
|
|
1658
|
+
'$[*].Tax' (every row of a grouped record)
|
|
1461
1659
|
- Wildcards like [*] extract multiple values/objects
|
|
1462
1660
|
|
|
1463
1661
|
```json
|
|
@@ -1468,7 +1666,8 @@ components:
|
|
|
1468
1666
|
- Contains '{{' and '}}' pattern
|
|
1469
1667
|
- Evaluated by the AFE 2.0 handlebars template engine
|
|
1470
1668
|
- Can include logic, formatting, and computation
|
|
1471
|
-
- Access input record fields with {{record.fieldName}} notation
|
|
1669
|
+
- Access input record fields with {{record.fieldName}} notation; a grouped
|
|
1670
|
+
(array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
|
|
1472
1671
|
- Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
|
|
1473
1672
|
- Valid on `object`, `objectarray`, and primitive-array dataTypes as
|
|
1474
1673
|
well as scalars — the rendered template output must parse into the
|
|
@@ -1479,7 +1678,7 @@ components:
|
|
|
1479
1678
|
```
|
|
1480
1679
|
|
|
1481
1680
|
**3. Hard-Coded Value (literal string)**
|
|
1482
|
-
- Does NOT start with '
|
|
1681
|
+
- Does NOT start with '$'
|
|
1483
1682
|
- Does NOT contain handlebars '{{' syntax
|
|
1484
1683
|
- System treats it as a literal string value
|
|
1485
1684
|
- VERY COMMON for setting static/constant values
|
|
@@ -1501,10 +1700,38 @@ components:
|
|
|
1501
1700
|
- The system maintains this context even in deeply nested mappings
|
|
1502
1701
|
- For object mappings without child mappings, extract should return a complete object
|
|
1503
1702
|
- When both extract and mappings are defined for objects, extract is applied first
|
|
1703
|
+
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
1704
|
+
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
1705
|
+
grouped saved searches) roots at the array, so its rows are addressed as
|
|
1706
|
+
`$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
|
|
1707
|
+
record's shape resolves to nothing without an error.
|
|
1504
1708
|
|
|
1505
1709
|
For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
|
|
1506
1710
|
For hard-coded values, simply use the literal string as the extract value.
|
|
1507
1711
|
x-celigo-ai-guidance:
|
|
1712
|
+
- |-
|
|
1713
|
+
## GROUPED (ARRAY) RECORDS
|
|
1714
|
+
Decide the JSONPath root from the record's shape before writing
|
|
1715
|
+
any extract. When the record is an array of rows, `$.field`,
|
|
1716
|
+
`$.properties.field` and `$.rows[*].field` all resolve to
|
|
1717
|
+
nothing — the processor still reports success and the request
|
|
1718
|
+
body ships as `{}`. Address rows as `$[0].field` (that row's
|
|
1719
|
+
value, typed) or `$[*].field` (every row: joined with commas
|
|
1720
|
+
into a `string` destination; rejected with
|
|
1721
|
+
`incompatible_destination_conversion` into a `number`
|
|
1722
|
+
destination). Column labels with spaces work as
|
|
1723
|
+
`$[*][Order Number]`, `$[*].[Order Number]`, or
|
|
1724
|
+
`$[*]['Order Number']`. For one destination element per row
|
|
1725
|
+
the two array kinds take different helper forms: a primitive
|
|
1726
|
+
array (`stringarray` / `numberarray`) uses `buildArrayHelper:
|
|
1727
|
+
[{"extract": "$[*].field"}]`; an `objectarray` uses
|
|
1728
|
+
`buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
|
|
1729
|
+
with the children addressing the row relatively (`$.field`,
|
|
1730
|
+
`{{rows.field}}`). An `extract` placed directly on the
|
|
1731
|
+
array-typed field yields nothing. Handlebars
|
|
1732
|
+
extracts bind the array record as `rows` (`{{rows.0.field}}`),
|
|
1733
|
+
an object record as `record`. The reverse holds too: `$[*]` on
|
|
1734
|
+
an object record iterates the object's values, not rows.
|
|
1508
1735
|
- |-
|
|
1509
1736
|
## SIZE LIMIT
|
|
1510
1737
|
The platform's import save validator caps this field at **1024
|
|
@@ -1586,7 +1813,8 @@ components:
|
|
|
1586
1813
|
Explicit JSON `null` is itself a valid fallback: the destination field is written as
|
|
1587
1814
|
JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
|
|
1588
1815
|
action). Omitting the key entirely means no fallback — the field is left out of the
|
|
1589
|
-
output when the extract is empty (the UI's "Do nothing" action).
|
|
1816
|
+
output when the extract is empty (the UI's "Do nothing" action). Failing the record
|
|
1817
|
+
instead is `conditional.when: fail_record_when_empty`, which excludes a default.
|
|
1590
1818
|
x-celigo-ai-guidance:
|
|
1591
1819
|
- |-
|
|
1592
1820
|
`"default": null` and `"default": ""` are distinct saved values, not
|
|
@@ -1595,6 +1823,12 @@ components:
|
|
|
1595
1823
|
Preserve them verbatim when editing or migrating a mapping — dropping
|
|
1596
1824
|
the key changes runtime behavior from "use null/empty string as
|
|
1597
1825
|
default value" to "do nothing" (field omitted from the output).
|
|
1826
|
+
- |-
|
|
1827
|
+
The four "Action to take if source field has no value" choices map to:
|
|
1828
|
+
do nothing → no `default` key (optionally `conditional.when:
|
|
1829
|
+
extract_not_empty`); use null → `"default": null`; use empty string or
|
|
1830
|
+
a custom value → `"default": "<value>"`; cause the record to fail →
|
|
1831
|
+
`conditional.when: fail_record_when_empty` with no `default` key.
|
|
1598
1832
|
examples:
|
|
1599
1833
|
- N/A
|
|
1600
1834
|
- '0'
|
|
@@ -1762,7 +1996,11 @@ components:
|
|
|
1762
1996
|
(`$.items[*]`), `"$"` (the record root), or omission — a
|
|
1763
1997
|
constructed entry (child `mappings` with the extract omitted or
|
|
1764
1998
|
`"$"`; the two spellings are equivalent) contributes exactly one
|
|
1765
|
-
element, and entries append in order.
|
|
1999
|
+
element, and entries append in order. On a grouped (array)
|
|
2000
|
+
record the record itself is the array to iterate: `"$[*]"`
|
|
2001
|
+
yields one `objectarray` element per row (children address the
|
|
2002
|
+
row as `$.field`), and `"$[*].field"` yields one primitive-array
|
|
2003
|
+
value per row. Indexed or comma-joined
|
|
1766
2004
|
entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
|
|
1767
2005
|
processor renders the entire destination array as null with no
|
|
1768
2006
|
validation error. To emit a fixed number of static elements, add
|
|
@@ -1783,7 +2021,9 @@ components:
|
|
|
1783
2021
|
|
|
1784
2022
|
**For Simple Arrays (stringarray, numberarray, booleanarray)**
|
|
1785
2023
|
- Only the 'extract' field is used to pull values
|
|
1786
|
-
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values
|
|
2024
|
+
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
|
|
2025
|
+
on a grouped (array) record the record itself is the array, so the
|
|
2026
|
+
path roots at it ($[*].name — one value per row)
|
|
1787
2027
|
- Each result is converted to the appropriate primitive type
|
|
1788
2028
|
```json
|
|
1789
2029
|
{
|
|
@@ -1885,11 +2125,13 @@ components:
|
|
|
1885
2125
|
- When both extract and mappings are provided, the system creates special composite objects
|
|
1886
2126
|
that maintain hierarchical context during processing
|
|
1887
2127
|
- This enables accessing both the current array element AND its parent context
|
|
1888
|
-
- An ITERATING entry's extract MUST
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
2128
|
+
- An ITERATING entry's extract MUST be a JSON path that iterates an array:
|
|
2129
|
+
'$.items[*]' when the array is a field of an object record, or '$[*]'
|
|
2130
|
+
(objectarray) / '$[*].field' (primitive arrays) when the record itself is a
|
|
2131
|
+
grouped array of rows. A CONSTRUCTED entry (child mappings building one
|
|
2132
|
+
element) instead omits extract or sets it to exactly "$" — never rewrite "$"
|
|
2133
|
+
into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
|
|
2134
|
+
entire destination array as null without raising a validation error
|
|
1893
2135
|
- Each array helper entry acts independently, potentially adding multiple elements
|
|
1894
2136
|
|
|
1895
2137
|
The buildArrayHelper is the most complex part of the mappings system - always analyze the
|
|
@@ -1919,6 +2161,22 @@ components:
|
|
|
1919
2161
|
- $.order.lineItems[*]
|
|
1920
2162
|
- $.parents[*].children[*]
|
|
1921
2163
|
- $
|
|
2164
|
+
name:
|
|
2165
|
+
type: string
|
|
2166
|
+
maxLength: 200
|
|
2167
|
+
description: |
|
|
2168
|
+
Display label for this source object in the mapper, so the sources of
|
|
2169
|
+
an object array can be told apart instead of all showing as `$`.
|
|
2170
|
+
Has no effect at runtime; stored only when non-empty.
|
|
2171
|
+
x-celigo-ai-guidance:
|
|
2172
|
+
- |-
|
|
2173
|
+
Carry an existing `name` through every edit — it is the user's label
|
|
2174
|
+
for the tab, and an entry sent without it loses the label. Duplicate
|
|
2175
|
+
names across entries are allowed. Set one only when the user names
|
|
2176
|
+
the source object; never invent labels.
|
|
2177
|
+
examples:
|
|
2178
|
+
- Billing address
|
|
2179
|
+
- Shipping address
|
|
1922
2180
|
sourceDataType:
|
|
1923
2181
|
type: string
|
|
1924
2182
|
description: |
|
|
@@ -1967,17 +2225,31 @@ components:
|
|
|
1967
2225
|
type: object
|
|
1968
2226
|
description: |
|
|
1969
2227
|
Defines conditional rules for including each array element in the result.
|
|
2228
|
+
x-celigo-ai-guidance:
|
|
2229
|
+
- |-
|
|
2230
|
+
Judged against this entry's own `extract` (the array source). The
|
|
2231
|
+
design scopes the UI's tab-level "Action to take if source field has
|
|
2232
|
+
no value" to copy-as-is tabs (no child `mappings`); the API accepts
|
|
2233
|
+
`fail_record_when_empty` on a mapped entry as well, and the mapper
|
|
2234
|
+
processor honors it there — the record fails when that array is
|
|
2235
|
+
missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
|
|
2236
|
+
true`, message `<generate>: Source field has no value`; probed
|
|
2237
|
+
2026-10-09). Say so when writing it on a mapped entry: the user may
|
|
2238
|
+
not find the setting in the mapper's tab. To fail on an empty field
|
|
2239
|
+
inside each element, set the action on that child mapping instead.
|
|
1970
2240
|
properties:
|
|
1971
2241
|
when:
|
|
1972
2242
|
type: string
|
|
1973
2243
|
description: |
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
2244
|
+
Condition judged on the entry's extract — skip the elements the
|
|
2245
|
+
extract does not return, or fail the whole record when the source
|
|
2246
|
+
array is missing or empty.
|
|
1977
2247
|
enum:
|
|
1978
2248
|
- extract_not_empty
|
|
2249
|
+
- fail_record_when_empty
|
|
1979
2250
|
x-enumDescriptions:
|
|
1980
|
-
extract_not_empty: Include
|
|
2251
|
+
extract_not_empty: Include an array element only when the extract returns a non-empty value for it
|
|
2252
|
+
fail_record_when_empty: Fail the record when the entry's source array is missing or empty
|
|
1981
2253
|
examples:
|
|
1982
2254
|
- extract_not_empty
|
|
1983
2255
|
mappings:
|
|
@@ -2077,6 +2349,20 @@ components:
|
|
|
2077
2349
|
extract: $.price
|
|
2078
2350
|
dataType: number
|
|
2079
2351
|
status: Active
|
|
2352
|
+
if:
|
|
2353
|
+
properties:
|
|
2354
|
+
conditional:
|
|
2355
|
+
properties:
|
|
2356
|
+
when:
|
|
2357
|
+
const: fail_record_when_empty
|
|
2358
|
+
required:
|
|
2359
|
+
- when
|
|
2360
|
+
required:
|
|
2361
|
+
- conditional
|
|
2362
|
+
then:
|
|
2363
|
+
not:
|
|
2364
|
+
required:
|
|
2365
|
+
- default
|
|
2080
2366
|
status:
|
|
2081
2367
|
type: string
|
|
2082
2368
|
description: |
|
|
@@ -2084,9 +2370,10 @@ components:
|
|
|
2084
2370
|
Required on every mapping entry. Controls whether the mapping is applied.
|
|
2085
2371
|
|
|
2086
2372
|
**Guidance**
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2373
|
+
Only `Active` rows run. `Draft` and `Inactive` rows keep their
|
|
2374
|
+
configuration, are saved with minimal validation, and are skipped at
|
|
2375
|
+
runtime and in preview; a non-Active parent skips its whole subtree
|
|
2376
|
+
whatever its children say. The API rejects a mapping missing this field
|
|
2090
2377
|
(validation error: "Mapping object must have status field present.").
|
|
2091
2378
|
x-celigo-ai-guidance:
|
|
2092
2379
|
- |-
|
|
@@ -2095,12 +2382,28 @@ components:
|
|
|
2095
2382
|
field validations. The value is case-sensitive. The API rejects:
|
|
2096
2383
|
- Missing field: `[status_field_absent] Mapping object must have status field present.`
|
|
2097
2384
|
- Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
|
|
2385
|
+
- |-
|
|
2386
|
+
`"Inactive"` is the user's "Set inactive" on a row: use it only when
|
|
2387
|
+
asked to disable or park a row, never to mean incomplete (that is
|
|
2388
|
+
`"Draft"`). Setting a parent `Inactive` means no `Active` row may
|
|
2389
|
+
remain under it — the save rejects an `Active` row under an
|
|
2390
|
+
`Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
|
|
2391
|
+
no message text) and never cascades or promotes on its own; `Draft`
|
|
2392
|
+
descendants are kept as they are, and a `Draft` parent does not gate
|
|
2393
|
+
its children. The UI's Set inactive on a parent marks the parent and
|
|
2394
|
+
every child `Inactive` (IO-166197). Re-enabling a child
|
|
2395
|
+
means re-enabling its ancestors in the same payload. Edits that keep
|
|
2396
|
+
existing rows must carry their stored status forward — rewriting a
|
|
2397
|
+
`Draft` or `Inactive` row to `Active` turns a row the user parked
|
|
2398
|
+
back on.
|
|
2098
2399
|
enum:
|
|
2099
2400
|
- Active
|
|
2100
2401
|
- Draft
|
|
2402
|
+
- Inactive
|
|
2101
2403
|
x-enumDescriptions:
|
|
2102
|
-
Active: The mapping is enabled and applied during processing
|
|
2103
|
-
Draft: In-progress mapping; saved without the Active-only field validations
|
|
2404
|
+
Active: The mapping is enabled and applied during processing
|
|
2405
|
+
Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
|
|
2406
|
+
Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
|
|
2104
2407
|
examples:
|
|
2105
2408
|
- Active
|
|
2106
2409
|
conditional:
|
|
@@ -2129,6 +2432,10 @@ components:
|
|
|
2129
2432
|
- `extract_not_empty`: Apply only when the extract field returns a value
|
|
2130
2433
|
Useful for conditional mapping based on input data availability
|
|
2131
2434
|
|
|
2435
|
+
- `fail_record_when_empty`: Fail the record when the extract field returns
|
|
2436
|
+
no value (the UI's "Cause record to fail" action when the source field
|
|
2437
|
+
has no value)
|
|
2438
|
+
|
|
2132
2439
|
**Example**
|
|
2133
2440
|
```json
|
|
2134
2441
|
{
|
|
@@ -2141,28 +2448,75 @@ components:
|
|
|
2141
2448
|
}
|
|
2142
2449
|
}
|
|
2143
2450
|
```
|
|
2451
|
+
x-celigo-ai-guidance:
|
|
2452
|
+
- |-
|
|
2453
|
+
`when` holds one value, and two different settings share it: the
|
|
2454
|
+
composite-import operation gate (`record_created` / `record_updated`,
|
|
2455
|
+
the UI's "Only perform mapping when") and the empty-source action
|
|
2456
|
+
(`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
|
|
2457
|
+
take if source field has no value"). A row cannot carry both — writing
|
|
2458
|
+
one replaces the other and the save succeeds, so a composite import
|
|
2459
|
+
row that needs both has to choose. Never author `fail_record_when_empty`
|
|
2460
|
+
on a row that already carries `record_created` or `record_updated`.
|
|
2144
2461
|
properties:
|
|
2145
2462
|
when:
|
|
2146
2463
|
type: string
|
|
2147
2464
|
description: |
|
|
2148
|
-
|
|
2149
|
-
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2465
|
+
Condition that gates this mapping — either an operation gate on a
|
|
2466
|
+
composite (create-or-update) import or the action to take when the
|
|
2467
|
+
extract returns no value. Empty means null, undefined or an empty
|
|
2468
|
+
string; `0`, `false` and whitespace are values.
|
|
2469
|
+
x-celigo-ai-guidance:
|
|
2470
|
+
- |-
|
|
2471
|
+
`fail_record_when_empty` is the fourth "Action to take if source field
|
|
2472
|
+
has no value" and is mutually exclusive with the other three: send it
|
|
2473
|
+
with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
|
|
2474
|
+
on the same row — or a `default` on a `buildArrayHelper` entry — is
|
|
2475
|
+
rejected at save with `[unsupported_mapping] "<key>" and conditional.when
|
|
2476
|
+
"fail_record_when_empty" cannot be present in mapping simultaneously.`
|
|
2477
|
+
(the lookup variant adds `Use lookup "allowFailures" instead.`);
|
|
2478
|
+
lookups fail through `allowFailures: false`, and a hard-coded row
|
|
2479
|
+
always has a value. At runtime an empty extract fails the record with
|
|
2480
|
+
an `errors[]` entry `{code: "extract_empty", fatal: true, source:
|
|
2481
|
+
"mapping", message: "<generate>: Source field has no value"}`
|
|
2482
|
+
("Input field has no value" in a Transformation 2.0); `0` and `false`
|
|
2483
|
+
are values and map through.
|
|
2152
2484
|
enum:
|
|
2153
2485
|
- record_created
|
|
2154
2486
|
- record_updated
|
|
2155
2487
|
- extract_not_empty
|
|
2488
|
+
- fail_record_when_empty
|
|
2156
2489
|
x-enumDescriptions:
|
|
2157
|
-
record_created: Apply this mapping only when creating a new record
|
|
2158
|
-
record_updated: Apply this mapping only when updating an existing record
|
|
2159
|
-
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
2490
|
+
record_created: Apply this mapping only when creating a new record
|
|
2491
|
+
record_updated: Apply this mapping only when updating an existing record
|
|
2492
|
+
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
2493
|
+
fail_record_when_empty: Fail the record when the extract field returns no value
|
|
2160
2494
|
examples:
|
|
2161
2495
|
- record_created
|
|
2162
2496
|
- record_updated
|
|
2163
2497
|
- extract_not_empty
|
|
2498
|
+
- fail_record_when_empty
|
|
2164
2499
|
required:
|
|
2165
2500
|
- dataType
|
|
2501
|
+
if:
|
|
2502
|
+
properties:
|
|
2503
|
+
conditional:
|
|
2504
|
+
properties:
|
|
2505
|
+
when:
|
|
2506
|
+
const: fail_record_when_empty
|
|
2507
|
+
required:
|
|
2508
|
+
- when
|
|
2509
|
+
required:
|
|
2510
|
+
- conditional
|
|
2511
|
+
then:
|
|
2512
|
+
not:
|
|
2513
|
+
anyOf:
|
|
2514
|
+
- required:
|
|
2515
|
+
- default
|
|
2516
|
+
- required:
|
|
2517
|
+
- lookupName
|
|
2518
|
+
- required:
|
|
2519
|
+
- hardCodedValue
|
|
2166
2520
|
Lookups:
|
|
2167
2521
|
type: array
|
|
2168
2522
|
description: |
|
|
@@ -2615,6 +2969,16 @@ components:
|
|
|
2615
2969
|
x-enumDescriptions:
|
|
2616
2970
|
create: Builds entirely new output records from inputs, ignoring unmapped fields.
|
|
2617
2971
|
modify: Makes targeted edits to existing records, preserving unmapped fields.
|
|
2972
|
+
x-celigo-ai-guidance:
|
|
2973
|
+
- |-
|
|
2974
|
+
On a grouped record (the export groups rows, so the record is an
|
|
2975
|
+
array) only `create` can author output — build it from the rows with
|
|
2976
|
+
`$[0].field`, `$[*].field`, or a `buildArrayHelper` over `$[*]`.
|
|
2977
|
+
`modify` has no object to overlay onto an array: the record passes
|
|
2978
|
+
through untouched and the processor reports success. Either mode
|
|
2979
|
+
reshapes the inside of one record; neither changes how many records
|
|
2980
|
+
the page carries (that is the export's `preSavePage` hook) or whether
|
|
2981
|
+
the export groups at all (that is its grouping setting).
|
|
2618
2982
|
examples:
|
|
2619
2983
|
- create
|
|
2620
2984
|
- modify
|
|
@@ -3066,6 +3430,14 @@ components:
|
|
|
3066
3430
|
description: Timestamp when the resource was last updated. Changes whenever any property is modified.
|
|
3067
3431
|
x-celigo-ai-guidance:
|
|
3068
3432
|
- Recorded in ISO 8601 with a UTC timezone (Z suffix); always equal to or later than `createdAt`.
|
|
3433
|
+
- |-
|
|
3434
|
+
Records that something was written, not what — a settings edit, a flag flip, or a
|
|
3435
|
+
platform workflow all move it. What changed and when is in the audit log: the
|
|
3436
|
+
per-resource route `GET /v1/{resourceType}/{_id}/audit` for the types its
|
|
3437
|
+
`resourceType` enum lists, or the account-wide
|
|
3438
|
+
`GET /v1/audit?resourceType=<singular>&_resourceId={_id}` for the further types that
|
|
3439
|
+
endpoint's enum accepts (users, environments, notifications among them). A type absent
|
|
3440
|
+
from both enums — jobs, connectors, templates — has only this timestamp.
|
|
3069
3441
|
examples:
|
|
3070
3442
|
- '2023-04-15T14:30:15Z'
|
|
3071
3443
|
deletedAt:
|
|
@@ -3237,6 +3609,13 @@ components:
|
|
|
3237
3609
|
description: Display name of the dependent resource.
|
|
3238
3610
|
examples:
|
|
3239
3611
|
- Import Orders to NetSuite
|
|
3612
|
+
type:
|
|
3613
|
+
type: string
|
|
3614
|
+
description: |-
|
|
3615
|
+
Sub-type of the dependent resource when its collection distinguishes one, such as
|
|
3616
|
+
`stream` for a listener export. Only present for resource types that carry a `type`.
|
|
3617
|
+
examples:
|
|
3618
|
+
- stream
|
|
3240
3619
|
paths:
|
|
3241
3620
|
type: array
|
|
3242
3621
|
description: |-
|