@celigo/api-specs 0.2.83 → 0.2.84
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/dist/ai-agent.yml +286 -34
- package/dist/asynchelper.yml +286 -34
- package/dist/export.yml +286 -34
- package/dist/import.yml +286 -34
- package/dist/tool.yml +286 -34
- package/package.json +1 -1
- package/schemas.json +12 -4
package/dist/export.yml
CHANGED
|
@@ -12573,7 +12573,8 @@ components:
|
|
|
12573
12573
|
Explicit JSON `null` is itself a valid fallback: the destination field is written as
|
|
12574
12574
|
JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
|
|
12575
12575
|
action). Omitting the key entirely means no fallback — the field is left out of the
|
|
12576
|
-
output when the extract is empty (the UI's "Do nothing" action).
|
|
12576
|
+
output when the extract is empty (the UI's "Do nothing" action). Failing the record
|
|
12577
|
+
instead is `conditional.when: fail_record_when_empty`, which excludes a default.
|
|
12577
12578
|
x-celigo-ai-guidance:
|
|
12578
12579
|
- |-
|
|
12579
12580
|
`"default": null` and `"default": ""` are distinct saved values, not
|
|
@@ -12582,6 +12583,12 @@ components:
|
|
|
12582
12583
|
Preserve them verbatim when editing or migrating a mapping — dropping
|
|
12583
12584
|
the key changes runtime behavior from "use null/empty string as
|
|
12584
12585
|
default value" to "do nothing" (field omitted from the output).
|
|
12586
|
+
- |-
|
|
12587
|
+
The four "Action to take if source field has no value" choices map to:
|
|
12588
|
+
do nothing → no `default` key (optionally `conditional.when:
|
|
12589
|
+
extract_not_empty`); use null → `"default": null`; use empty string or
|
|
12590
|
+
a custom value → `"default": "<value>"`; cause the record to fail →
|
|
12591
|
+
`conditional.when: fail_record_when_empty` with no `default` key.
|
|
12585
12592
|
examples:
|
|
12586
12593
|
- N/A
|
|
12587
12594
|
- '0'
|
|
@@ -12914,6 +12921,22 @@ components:
|
|
|
12914
12921
|
- $.order.lineItems[*]
|
|
12915
12922
|
- $.parents[*].children[*]
|
|
12916
12923
|
- $
|
|
12924
|
+
name:
|
|
12925
|
+
type: string
|
|
12926
|
+
maxLength: 200
|
|
12927
|
+
description: |
|
|
12928
|
+
Display label for this source object in the mapper, so the sources of
|
|
12929
|
+
an object array can be told apart instead of all showing as `$`.
|
|
12930
|
+
Has no effect at runtime; stored only when non-empty.
|
|
12931
|
+
x-celigo-ai-guidance:
|
|
12932
|
+
- |-
|
|
12933
|
+
Carry an existing `name` through every edit — it is the user's label
|
|
12934
|
+
for the tab, and an entry sent without it loses the label. Duplicate
|
|
12935
|
+
names across entries are allowed. Set one only when the user names
|
|
12936
|
+
the source object; never invent labels.
|
|
12937
|
+
examples:
|
|
12938
|
+
- Billing address
|
|
12939
|
+
- Shipping address
|
|
12917
12940
|
sourceDataType:
|
|
12918
12941
|
type: string
|
|
12919
12942
|
description: |
|
|
@@ -12962,17 +12985,31 @@ components:
|
|
|
12962
12985
|
type: object
|
|
12963
12986
|
description: |
|
|
12964
12987
|
Defines conditional rules for including each array element in the result.
|
|
12988
|
+
x-celigo-ai-guidance:
|
|
12989
|
+
- |-
|
|
12990
|
+
Judged against this entry's own `extract` (the array source). The
|
|
12991
|
+
design scopes the UI's tab-level "Action to take if source field has
|
|
12992
|
+
no value" to copy-as-is tabs (no child `mappings`); the API accepts
|
|
12993
|
+
`fail_record_when_empty` on a mapped entry as well, and the mapper
|
|
12994
|
+
processor honors it there — the record fails when that array is
|
|
12995
|
+
missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
|
|
12996
|
+
true`, message `<generate>: Source field has no value`; probed
|
|
12997
|
+
2026-10-09). Say so when writing it on a mapped entry: the user may
|
|
12998
|
+
not find the setting in the mapper's tab. To fail on an empty field
|
|
12999
|
+
inside each element, set the action on that child mapping instead.
|
|
12965
13000
|
properties:
|
|
12966
13001
|
when:
|
|
12967
13002
|
type: string
|
|
12968
13003
|
description: |
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
13004
|
+
Condition judged on the entry's extract — skip the elements the
|
|
13005
|
+
extract does not return, or fail the whole record when the source
|
|
13006
|
+
array is missing or empty.
|
|
12972
13007
|
enum:
|
|
12973
13008
|
- extract_not_empty
|
|
13009
|
+
- fail_record_when_empty
|
|
12974
13010
|
x-enumDescriptions:
|
|
12975
|
-
extract_not_empty: Include
|
|
13011
|
+
extract_not_empty: Include an array element only when the extract returns a non-empty value for it
|
|
13012
|
+
fail_record_when_empty: Fail the record when the entry's source array is missing or empty
|
|
12976
13013
|
examples:
|
|
12977
13014
|
- extract_not_empty
|
|
12978
13015
|
mappings:
|
|
@@ -13072,6 +13109,20 @@ components:
|
|
|
13072
13109
|
extract: $.price
|
|
13073
13110
|
dataType: number
|
|
13074
13111
|
status: Active
|
|
13112
|
+
if:
|
|
13113
|
+
properties:
|
|
13114
|
+
conditional:
|
|
13115
|
+
properties:
|
|
13116
|
+
when:
|
|
13117
|
+
const: fail_record_when_empty
|
|
13118
|
+
required:
|
|
13119
|
+
- when
|
|
13120
|
+
required:
|
|
13121
|
+
- conditional
|
|
13122
|
+
then:
|
|
13123
|
+
not:
|
|
13124
|
+
required:
|
|
13125
|
+
- default
|
|
13075
13126
|
status:
|
|
13076
13127
|
type: string
|
|
13077
13128
|
description: |
|
|
@@ -13079,9 +13130,10 @@ components:
|
|
|
13079
13130
|
Required on every mapping entry. Controls whether the mapping is applied.
|
|
13080
13131
|
|
|
13081
13132
|
**Guidance**
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13133
|
+
Only `Active` rows run. `Draft` and `Inactive` rows keep their
|
|
13134
|
+
configuration, are saved with minimal validation, and are skipped at
|
|
13135
|
+
runtime and in preview; a non-Active parent skips its whole subtree
|
|
13136
|
+
whatever its children say. The API rejects a mapping missing this field
|
|
13085
13137
|
(validation error: "Mapping object must have status field present.").
|
|
13086
13138
|
x-celigo-ai-guidance:
|
|
13087
13139
|
- |-
|
|
@@ -13090,12 +13142,28 @@ components:
|
|
|
13090
13142
|
field validations. The value is case-sensitive. The API rejects:
|
|
13091
13143
|
- Missing field: `[status_field_absent] Mapping object must have status field present.`
|
|
13092
13144
|
- Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
|
|
13145
|
+
- |-
|
|
13146
|
+
`"Inactive"` is the user's "Set inactive" on a row: use it only when
|
|
13147
|
+
asked to disable or park a row, never to mean incomplete (that is
|
|
13148
|
+
`"Draft"`). Setting a parent `Inactive` means no `Active` row may
|
|
13149
|
+
remain under it — the save rejects an `Active` row under an
|
|
13150
|
+
`Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
|
|
13151
|
+
no message text) and never cascades or promotes on its own; `Draft`
|
|
13152
|
+
descendants are kept as they are, and a `Draft` parent does not gate
|
|
13153
|
+
its children. The UI's Set inactive on a parent marks the parent and
|
|
13154
|
+
every child `Inactive` (IO-166197). Re-enabling a child
|
|
13155
|
+
means re-enabling its ancestors in the same payload. Edits that keep
|
|
13156
|
+
existing rows must carry their stored status forward — rewriting a
|
|
13157
|
+
`Draft` or `Inactive` row to `Active` turns a row the user parked
|
|
13158
|
+
back on.
|
|
13093
13159
|
enum:
|
|
13094
13160
|
- Active
|
|
13095
13161
|
- Draft
|
|
13162
|
+
- Inactive
|
|
13096
13163
|
x-enumDescriptions:
|
|
13097
|
-
Active: The mapping is enabled and applied during processing
|
|
13098
|
-
Draft: In-progress mapping; saved without the Active-only field validations
|
|
13164
|
+
Active: The mapping is enabled and applied during processing
|
|
13165
|
+
Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
|
|
13166
|
+
Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
|
|
13099
13167
|
examples:
|
|
13100
13168
|
- Active
|
|
13101
13169
|
conditional:
|
|
@@ -13124,6 +13192,10 @@ components:
|
|
|
13124
13192
|
- `extract_not_empty`: Apply only when the extract field returns a value
|
|
13125
13193
|
Useful for conditional mapping based on input data availability
|
|
13126
13194
|
|
|
13195
|
+
- `fail_record_when_empty`: Fail the record when the extract field returns
|
|
13196
|
+
no value (the UI's "Cause record to fail" action when the source field
|
|
13197
|
+
has no value)
|
|
13198
|
+
|
|
13127
13199
|
**Example**
|
|
13128
13200
|
```json
|
|
13129
13201
|
{
|
|
@@ -13136,28 +13208,75 @@ components:
|
|
|
13136
13208
|
}
|
|
13137
13209
|
}
|
|
13138
13210
|
```
|
|
13211
|
+
x-celigo-ai-guidance:
|
|
13212
|
+
- |-
|
|
13213
|
+
`when` holds one value, and two different settings share it: the
|
|
13214
|
+
composite-import operation gate (`record_created` / `record_updated`,
|
|
13215
|
+
the UI's "Only perform mapping when") and the empty-source action
|
|
13216
|
+
(`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
|
|
13217
|
+
take if source field has no value"). A row cannot carry both — writing
|
|
13218
|
+
one replaces the other and the save succeeds, so a composite import
|
|
13219
|
+
row that needs both has to choose. Never author `fail_record_when_empty`
|
|
13220
|
+
on a row that already carries `record_created` or `record_updated`.
|
|
13139
13221
|
properties:
|
|
13140
13222
|
when:
|
|
13141
13223
|
type: string
|
|
13142
13224
|
description: |
|
|
13143
|
-
|
|
13144
|
-
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13225
|
+
Condition that gates this mapping — either an operation gate on a
|
|
13226
|
+
composite (create-or-update) import or the action to take when the
|
|
13227
|
+
extract returns no value. Empty means null, undefined or an empty
|
|
13228
|
+
string; `0`, `false` and whitespace are values.
|
|
13229
|
+
x-celigo-ai-guidance:
|
|
13230
|
+
- |-
|
|
13231
|
+
`fail_record_when_empty` is the fourth "Action to take if source field
|
|
13232
|
+
has no value" and is mutually exclusive with the other three: send it
|
|
13233
|
+
with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
|
|
13234
|
+
on the same row — or a `default` on a `buildArrayHelper` entry — is
|
|
13235
|
+
rejected at save with `[unsupported_mapping] "<key>" and conditional.when
|
|
13236
|
+
"fail_record_when_empty" cannot be present in mapping simultaneously.`
|
|
13237
|
+
(the lookup variant adds `Use lookup "allowFailures" instead.`);
|
|
13238
|
+
lookups fail through `allowFailures: false`, and a hard-coded row
|
|
13239
|
+
always has a value. At runtime an empty extract fails the record with
|
|
13240
|
+
an `errors[]` entry `{code: "extract_empty", fatal: true, source:
|
|
13241
|
+
"mapping", message: "<generate>: Source field has no value"}`
|
|
13242
|
+
("Input field has no value" in a Transformation 2.0); `0` and `false`
|
|
13243
|
+
are values and map through.
|
|
13147
13244
|
enum:
|
|
13148
13245
|
- record_created
|
|
13149
13246
|
- record_updated
|
|
13150
13247
|
- extract_not_empty
|
|
13248
|
+
- fail_record_when_empty
|
|
13151
13249
|
x-enumDescriptions:
|
|
13152
|
-
record_created: Apply this mapping only when creating a new record
|
|
13153
|
-
record_updated: Apply this mapping only when updating an existing record
|
|
13154
|
-
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
13250
|
+
record_created: Apply this mapping only when creating a new record
|
|
13251
|
+
record_updated: Apply this mapping only when updating an existing record
|
|
13252
|
+
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
13253
|
+
fail_record_when_empty: Fail the record when the extract field returns no value
|
|
13155
13254
|
examples:
|
|
13156
13255
|
- record_created
|
|
13157
13256
|
- record_updated
|
|
13158
13257
|
- extract_not_empty
|
|
13258
|
+
- fail_record_when_empty
|
|
13159
13259
|
required:
|
|
13160
13260
|
- dataType
|
|
13261
|
+
if:
|
|
13262
|
+
properties:
|
|
13263
|
+
conditional:
|
|
13264
|
+
properties:
|
|
13265
|
+
when:
|
|
13266
|
+
const: fail_record_when_empty
|
|
13267
|
+
required:
|
|
13268
|
+
- when
|
|
13269
|
+
required:
|
|
13270
|
+
- conditional
|
|
13271
|
+
then:
|
|
13272
|
+
not:
|
|
13273
|
+
anyOf:
|
|
13274
|
+
- required:
|
|
13275
|
+
- default
|
|
13276
|
+
- required:
|
|
13277
|
+
- lookupName
|
|
13278
|
+
- required:
|
|
13279
|
+
- hardCodedValue
|
|
13161
13280
|
Mappings:
|
|
13162
13281
|
type: array
|
|
13163
13282
|
description: |
|
|
@@ -13181,6 +13300,20 @@ components:
|
|
|
13181
13300
|
|
|
13182
13301
|
The system will process these nested structures recursively during runtime, ensuring proper construction
|
|
13183
13302
|
of complex hierarchical data while maintaining excellent performance.
|
|
13303
|
+
|
|
13304
|
+
On save, a leaf row with neither a source (`extract`, `hardCodedValue`, `lookupName`) nor a
|
|
13305
|
+
destination (`generate`) is dropped silently, at every nesting level, and so is an object or
|
|
13306
|
+
object-array row left with no source, no destination and no remaining child `mappings` or
|
|
13307
|
+
`buildArrayHelper` entries; a row with only one of the two, and a source-less, destination-less
|
|
13308
|
+
wrapper that still has children, are kept.
|
|
13309
|
+
x-celigo-ai-guidance:
|
|
13310
|
+
- |-
|
|
13311
|
+
Rows that exist in the saved document — including `Draft` and `Inactive` rows and
|
|
13312
|
+
rows with only a source or only a destination — are the user's state: an edit that
|
|
13313
|
+
re-sends the tree must carry them through unchanged unless the user asked to change
|
|
13314
|
+
them. Only a row with neither source nor destination — and, for an object or
|
|
13315
|
+
object-array row, no remaining children — can be left out; the save would drop it
|
|
13316
|
+
anyway. A wrapper with children but no `generate` is kept by the save, so keep it.
|
|
13184
13317
|
items:
|
|
13185
13318
|
type: object
|
|
13186
13319
|
properties:
|
|
@@ -13460,7 +13593,8 @@ components:
|
|
|
13460
13593
|
Explicit JSON `null` is itself a valid fallback: the destination field is written as
|
|
13461
13594
|
JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
|
|
13462
13595
|
action). Omitting the key entirely means no fallback — the field is left out of the
|
|
13463
|
-
output when the extract is empty (the UI's "Do nothing" action).
|
|
13596
|
+
output when the extract is empty (the UI's "Do nothing" action). Failing the record
|
|
13597
|
+
instead is `conditional.when: fail_record_when_empty`, which excludes a default.
|
|
13464
13598
|
x-celigo-ai-guidance:
|
|
13465
13599
|
- |-
|
|
13466
13600
|
`"default": null` and `"default": ""` are distinct saved values, not
|
|
@@ -13469,6 +13603,12 @@ components:
|
|
|
13469
13603
|
Preserve them verbatim when editing or migrating a mapping — dropping
|
|
13470
13604
|
the key changes runtime behavior from "use null/empty string as
|
|
13471
13605
|
default value" to "do nothing" (field omitted from the output).
|
|
13606
|
+
- |-
|
|
13607
|
+
The four "Action to take if source field has no value" choices map to:
|
|
13608
|
+
do nothing → no `default` key (optionally `conditional.when:
|
|
13609
|
+
extract_not_empty`); use null → `"default": null`; use empty string or
|
|
13610
|
+
a custom value → `"default": "<value>"`; cause the record to fail →
|
|
13611
|
+
`conditional.when: fail_record_when_empty` with no `default` key.
|
|
13472
13612
|
examples:
|
|
13473
13613
|
- N/A
|
|
13474
13614
|
- '0'
|
|
@@ -13801,6 +13941,22 @@ components:
|
|
|
13801
13941
|
- $.order.lineItems[*]
|
|
13802
13942
|
- $.parents[*].children[*]
|
|
13803
13943
|
- $
|
|
13944
|
+
name:
|
|
13945
|
+
type: string
|
|
13946
|
+
maxLength: 200
|
|
13947
|
+
description: |
|
|
13948
|
+
Display label for this source object in the mapper, so the sources of
|
|
13949
|
+
an object array can be told apart instead of all showing as `$`.
|
|
13950
|
+
Has no effect at runtime; stored only when non-empty.
|
|
13951
|
+
x-celigo-ai-guidance:
|
|
13952
|
+
- |-
|
|
13953
|
+
Carry an existing `name` through every edit — it is the user's label
|
|
13954
|
+
for the tab, and an entry sent without it loses the label. Duplicate
|
|
13955
|
+
names across entries are allowed. Set one only when the user names
|
|
13956
|
+
the source object; never invent labels.
|
|
13957
|
+
examples:
|
|
13958
|
+
- Billing address
|
|
13959
|
+
- Shipping address
|
|
13804
13960
|
sourceDataType:
|
|
13805
13961
|
type: string
|
|
13806
13962
|
description: |
|
|
@@ -13849,17 +14005,31 @@ components:
|
|
|
13849
14005
|
type: object
|
|
13850
14006
|
description: |
|
|
13851
14007
|
Defines conditional rules for including each array element in the result.
|
|
14008
|
+
x-celigo-ai-guidance:
|
|
14009
|
+
- |-
|
|
14010
|
+
Judged against this entry's own `extract` (the array source). The
|
|
14011
|
+
design scopes the UI's tab-level "Action to take if source field has
|
|
14012
|
+
no value" to copy-as-is tabs (no child `mappings`); the API accepts
|
|
14013
|
+
`fail_record_when_empty` on a mapped entry as well, and the mapper
|
|
14014
|
+
processor honors it there — the record fails when that array is
|
|
14015
|
+
missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
|
|
14016
|
+
true`, message `<generate>: Source field has no value`; probed
|
|
14017
|
+
2026-10-09). Say so when writing it on a mapped entry: the user may
|
|
14018
|
+
not find the setting in the mapper's tab. To fail on an empty field
|
|
14019
|
+
inside each element, set the action on that child mapping instead.
|
|
13852
14020
|
properties:
|
|
13853
14021
|
when:
|
|
13854
14022
|
type: string
|
|
13855
14023
|
description: |
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
|
|
14024
|
+
Condition judged on the entry's extract — skip the elements the
|
|
14025
|
+
extract does not return, or fail the whole record when the source
|
|
14026
|
+
array is missing or empty.
|
|
13859
14027
|
enum:
|
|
13860
14028
|
- extract_not_empty
|
|
14029
|
+
- fail_record_when_empty
|
|
13861
14030
|
x-enumDescriptions:
|
|
13862
|
-
extract_not_empty: Include
|
|
14031
|
+
extract_not_empty: Include an array element only when the extract returns a non-empty value for it
|
|
14032
|
+
fail_record_when_empty: Fail the record when the entry's source array is missing or empty
|
|
13863
14033
|
examples:
|
|
13864
14034
|
- extract_not_empty
|
|
13865
14035
|
mappings:
|
|
@@ -13959,6 +14129,20 @@ components:
|
|
|
13959
14129
|
extract: $.price
|
|
13960
14130
|
dataType: number
|
|
13961
14131
|
status: Active
|
|
14132
|
+
if:
|
|
14133
|
+
properties:
|
|
14134
|
+
conditional:
|
|
14135
|
+
properties:
|
|
14136
|
+
when:
|
|
14137
|
+
const: fail_record_when_empty
|
|
14138
|
+
required:
|
|
14139
|
+
- when
|
|
14140
|
+
required:
|
|
14141
|
+
- conditional
|
|
14142
|
+
then:
|
|
14143
|
+
not:
|
|
14144
|
+
required:
|
|
14145
|
+
- default
|
|
13962
14146
|
status:
|
|
13963
14147
|
type: string
|
|
13964
14148
|
description: |
|
|
@@ -13966,9 +14150,10 @@ components:
|
|
|
13966
14150
|
Required on every mapping entry. Controls whether the mapping is applied.
|
|
13967
14151
|
|
|
13968
14152
|
**Guidance**
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
14153
|
+
Only `Active` rows run. `Draft` and `Inactive` rows keep their
|
|
14154
|
+
configuration, are saved with minimal validation, and are skipped at
|
|
14155
|
+
runtime and in preview; a non-Active parent skips its whole subtree
|
|
14156
|
+
whatever its children say. The API rejects a mapping missing this field
|
|
13972
14157
|
(validation error: "Mapping object must have status field present.").
|
|
13973
14158
|
x-celigo-ai-guidance:
|
|
13974
14159
|
- |-
|
|
@@ -13977,12 +14162,28 @@ components:
|
|
|
13977
14162
|
field validations. The value is case-sensitive. The API rejects:
|
|
13978
14163
|
- Missing field: `[status_field_absent] Mapping object must have status field present.`
|
|
13979
14164
|
- Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
|
|
14165
|
+
- |-
|
|
14166
|
+
`"Inactive"` is the user's "Set inactive" on a row: use it only when
|
|
14167
|
+
asked to disable or park a row, never to mean incomplete (that is
|
|
14168
|
+
`"Draft"`). Setting a parent `Inactive` means no `Active` row may
|
|
14169
|
+
remain under it — the save rejects an `Active` row under an
|
|
14170
|
+
`Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
|
|
14171
|
+
no message text) and never cascades or promotes on its own; `Draft`
|
|
14172
|
+
descendants are kept as they are, and a `Draft` parent does not gate
|
|
14173
|
+
its children. The UI's Set inactive on a parent marks the parent and
|
|
14174
|
+
every child `Inactive` (IO-166197). Re-enabling a child
|
|
14175
|
+
means re-enabling its ancestors in the same payload. Edits that keep
|
|
14176
|
+
existing rows must carry their stored status forward — rewriting a
|
|
14177
|
+
`Draft` or `Inactive` row to `Active` turns a row the user parked
|
|
14178
|
+
back on.
|
|
13980
14179
|
enum:
|
|
13981
14180
|
- Active
|
|
13982
14181
|
- Draft
|
|
14182
|
+
- Inactive
|
|
13983
14183
|
x-enumDescriptions:
|
|
13984
|
-
Active: The mapping is enabled and applied during processing
|
|
13985
|
-
Draft: In-progress mapping; saved without the Active-only field validations
|
|
14184
|
+
Active: The mapping is enabled and applied during processing
|
|
14185
|
+
Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
|
|
14186
|
+
Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
|
|
13986
14187
|
examples:
|
|
13987
14188
|
- Active
|
|
13988
14189
|
conditional:
|
|
@@ -14011,6 +14212,10 @@ components:
|
|
|
14011
14212
|
- `extract_not_empty`: Apply only when the extract field returns a value
|
|
14012
14213
|
Useful for conditional mapping based on input data availability
|
|
14013
14214
|
|
|
14215
|
+
- `fail_record_when_empty`: Fail the record when the extract field returns
|
|
14216
|
+
no value (the UI's "Cause record to fail" action when the source field
|
|
14217
|
+
has no value)
|
|
14218
|
+
|
|
14014
14219
|
**Example**
|
|
14015
14220
|
```json
|
|
14016
14221
|
{
|
|
@@ -14023,28 +14228,75 @@ components:
|
|
|
14023
14228
|
}
|
|
14024
14229
|
}
|
|
14025
14230
|
```
|
|
14231
|
+
x-celigo-ai-guidance:
|
|
14232
|
+
- |-
|
|
14233
|
+
`when` holds one value, and two different settings share it: the
|
|
14234
|
+
composite-import operation gate (`record_created` / `record_updated`,
|
|
14235
|
+
the UI's "Only perform mapping when") and the empty-source action
|
|
14236
|
+
(`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
|
|
14237
|
+
take if source field has no value"). A row cannot carry both — writing
|
|
14238
|
+
one replaces the other and the save succeeds, so a composite import
|
|
14239
|
+
row that needs both has to choose. Never author `fail_record_when_empty`
|
|
14240
|
+
on a row that already carries `record_created` or `record_updated`.
|
|
14026
14241
|
properties:
|
|
14027
14242
|
when:
|
|
14028
14243
|
type: string
|
|
14029
14244
|
description: |
|
|
14030
|
-
|
|
14031
|
-
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14245
|
+
Condition that gates this mapping — either an operation gate on a
|
|
14246
|
+
composite (create-or-update) import or the action to take when the
|
|
14247
|
+
extract returns no value. Empty means null, undefined or an empty
|
|
14248
|
+
string; `0`, `false` and whitespace are values.
|
|
14249
|
+
x-celigo-ai-guidance:
|
|
14250
|
+
- |-
|
|
14251
|
+
`fail_record_when_empty` is the fourth "Action to take if source field
|
|
14252
|
+
has no value" and is mutually exclusive with the other three: send it
|
|
14253
|
+
with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
|
|
14254
|
+
on the same row — or a `default` on a `buildArrayHelper` entry — is
|
|
14255
|
+
rejected at save with `[unsupported_mapping] "<key>" and conditional.when
|
|
14256
|
+
"fail_record_when_empty" cannot be present in mapping simultaneously.`
|
|
14257
|
+
(the lookup variant adds `Use lookup "allowFailures" instead.`);
|
|
14258
|
+
lookups fail through `allowFailures: false`, and a hard-coded row
|
|
14259
|
+
always has a value. At runtime an empty extract fails the record with
|
|
14260
|
+
an `errors[]` entry `{code: "extract_empty", fatal: true, source:
|
|
14261
|
+
"mapping", message: "<generate>: Source field has no value"}`
|
|
14262
|
+
("Input field has no value" in a Transformation 2.0); `0` and `false`
|
|
14263
|
+
are values and map through.
|
|
14034
14264
|
enum:
|
|
14035
14265
|
- record_created
|
|
14036
14266
|
- record_updated
|
|
14037
14267
|
- extract_not_empty
|
|
14268
|
+
- fail_record_when_empty
|
|
14038
14269
|
x-enumDescriptions:
|
|
14039
|
-
record_created: Apply this mapping only when creating a new record
|
|
14040
|
-
record_updated: Apply this mapping only when updating an existing record
|
|
14041
|
-
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
14270
|
+
record_created: Apply this mapping only when creating a new record
|
|
14271
|
+
record_updated: Apply this mapping only when updating an existing record
|
|
14272
|
+
extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
|
|
14273
|
+
fail_record_when_empty: Fail the record when the extract field returns no value
|
|
14042
14274
|
examples:
|
|
14043
14275
|
- record_created
|
|
14044
14276
|
- record_updated
|
|
14045
14277
|
- extract_not_empty
|
|
14278
|
+
- fail_record_when_empty
|
|
14046
14279
|
required:
|
|
14047
14280
|
- dataType
|
|
14281
|
+
if:
|
|
14282
|
+
properties:
|
|
14283
|
+
conditional:
|
|
14284
|
+
properties:
|
|
14285
|
+
when:
|
|
14286
|
+
const: fail_record_when_empty
|
|
14287
|
+
required:
|
|
14288
|
+
- when
|
|
14289
|
+
required:
|
|
14290
|
+
- conditional
|
|
14291
|
+
then:
|
|
14292
|
+
not:
|
|
14293
|
+
anyOf:
|
|
14294
|
+
- required:
|
|
14295
|
+
- default
|
|
14296
|
+
- required:
|
|
14297
|
+
- lookupName
|
|
14298
|
+
- required:
|
|
14299
|
+
- hardCodedValue
|
|
14048
14300
|
Lookups:
|
|
14049
14301
|
type: array
|
|
14050
14302
|
description: |
|