@celigo/api-specs 0.2.29 → 0.2.30
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 +110 -22
- package/dist/asynchelper.yml +110 -22
- package/dist/export.yml +119 -26
- package/dist/import.yml +110 -22
- package/dist/tool.yml +119 -26
- package/package.json +1 -1
- package/schemas.json +1 -1
package/dist/export.yml
CHANGED
|
@@ -904,10 +904,15 @@ components:
|
|
|
904
904
|
iterate ``{{#each rows}}``); hook code sees the array as the
|
|
905
905
|
record element and must not assume object shape.
|
|
906
906
|
- |-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
907
|
+
A grouped record is ONE record: Mapper 2.0 and Transform 2.0 root
|
|
908
|
+
JSONPath at the array (``$[0].<field>`` / ``$[*].<field>``;
|
|
909
|
+
``$.<field>`` resolves nothing), and a Transform 2.0 in ``mode:
|
|
910
|
+
"create"`` reshapes it in place — header fields from ``$[0]``, a
|
|
911
|
+
lines array from a ``buildArrayHelper`` over ``$[*]`` (``mode:
|
|
912
|
+
"modify"`` has no object to overlay and passes the array through
|
|
913
|
+
untouched). Changing how many records the page carries — each
|
|
914
|
+
row becoming its own record for every downstream step — is the
|
|
915
|
+
``preSavePage`` hook's job alone.
|
|
911
916
|
items:
|
|
912
917
|
type: string
|
|
913
918
|
examples:
|
|
@@ -12810,9 +12815,11 @@ components:
|
|
|
12810
12815
|
This field supports THREE DISTINCT PATTERNS that are easily distinguished:
|
|
12811
12816
|
|
|
12812
12817
|
**1. json Path Syntax**
|
|
12813
|
-
- MUST start with '
|
|
12818
|
+
- MUST start with '$' — the record root. An object record is addressed as
|
|
12819
|
+
'$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
|
|
12814
12820
|
- Used for precisely targeting data in structured JSON objects
|
|
12815
|
-
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
|
|
12821
|
+
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
|
|
12822
|
+
'$[*].Tax' (every row of a grouped record)
|
|
12816
12823
|
- Wildcards like [*] extract multiple values/objects
|
|
12817
12824
|
|
|
12818
12825
|
```json
|
|
@@ -12823,7 +12830,8 @@ components:
|
|
|
12823
12830
|
- Contains '{{' and '}}' pattern
|
|
12824
12831
|
- Evaluated by the AFE 2.0 handlebars template engine
|
|
12825
12832
|
- Can include logic, formatting, and computation
|
|
12826
|
-
- Access input record fields with {{record.fieldName}} notation
|
|
12833
|
+
- Access input record fields with {{record.fieldName}} notation; a grouped
|
|
12834
|
+
(array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
|
|
12827
12835
|
- Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
|
|
12828
12836
|
- Valid on `object`, `objectarray`, and primitive-array dataTypes as
|
|
12829
12837
|
well as scalars — the rendered template output must parse into the
|
|
@@ -12834,7 +12842,7 @@ components:
|
|
|
12834
12842
|
```
|
|
12835
12843
|
|
|
12836
12844
|
**3. Hard-Coded Value (literal string)**
|
|
12837
|
-
- Does NOT start with '
|
|
12845
|
+
- Does NOT start with '$'
|
|
12838
12846
|
- Does NOT contain handlebars '{{' syntax
|
|
12839
12847
|
- System treats it as a literal string value
|
|
12840
12848
|
- VERY COMMON for setting static/constant values
|
|
@@ -12856,10 +12864,38 @@ components:
|
|
|
12856
12864
|
- The system maintains this context even in deeply nested mappings
|
|
12857
12865
|
- For object mappings without child mappings, extract should return a complete object
|
|
12858
12866
|
- When both extract and mappings are defined for objects, extract is applied first
|
|
12867
|
+
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
12868
|
+
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
12869
|
+
grouped saved searches) roots at the array, so its rows are addressed as
|
|
12870
|
+
`$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
|
|
12871
|
+
record's shape resolves to nothing without an error.
|
|
12859
12872
|
|
|
12860
12873
|
For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
|
|
12861
12874
|
For hard-coded values, simply use the literal string as the extract value.
|
|
12862
12875
|
x-celigo-ai-guidance:
|
|
12876
|
+
- |-
|
|
12877
|
+
## GROUPED (ARRAY) RECORDS
|
|
12878
|
+
Decide the JSONPath root from the record's shape before writing
|
|
12879
|
+
any extract. When the record is an array of rows, `$.field`,
|
|
12880
|
+
`$.properties.field` and `$.rows[*].field` all resolve to
|
|
12881
|
+
nothing — the processor still reports success and the request
|
|
12882
|
+
body ships as `{}`. Address rows as `$[0].field` (that row's
|
|
12883
|
+
value, typed) or `$[*].field` (every row: joined with commas
|
|
12884
|
+
into a `string` destination; rejected with
|
|
12885
|
+
`incompatible_destination_conversion` into a `number`
|
|
12886
|
+
destination). Column labels with spaces work as
|
|
12887
|
+
`$[*][Order Number]`, `$[*].[Order Number]`, or
|
|
12888
|
+
`$[*]['Order Number']`. For one destination element per row
|
|
12889
|
+
the two array kinds take different helper forms: a primitive
|
|
12890
|
+
array (`stringarray` / `numberarray`) uses `buildArrayHelper:
|
|
12891
|
+
[{"extract": "$[*].field"}]`; an `objectarray` uses
|
|
12892
|
+
`buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
|
|
12893
|
+
with the children addressing the row relatively (`$.field`,
|
|
12894
|
+
`{{rows.field}}`). An `extract` placed directly on the
|
|
12895
|
+
array-typed field yields nothing. Handlebars
|
|
12896
|
+
extracts bind the array record as `rows` (`{{rows.0.field}}`),
|
|
12897
|
+
an object record as `record`. The reverse holds too: `$[*]` on
|
|
12898
|
+
an object record iterates the object's values, not rows.
|
|
12863
12899
|
- |-
|
|
12864
12900
|
## SIZE LIMIT
|
|
12865
12901
|
The platform's import save validator caps this field at **1024
|
|
@@ -13117,7 +13153,11 @@ components:
|
|
|
13117
13153
|
(`$.items[*]`), `"$"` (the record root), or omission — a
|
|
13118
13154
|
constructed entry (child `mappings` with the extract omitted or
|
|
13119
13155
|
`"$"`; the two spellings are equivalent) contributes exactly one
|
|
13120
|
-
element, and entries append in order.
|
|
13156
|
+
element, and entries append in order. On a grouped (array)
|
|
13157
|
+
record the record itself is the array to iterate: `"$[*]"`
|
|
13158
|
+
yields one `objectarray` element per row (children address the
|
|
13159
|
+
row as `$.field`), and `"$[*].field"` yields one primitive-array
|
|
13160
|
+
value per row. Indexed or comma-joined
|
|
13121
13161
|
entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
|
|
13122
13162
|
processor renders the entire destination array as null with no
|
|
13123
13163
|
validation error. To emit a fixed number of static elements, add
|
|
@@ -13138,7 +13178,9 @@ components:
|
|
|
13138
13178
|
|
|
13139
13179
|
**For Simple Arrays (stringarray, numberarray, booleanarray)**
|
|
13140
13180
|
- Only the 'extract' field is used to pull values
|
|
13141
|
-
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values
|
|
13181
|
+
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
|
|
13182
|
+
on a grouped (array) record the record itself is the array, so the
|
|
13183
|
+
path roots at it ($[*].name — one value per row)
|
|
13142
13184
|
- Each result is converted to the appropriate primitive type
|
|
13143
13185
|
```json
|
|
13144
13186
|
{
|
|
@@ -13240,11 +13282,13 @@ components:
|
|
|
13240
13282
|
- When both extract and mappings are provided, the system creates special composite objects
|
|
13241
13283
|
that maintain hierarchical context during processing
|
|
13242
13284
|
- This enables accessing both the current array element AND its parent context
|
|
13243
|
-
- An ITERATING entry's extract MUST
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13285
|
+
- An ITERATING entry's extract MUST be a JSON path that iterates an array:
|
|
13286
|
+
'$.items[*]' when the array is a field of an object record, or '$[*]'
|
|
13287
|
+
(objectarray) / '$[*].field' (primitive arrays) when the record itself is a
|
|
13288
|
+
grouped array of rows. A CONSTRUCTED entry (child mappings building one
|
|
13289
|
+
element) instead omits extract or sets it to exactly "$" — never rewrite "$"
|
|
13290
|
+
into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
|
|
13291
|
+
entire destination array as null without raising a validation error
|
|
13248
13292
|
- Each array helper entry acts independently, potentially adding multiple elements
|
|
13249
13293
|
|
|
13250
13294
|
The buildArrayHelper is the most complex part of the mappings system - always analyze the
|
|
@@ -13658,9 +13702,11 @@ components:
|
|
|
13658
13702
|
This field supports THREE DISTINCT PATTERNS that are easily distinguished:
|
|
13659
13703
|
|
|
13660
13704
|
**1. json Path Syntax**
|
|
13661
|
-
- MUST start with '
|
|
13705
|
+
- MUST start with '$' — the record root. An object record is addressed as
|
|
13706
|
+
'$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
|
|
13662
13707
|
- Used for precisely targeting data in structured JSON objects
|
|
13663
|
-
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
|
|
13708
|
+
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
|
|
13709
|
+
'$[*].Tax' (every row of a grouped record)
|
|
13664
13710
|
- Wildcards like [*] extract multiple values/objects
|
|
13665
13711
|
|
|
13666
13712
|
```json
|
|
@@ -13671,7 +13717,8 @@ components:
|
|
|
13671
13717
|
- Contains '{{' and '}}' pattern
|
|
13672
13718
|
- Evaluated by the AFE 2.0 handlebars template engine
|
|
13673
13719
|
- Can include logic, formatting, and computation
|
|
13674
|
-
- Access input record fields with {{record.fieldName}} notation
|
|
13720
|
+
- Access input record fields with {{record.fieldName}} notation; a grouped
|
|
13721
|
+
(array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
|
|
13675
13722
|
- Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
|
|
13676
13723
|
- Valid on `object`, `objectarray`, and primitive-array dataTypes as
|
|
13677
13724
|
well as scalars — the rendered template output must parse into the
|
|
@@ -13682,7 +13729,7 @@ components:
|
|
|
13682
13729
|
```
|
|
13683
13730
|
|
|
13684
13731
|
**3. Hard-Coded Value (literal string)**
|
|
13685
|
-
- Does NOT start with '
|
|
13732
|
+
- Does NOT start with '$'
|
|
13686
13733
|
- Does NOT contain handlebars '{{' syntax
|
|
13687
13734
|
- System treats it as a literal string value
|
|
13688
13735
|
- VERY COMMON for setting static/constant values
|
|
@@ -13704,10 +13751,38 @@ components:
|
|
|
13704
13751
|
- The system maintains this context even in deeply nested mappings
|
|
13705
13752
|
- For object mappings without child mappings, extract should return a complete object
|
|
13706
13753
|
- When both extract and mappings are defined for objects, extract is applied first
|
|
13754
|
+
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
13755
|
+
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
13756
|
+
grouped saved searches) roots at the array, so its rows are addressed as
|
|
13757
|
+
`$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
|
|
13758
|
+
record's shape resolves to nothing without an error.
|
|
13707
13759
|
|
|
13708
13760
|
For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
|
|
13709
13761
|
For hard-coded values, simply use the literal string as the extract value.
|
|
13710
13762
|
x-celigo-ai-guidance:
|
|
13763
|
+
- |-
|
|
13764
|
+
## GROUPED (ARRAY) RECORDS
|
|
13765
|
+
Decide the JSONPath root from the record's shape before writing
|
|
13766
|
+
any extract. When the record is an array of rows, `$.field`,
|
|
13767
|
+
`$.properties.field` and `$.rows[*].field` all resolve to
|
|
13768
|
+
nothing — the processor still reports success and the request
|
|
13769
|
+
body ships as `{}`. Address rows as `$[0].field` (that row's
|
|
13770
|
+
value, typed) or `$[*].field` (every row: joined with commas
|
|
13771
|
+
into a `string` destination; rejected with
|
|
13772
|
+
`incompatible_destination_conversion` into a `number`
|
|
13773
|
+
destination). Column labels with spaces work as
|
|
13774
|
+
`$[*][Order Number]`, `$[*].[Order Number]`, or
|
|
13775
|
+
`$[*]['Order Number']`. For one destination element per row
|
|
13776
|
+
the two array kinds take different helper forms: a primitive
|
|
13777
|
+
array (`stringarray` / `numberarray`) uses `buildArrayHelper:
|
|
13778
|
+
[{"extract": "$[*].field"}]`; an `objectarray` uses
|
|
13779
|
+
`buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
|
|
13780
|
+
with the children addressing the row relatively (`$.field`,
|
|
13781
|
+
`{{rows.field}}`). An `extract` placed directly on the
|
|
13782
|
+
array-typed field yields nothing. Handlebars
|
|
13783
|
+
extracts bind the array record as `rows` (`{{rows.0.field}}`),
|
|
13784
|
+
an object record as `record`. The reverse holds too: `$[*]` on
|
|
13785
|
+
an object record iterates the object's values, not rows.
|
|
13711
13786
|
- |-
|
|
13712
13787
|
## SIZE LIMIT
|
|
13713
13788
|
The platform's import save validator caps this field at **1024
|
|
@@ -13965,7 +14040,11 @@ components:
|
|
|
13965
14040
|
(`$.items[*]`), `"$"` (the record root), or omission — a
|
|
13966
14041
|
constructed entry (child `mappings` with the extract omitted or
|
|
13967
14042
|
`"$"`; the two spellings are equivalent) contributes exactly one
|
|
13968
|
-
element, and entries append in order.
|
|
14043
|
+
element, and entries append in order. On a grouped (array)
|
|
14044
|
+
record the record itself is the array to iterate: `"$[*]"`
|
|
14045
|
+
yields one `objectarray` element per row (children address the
|
|
14046
|
+
row as `$.field`), and `"$[*].field"` yields one primitive-array
|
|
14047
|
+
value per row. Indexed or comma-joined
|
|
13969
14048
|
entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
|
|
13970
14049
|
processor renders the entire destination array as null with no
|
|
13971
14050
|
validation error. To emit a fixed number of static elements, add
|
|
@@ -13986,7 +14065,9 @@ components:
|
|
|
13986
14065
|
|
|
13987
14066
|
**For Simple Arrays (stringarray, numberarray, booleanarray)**
|
|
13988
14067
|
- Only the 'extract' field is used to pull values
|
|
13989
|
-
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values
|
|
14068
|
+
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
|
|
14069
|
+
on a grouped (array) record the record itself is the array, so the
|
|
14070
|
+
path roots at it ($[*].name — one value per row)
|
|
13990
14071
|
- Each result is converted to the appropriate primitive type
|
|
13991
14072
|
```json
|
|
13992
14073
|
{
|
|
@@ -14088,11 +14169,13 @@ components:
|
|
|
14088
14169
|
- When both extract and mappings are provided, the system creates special composite objects
|
|
14089
14170
|
that maintain hierarchical context during processing
|
|
14090
14171
|
- This enables accessing both the current array element AND its parent context
|
|
14091
|
-
- An ITERATING entry's extract MUST
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
14095
|
-
|
|
14172
|
+
- An ITERATING entry's extract MUST be a JSON path that iterates an array:
|
|
14173
|
+
'$.items[*]' when the array is a field of an object record, or '$[*]'
|
|
14174
|
+
(objectarray) / '$[*].field' (primitive arrays) when the record itself is a
|
|
14175
|
+
grouped array of rows. A CONSTRUCTED entry (child mappings building one
|
|
14176
|
+
element) instead omits extract or sets it to exactly "$" — never rewrite "$"
|
|
14177
|
+
into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
|
|
14178
|
+
entire destination array as null without raising a validation error
|
|
14096
14179
|
- Each array helper entry acts independently, potentially adding multiple elements
|
|
14097
14180
|
|
|
14098
14181
|
The buildArrayHelper is the most complex part of the mappings system - always analyze the
|
|
@@ -14818,6 +14901,16 @@ components:
|
|
|
14818
14901
|
x-enumDescriptions:
|
|
14819
14902
|
create: Builds entirely new output records from inputs, ignoring unmapped fields.
|
|
14820
14903
|
modify: Makes targeted edits to existing records, preserving unmapped fields.
|
|
14904
|
+
x-celigo-ai-guidance:
|
|
14905
|
+
- |-
|
|
14906
|
+
On a grouped record (the export groups rows, so the record is an
|
|
14907
|
+
array) only `create` can author output — build it from the rows with
|
|
14908
|
+
`$[0].field`, `$[*].field`, or a `buildArrayHelper` over `$[*]`.
|
|
14909
|
+
`modify` has no object to overlay onto an array: the record passes
|
|
14910
|
+
through untouched and the processor reports success. Either mode
|
|
14911
|
+
reshapes the inside of one record; neither changes how many records
|
|
14912
|
+
the page carries (that is the export's `preSavePage` hook) or whether
|
|
14913
|
+
the export groups at all (that is its grouping setting).
|
|
14821
14914
|
examples:
|
|
14822
14915
|
- create
|
|
14823
14916
|
- modify
|
package/dist/import.yml
CHANGED
|
@@ -11232,9 +11232,11 @@ components:
|
|
|
11232
11232
|
This field supports THREE DISTINCT PATTERNS that are easily distinguished:
|
|
11233
11233
|
|
|
11234
11234
|
**1. json Path Syntax**
|
|
11235
|
-
- MUST start with '
|
|
11235
|
+
- MUST start with '$' — the record root. An object record is addressed as
|
|
11236
|
+
'$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
|
|
11236
11237
|
- Used for precisely targeting data in structured JSON objects
|
|
11237
|
-
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
|
|
11238
|
+
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
|
|
11239
|
+
'$[*].Tax' (every row of a grouped record)
|
|
11238
11240
|
- Wildcards like [*] extract multiple values/objects
|
|
11239
11241
|
|
|
11240
11242
|
```json
|
|
@@ -11245,7 +11247,8 @@ components:
|
|
|
11245
11247
|
- Contains '{{' and '}}' pattern
|
|
11246
11248
|
- Evaluated by the AFE 2.0 handlebars template engine
|
|
11247
11249
|
- Can include logic, formatting, and computation
|
|
11248
|
-
- Access input record fields with {{record.fieldName}} notation
|
|
11250
|
+
- Access input record fields with {{record.fieldName}} notation; a grouped
|
|
11251
|
+
(array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
|
|
11249
11252
|
- Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
|
|
11250
11253
|
- Valid on `object`, `objectarray`, and primitive-array dataTypes as
|
|
11251
11254
|
well as scalars — the rendered template output must parse into the
|
|
@@ -11256,7 +11259,7 @@ components:
|
|
|
11256
11259
|
```
|
|
11257
11260
|
|
|
11258
11261
|
**3. Hard-Coded Value (literal string)**
|
|
11259
|
-
- Does NOT start with '
|
|
11262
|
+
- Does NOT start with '$'
|
|
11260
11263
|
- Does NOT contain handlebars '{{' syntax
|
|
11261
11264
|
- System treats it as a literal string value
|
|
11262
11265
|
- VERY COMMON for setting static/constant values
|
|
@@ -11278,10 +11281,38 @@ components:
|
|
|
11278
11281
|
- The system maintains this context even in deeply nested mappings
|
|
11279
11282
|
- For object mappings without child mappings, extract should return a complete object
|
|
11280
11283
|
- When both extract and mappings are defined for objects, extract is applied first
|
|
11284
|
+
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
11285
|
+
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
11286
|
+
grouped saved searches) roots at the array, so its rows are addressed as
|
|
11287
|
+
`$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
|
|
11288
|
+
record's shape resolves to nothing without an error.
|
|
11281
11289
|
|
|
11282
11290
|
For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
|
|
11283
11291
|
For hard-coded values, simply use the literal string as the extract value.
|
|
11284
11292
|
x-celigo-ai-guidance:
|
|
11293
|
+
- |-
|
|
11294
|
+
## GROUPED (ARRAY) RECORDS
|
|
11295
|
+
Decide the JSONPath root from the record's shape before writing
|
|
11296
|
+
any extract. When the record is an array of rows, `$.field`,
|
|
11297
|
+
`$.properties.field` and `$.rows[*].field` all resolve to
|
|
11298
|
+
nothing — the processor still reports success and the request
|
|
11299
|
+
body ships as `{}`. Address rows as `$[0].field` (that row's
|
|
11300
|
+
value, typed) or `$[*].field` (every row: joined with commas
|
|
11301
|
+
into a `string` destination; rejected with
|
|
11302
|
+
`incompatible_destination_conversion` into a `number`
|
|
11303
|
+
destination). Column labels with spaces work as
|
|
11304
|
+
`$[*][Order Number]`, `$[*].[Order Number]`, or
|
|
11305
|
+
`$[*]['Order Number']`. For one destination element per row
|
|
11306
|
+
the two array kinds take different helper forms: a primitive
|
|
11307
|
+
array (`stringarray` / `numberarray`) uses `buildArrayHelper:
|
|
11308
|
+
[{"extract": "$[*].field"}]`; an `objectarray` uses
|
|
11309
|
+
`buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
|
|
11310
|
+
with the children addressing the row relatively (`$.field`,
|
|
11311
|
+
`{{rows.field}}`). An `extract` placed directly on the
|
|
11312
|
+
array-typed field yields nothing. Handlebars
|
|
11313
|
+
extracts bind the array record as `rows` (`{{rows.0.field}}`),
|
|
11314
|
+
an object record as `record`. The reverse holds too: `$[*]` on
|
|
11315
|
+
an object record iterates the object's values, not rows.
|
|
11285
11316
|
- |-
|
|
11286
11317
|
## SIZE LIMIT
|
|
11287
11318
|
The platform's import save validator caps this field at **1024
|
|
@@ -11539,7 +11570,11 @@ components:
|
|
|
11539
11570
|
(`$.items[*]`), `"$"` (the record root), or omission — a
|
|
11540
11571
|
constructed entry (child `mappings` with the extract omitted or
|
|
11541
11572
|
`"$"`; the two spellings are equivalent) contributes exactly one
|
|
11542
|
-
element, and entries append in order.
|
|
11573
|
+
element, and entries append in order. On a grouped (array)
|
|
11574
|
+
record the record itself is the array to iterate: `"$[*]"`
|
|
11575
|
+
yields one `objectarray` element per row (children address the
|
|
11576
|
+
row as `$.field`), and `"$[*].field"` yields one primitive-array
|
|
11577
|
+
value per row. Indexed or comma-joined
|
|
11543
11578
|
entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
|
|
11544
11579
|
processor renders the entire destination array as null with no
|
|
11545
11580
|
validation error. To emit a fixed number of static elements, add
|
|
@@ -11560,7 +11595,9 @@ components:
|
|
|
11560
11595
|
|
|
11561
11596
|
**For Simple Arrays (stringarray, numberarray, booleanarray)**
|
|
11562
11597
|
- Only the 'extract' field is used to pull values
|
|
11563
|
-
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values
|
|
11598
|
+
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
|
|
11599
|
+
on a grouped (array) record the record itself is the array, so the
|
|
11600
|
+
path roots at it ($[*].name — one value per row)
|
|
11564
11601
|
- Each result is converted to the appropriate primitive type
|
|
11565
11602
|
```json
|
|
11566
11603
|
{
|
|
@@ -11662,11 +11699,13 @@ components:
|
|
|
11662
11699
|
- When both extract and mappings are provided, the system creates special composite objects
|
|
11663
11700
|
that maintain hierarchical context during processing
|
|
11664
11701
|
- This enables accessing both the current array element AND its parent context
|
|
11665
|
-
- An ITERATING entry's extract MUST
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11702
|
+
- An ITERATING entry's extract MUST be a JSON path that iterates an array:
|
|
11703
|
+
'$.items[*]' when the array is a field of an object record, or '$[*]'
|
|
11704
|
+
(objectarray) / '$[*].field' (primitive arrays) when the record itself is a
|
|
11705
|
+
grouped array of rows. A CONSTRUCTED entry (child mappings building one
|
|
11706
|
+
element) instead omits extract or sets it to exactly "$" — never rewrite "$"
|
|
11707
|
+
into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
|
|
11708
|
+
entire destination array as null without raising a validation error
|
|
11670
11709
|
- Each array helper entry acts independently, potentially adding multiple elements
|
|
11671
11710
|
|
|
11672
11711
|
The buildArrayHelper is the most complex part of the mappings system - always analyze the
|
|
@@ -12080,9 +12119,11 @@ components:
|
|
|
12080
12119
|
This field supports THREE DISTINCT PATTERNS that are easily distinguished:
|
|
12081
12120
|
|
|
12082
12121
|
**1. json Path Syntax**
|
|
12083
|
-
- MUST start with '
|
|
12122
|
+
- MUST start with '$' — the record root. An object record is addressed as
|
|
12123
|
+
'$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
|
|
12084
12124
|
- Used for precisely targeting data in structured JSON objects
|
|
12085
|
-
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
|
|
12125
|
+
- Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
|
|
12126
|
+
'$[*].Tax' (every row of a grouped record)
|
|
12086
12127
|
- Wildcards like [*] extract multiple values/objects
|
|
12087
12128
|
|
|
12088
12129
|
```json
|
|
@@ -12093,7 +12134,8 @@ components:
|
|
|
12093
12134
|
- Contains '{{' and '}}' pattern
|
|
12094
12135
|
- Evaluated by the AFE 2.0 handlebars template engine
|
|
12095
12136
|
- Can include logic, formatting, and computation
|
|
12096
|
-
- Access input record fields with {{record.fieldName}} notation
|
|
12137
|
+
- Access input record fields with {{record.fieldName}} notation; a grouped
|
|
12138
|
+
(array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
|
|
12097
12139
|
- Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
|
|
12098
12140
|
- Valid on `object`, `objectarray`, and primitive-array dataTypes as
|
|
12099
12141
|
well as scalars — the rendered template output must parse into the
|
|
@@ -12104,7 +12146,7 @@ components:
|
|
|
12104
12146
|
```
|
|
12105
12147
|
|
|
12106
12148
|
**3. Hard-Coded Value (literal string)**
|
|
12107
|
-
- Does NOT start with '
|
|
12149
|
+
- Does NOT start with '$'
|
|
12108
12150
|
- Does NOT contain handlebars '{{' syntax
|
|
12109
12151
|
- System treats it as a literal string value
|
|
12110
12152
|
- VERY COMMON for setting static/constant values
|
|
@@ -12126,10 +12168,38 @@ components:
|
|
|
12126
12168
|
- The system maintains this context even in deeply nested mappings
|
|
12127
12169
|
- For object mappings without child mappings, extract should return a complete object
|
|
12128
12170
|
- When both extract and mappings are defined for objects, extract is applied first
|
|
12171
|
+
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
12172
|
+
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
12173
|
+
grouped saved searches) roots at the array, so its rows are addressed as
|
|
12174
|
+
`$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
|
|
12175
|
+
record's shape resolves to nothing without an error.
|
|
12129
12176
|
|
|
12130
12177
|
For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
|
|
12131
12178
|
For hard-coded values, simply use the literal string as the extract value.
|
|
12132
12179
|
x-celigo-ai-guidance:
|
|
12180
|
+
- |-
|
|
12181
|
+
## GROUPED (ARRAY) RECORDS
|
|
12182
|
+
Decide the JSONPath root from the record's shape before writing
|
|
12183
|
+
any extract. When the record is an array of rows, `$.field`,
|
|
12184
|
+
`$.properties.field` and `$.rows[*].field` all resolve to
|
|
12185
|
+
nothing — the processor still reports success and the request
|
|
12186
|
+
body ships as `{}`. Address rows as `$[0].field` (that row's
|
|
12187
|
+
value, typed) or `$[*].field` (every row: joined with commas
|
|
12188
|
+
into a `string` destination; rejected with
|
|
12189
|
+
`incompatible_destination_conversion` into a `number`
|
|
12190
|
+
destination). Column labels with spaces work as
|
|
12191
|
+
`$[*][Order Number]`, `$[*].[Order Number]`, or
|
|
12192
|
+
`$[*]['Order Number']`. For one destination element per row
|
|
12193
|
+
the two array kinds take different helper forms: a primitive
|
|
12194
|
+
array (`stringarray` / `numberarray`) uses `buildArrayHelper:
|
|
12195
|
+
[{"extract": "$[*].field"}]`; an `objectarray` uses
|
|
12196
|
+
`buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
|
|
12197
|
+
with the children addressing the row relatively (`$.field`,
|
|
12198
|
+
`{{rows.field}}`). An `extract` placed directly on the
|
|
12199
|
+
array-typed field yields nothing. Handlebars
|
|
12200
|
+
extracts bind the array record as `rows` (`{{rows.0.field}}`),
|
|
12201
|
+
an object record as `record`. The reverse holds too: `$[*]` on
|
|
12202
|
+
an object record iterates the object's values, not rows.
|
|
12133
12203
|
- |-
|
|
12134
12204
|
## SIZE LIMIT
|
|
12135
12205
|
The platform's import save validator caps this field at **1024
|
|
@@ -12387,7 +12457,11 @@ components:
|
|
|
12387
12457
|
(`$.items[*]`), `"$"` (the record root), or omission — a
|
|
12388
12458
|
constructed entry (child `mappings` with the extract omitted or
|
|
12389
12459
|
`"$"`; the two spellings are equivalent) contributes exactly one
|
|
12390
|
-
element, and entries append in order.
|
|
12460
|
+
element, and entries append in order. On a grouped (array)
|
|
12461
|
+
record the record itself is the array to iterate: `"$[*]"`
|
|
12462
|
+
yields one `objectarray` element per row (children address the
|
|
12463
|
+
row as `$.field`), and `"$[*].field"` yields one primitive-array
|
|
12464
|
+
value per row. Indexed or comma-joined
|
|
12391
12465
|
entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
|
|
12392
12466
|
processor renders the entire destination array as null with no
|
|
12393
12467
|
validation error. To emit a fixed number of static elements, add
|
|
@@ -12408,7 +12482,9 @@ components:
|
|
|
12408
12482
|
|
|
12409
12483
|
**For Simple Arrays (stringarray, numberarray, booleanarray)**
|
|
12410
12484
|
- Only the 'extract' field is used to pull values
|
|
12411
|
-
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values
|
|
12485
|
+
- JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
|
|
12486
|
+
on a grouped (array) record the record itself is the array, so the
|
|
12487
|
+
path roots at it ($[*].name — one value per row)
|
|
12412
12488
|
- Each result is converted to the appropriate primitive type
|
|
12413
12489
|
```json
|
|
12414
12490
|
{
|
|
@@ -12510,11 +12586,13 @@ components:
|
|
|
12510
12586
|
- When both extract and mappings are provided, the system creates special composite objects
|
|
12511
12587
|
that maintain hierarchical context during processing
|
|
12512
12588
|
- This enables accessing both the current array element AND its parent context
|
|
12513
|
-
- An ITERATING entry's extract MUST
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12589
|
+
- An ITERATING entry's extract MUST be a JSON path that iterates an array:
|
|
12590
|
+
'$.items[*]' when the array is a field of an object record, or '$[*]'
|
|
12591
|
+
(objectarray) / '$[*].field' (primitive arrays) when the record itself is a
|
|
12592
|
+
grouped array of rows. A CONSTRUCTED entry (child mappings building one
|
|
12593
|
+
element) instead omits extract or sets it to exactly "$" — never rewrite "$"
|
|
12594
|
+
into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
|
|
12595
|
+
entire destination array as null without raising a validation error
|
|
12518
12596
|
- Each array helper entry acts independently, potentially adding multiple elements
|
|
12519
12597
|
|
|
12520
12598
|
The buildArrayHelper is the most complex part of the mappings system - always analyze the
|
|
@@ -12971,6 +13049,16 @@ components:
|
|
|
12971
13049
|
x-enumDescriptions:
|
|
12972
13050
|
create: Builds entirely new output records from inputs, ignoring unmapped fields.
|
|
12973
13051
|
modify: Makes targeted edits to existing records, preserving unmapped fields.
|
|
13052
|
+
x-celigo-ai-guidance:
|
|
13053
|
+
- |-
|
|
13054
|
+
On a grouped record (the export groups rows, so the record is an
|
|
13055
|
+
array) only `create` can author output — build it from the rows with
|
|
13056
|
+
`$[0].field`, `$[*].field`, or a `buildArrayHelper` over `$[*]`.
|
|
13057
|
+
`modify` has no object to overlay onto an array: the record passes
|
|
13058
|
+
through untouched and the processor reports success. Either mode
|
|
13059
|
+
reshapes the inside of one record; neither changes how many records
|
|
13060
|
+
the page carries (that is the export's `preSavePage` hook) or whether
|
|
13061
|
+
the export groups at all (that is its grouping setting).
|
|
12974
13062
|
examples:
|
|
12975
13063
|
- create
|
|
12976
13064
|
- modify
|