@celigo/api-specs 0.2.10 → 0.2.11
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/export.yml +193 -613
- package/dist/tool.yml +193 -613
- package/package.json +1 -1
- package/schemas.json +492 -435
package/dist/export.yml
CHANGED
|
@@ -10080,45 +10080,10 @@ components:
|
|
|
10080
10080
|
related rows. When false or omitted, related rows are grouped before processing.
|
|
10081
10081
|
x-celigo-ai-guidance:
|
|
10082
10082
|
- |-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
-
|
|
10087
|
-
## FIELD BEHAVIOR:
|
|
10088
|
-
- When set to true, the system processes each record or transaction independently, without combining them into groups based on shared attributes.
|
|
10089
|
-
- When set to false or omitted, related records or transactions are aggregated according to predefined grouping criteria (e.g., by customer, date, or transaction type) before processing.
|
|
10090
|
-
- Influences how data is structured, summarized, and reported in outputs or passed to downstream systems.
|
|
10091
|
-
- Affects the level of detail and granularity available in the processed data.
|
|
10092
|
-
- |-
|
|
10093
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10094
|
-
- Utilize this flag to control processing granularity, especially when detailed, record-level analysis or reporting is required.
|
|
10095
|
-
- Confirm that downstream systems, reports, or integrations can accommodate ungrouped data if skipGrouping is enabled.
|
|
10096
|
-
- Assess the potential impact on system performance and data volume, as disabling grouping may significantly increase the number of processed items.
|
|
10097
|
-
- Consider the use case carefully: grouping is generally preferred for summary reports, while skipping grouping suits detailed audits or troubleshooting.
|
|
10098
|
-
- For `exportSelect` / `refreshableSelect` dropdowns backed by a NetSuite RESTlet, set `skipGrouping: true`: the UI's option mapper expects flat per-row results, and the platform otherwise wraps each row in its own grouping list (every option's `label` then renders as `undefined`).
|
|
10099
|
-
- |-
|
|
10100
|
-
## EXAMPLES:
|
|
10101
|
-
- skipGrouping: true — Processes each transaction separately, providing detailed, unaggregated data.
|
|
10102
|
-
- skipGrouping: false — Groups transactions by customer or date, producing summarized results.
|
|
10103
|
-
- skipGrouping omitted — Defaults to grouping enabled, aggregating related records.
|
|
10104
|
-
- |-
|
|
10105
|
-
## IMPORTANT NOTES:
|
|
10106
|
-
- Enabling skipGrouping can lead to increased processing time, higher memory usage, and larger output datasets.
|
|
10107
|
-
- Some reports, dashboards, or integrations may require grouped data; verify compatibility before enabling this option.
|
|
10108
|
-
- The default behavior is typically grouping enabled (skipGrouping = false) unless explicitly overridden.
|
|
10109
|
-
- Changes to this setting may affect data consistency and comparability with previously generated reports.
|
|
10110
|
-
- |-
|
|
10111
|
-
## DEPENDENCY CHAIN:
|
|
10112
|
-
- Often depends on other properties that define grouping keys or criteria (e.g., groupBy fields).
|
|
10113
|
-
- May interact with filtering, sorting, or pagination settings within the processing pipeline.
|
|
10114
|
-
- Could influence or be influenced by aggregation functions or summary calculations applied downstream.
|
|
10115
|
-
- |-
|
|
10116
|
-
## TECHNICAL DETAILS:
|
|
10117
|
-
- Data type: Boolean.
|
|
10118
|
-
- Default value: false (grouping enabled).
|
|
10119
|
-
- Implemented as a conditional flag checked during the data aggregation phase.
|
|
10120
|
-
- When true, bypasses aggregation logic and processes each record individually.
|
|
10121
|
-
- Typically integrated into the processing workflow to toggle between grouped and ungrouped data handling.
|
|
10083
|
+
Set `true` for an ad-hoc RESTlet search (criteria and columns without a saved
|
|
10084
|
+
search): grouping needs the search sorted by the grouping key, and an unsorted ad-hoc
|
|
10085
|
+
search fails with `[search_not_sorted]`.
|
|
10086
|
+
- 'For `exportSelect` / `refreshableSelect` dropdowns backed by a NetSuite RESTlet, set `skipGrouping: true`: the UI''s option mapper expects flat per-row results, and the platform otherwise wraps each row in its own grouping list (every option''s `label` then renders as `undefined`).'
|
|
10122
10087
|
statsOnly:
|
|
10123
10088
|
type: boolean
|
|
10124
10089
|
description: |-
|
|
@@ -10326,45 +10291,10 @@ components:
|
|
|
10326
10291
|
- purchaseOrder
|
|
10327
10292
|
x-celigo-ai-guidance:
|
|
10328
10293
|
- |-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
- |-
|
|
10334
|
-
## FIELD BEHAVIOR:
|
|
10335
|
-
- Defines the specific NetSuite record type (e.g., customer, salesOrder, invoice) targeted by the RESTlet.
|
|
10336
|
-
- Influences the structure and format of data payloads sent to and received from the RESTlet.
|
|
10337
|
-
- Controls validation rules, mandatory fields, and available operations based on the selected record type.
|
|
10338
|
-
- Affects permissions and access controls enforced during RESTlet execution, ensuring compliance with NetSuite security settings.
|
|
10339
|
-
- Determines the applicable business logic and workflows triggered by the RESTlet for the specified record type.
|
|
10340
|
-
- |-
|
|
10341
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10342
|
-
- Use the exact internal ID or script ID of the NetSuite record type as recognized by the NetSuite system to ensure accurate targeting.
|
|
10343
|
-
- Validate the recordType value against the list of supported NetSuite record types to prevent runtime errors and ensure compatibility.
|
|
10344
|
-
- Confirm that the RESTlet script has the necessary permissions and roles assigned to access and manipulate the specified record type.
|
|
10345
|
-
- When handling multiple record types dynamically, implement conditional logic to accommodate differences in data structure and processing requirements.
|
|
10346
|
-
- For custom record types, always use the script ID format (e.g., "customrecord_myCustomRecord") to avoid ambiguity.
|
|
10347
|
-
- Test RESTlet behavior thoroughly after changing the recordType to verify correct handling of data and operations.
|
|
10348
|
-
- |-
|
|
10349
|
-
## EXAMPLES:
|
|
10350
|
-
- "customer"
|
|
10351
|
-
- "salesOrder"
|
|
10352
|
-
- "invoice"
|
|
10353
|
-
- "employee"
|
|
10354
|
-
- "customrecord_myCustomRecord"
|
|
10355
|
-
- "vendor"
|
|
10356
|
-
- "purchaseOrder"
|
|
10357
|
-
- |-
|
|
10358
|
-
## IMPORTANT NOTES:
|
|
10359
|
-
- The recordType must correspond to a valid and supported NetSuite record type; invalid values will cause API calls to fail.
|
|
10360
|
-
- Custom record types require referencing by their script IDs, which typically start with "customrecord_".
|
|
10361
|
-
- Modifying the recordType may necessitate updates to the RESTlet's codebase to handle different data schemas and business logic.
|
|
10362
|
-
- Permissions and role restrictions in NetSuite can limit access to certain record types, impacting RESTlet functionality.
|
|
10363
|
-
- Consistency in recordType usage is critical for maintaining data integrity and predictable RESTlet behavior.
|
|
10364
|
-
- |-
|
|
10365
|
-
## DEPENDENCY CHAIN:
|
|
10366
|
-
- Depends on the NetSuite environment's available record types and their configurations.
|
|
10367
|
-
- Influences the RESTlet's data validation, processing logic, and response formatting.
|
|
10294
|
+
Saved searches over any transaction type (sales orders, purchase orders,
|
|
10295
|
+
invoices, ...) run with `recordType: "transaction"` and narrow the type through the
|
|
10296
|
+
search or a `criteria` row such as `{"field": "type", "operator": "anyof",
|
|
10297
|
+
"searchValue": ["PurchOrd"]}`.
|
|
10368
10298
|
batchSize:
|
|
10369
10299
|
type: number
|
|
10370
10300
|
description: |-
|
|
@@ -10383,49 +10313,16 @@ components:
|
|
|
10383
10313
|
saved search's current definition, so editing the search in NetSuite changes the
|
|
10384
10314
|
export output without changing this ID.
|
|
10385
10315
|
examples:
|
|
10386
|
-
- '
|
|
10387
|
-
-
|
|
10388
|
-
- '
|
|
10389
|
-
- '2002'
|
|
10316
|
+
- '9013'
|
|
10317
|
+
- customsearch_plan_velocity
|
|
10318
|
+
- '-1'
|
|
10390
10319
|
x-celigo-ai-guidance:
|
|
10391
10320
|
- |-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
- |-
|
|
10398
|
-
## FIELD BEHAVIOR:
|
|
10399
|
-
- Specifies the exact saved search to be executed by the RESTlet.
|
|
10400
|
-
- Must correspond to a valid and existing saved search internal ID within the NetSuite account.
|
|
10401
|
-
- Determines the dataset and filters applied when retrieving search results.
|
|
10402
|
-
- Typically required when invoking the RESTlet to perform search operations.
|
|
10403
|
-
- Influences the structure and content of the response based on the saved search definition.
|
|
10404
|
-
- |-
|
|
10405
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10406
|
-
- Verify that the searchId matches an existing saved search internal ID in the target NetSuite environment.
|
|
10407
|
-
- Validate the searchId format and existence before making the RESTlet call to prevent runtime errors.
|
|
10408
|
-
- Use the internal ID as a string or numeric value consistent with NetSuite's conventions.
|
|
10409
|
-
- Implement error handling for scenarios where the searchId is invalid, missing, or inaccessible due to permission restrictions.
|
|
10410
|
-
- Ensure the integration role or user has appropriate permissions to access and execute the saved search.
|
|
10411
|
-
- Consider caching or documenting frequently used searchIds to improve maintainability.
|
|
10412
|
-
- |-
|
|
10413
|
-
## EXAMPLES:
|
|
10414
|
-
- "1234" — a numeric internal ID representing a specific saved search.
|
|
10415
|
-
- "5678" — another valid saved search internal ID.
|
|
10416
|
-
- "1001" — an example of a saved search ID used to retrieve customer records.
|
|
10417
|
-
- "2002" — a saved search ID configured to return transaction data.
|
|
10418
|
-
- |-
|
|
10419
|
-
## IMPORTANT NOTES:
|
|
10420
|
-
- The searchId must be accessible by the user or integration role making the RESTlet call; otherwise, access will be denied.
|
|
10421
|
-
- Providing an incorrect or non-existent searchId will result in errors or empty search results.
|
|
10422
|
-
- Permissions and sharing settings on the saved search directly affect the data returned by the RESTlet.
|
|
10423
|
-
- The saved search must be properly configured with the desired filters, columns, and criteria to ensure meaningful results.
|
|
10424
|
-
- Changes to the saved search (e.g., modifying filters or columns) will impact the RESTlet output without changing the searchId.
|
|
10425
|
-
- |-
|
|
10426
|
-
## DEPENDENCY CHAIN:
|
|
10427
|
-
- Depends on the existence of a saved search configured in the NetSuite account.
|
|
10428
|
-
- Requires appropriate user or integration role permissions to access the saved search.
|
|
10321
|
+
Accepts the saved search's internal id (`"9013"`) or script id
|
|
10322
|
+
(`"customsearch_..."`). `"-1"` means no saved search: the RESTlet builds an ad-hoc
|
|
10323
|
+
search from `recordType` + `criteria` + `columns` (see `columns` — required in
|
|
10324
|
+
that mode, along with `netsuite.skipGrouping: true`). Omitting both `searchId`
|
|
10325
|
+
and `columns` fails with `[celigo_config_error] searchId or columns are required`.
|
|
10429
10326
|
useSS2Restlets:
|
|
10430
10327
|
type: boolean
|
|
10431
10328
|
description: |-
|
|
@@ -10435,40 +10332,13 @@ components:
|
|
|
10435
10332
|
creation-time-only constraint applies (see restletVersion).
|
|
10436
10333
|
x-celigo-ai-guidance:
|
|
10437
10334
|
- |-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
This setting controls the version of RESTlets invoked during API communication with NetSuite,
|
|
10442
|
-
impacting compatibility, performance, and available features.
|
|
10443
|
-
- |-
|
|
10444
|
-
## FIELD BEHAVIOR:
|
|
10445
|
-
- Determines the RESTlet version used for all API interactions within the NetSuite integration.
|
|
10446
|
-
- When set to `true`, the system exclusively uses SuiteScript 2.0 RESTlets.
|
|
10447
|
-
- When set to `false` or omitted, SuiteScript 1.0 RESTlets are used by default.
|
|
10448
|
-
- Influences the structure, capabilities, and response formats of API calls.
|
|
10449
|
-
- |-
|
|
10450
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10451
|
-
- This is an authoring-time choice: set it when creating the step (true unless the user explicitly needs a legacy version). It cannot be toggled on a saved step — moving an existing step to a different version means recreating or cloning it.
|
|
10452
|
-
- Verify that the integrator.io SuiteApp is installed in the target NetSuite environment when authoring SuiteScript 2.0 steps.
|
|
10453
|
-
- When migrating by recreation, verify any SuiteScript hooks are written for the matching version before cutting over.
|
|
10454
|
-
- |-
|
|
10455
|
-
## EXAMPLES:
|
|
10456
|
-
- `true` — API calls will utilize SuiteScript 2.0 RESTlets, enabling modern scripting features.
|
|
10457
|
-
- `false` — API calls will continue using legacy SuiteScript 1.0 RESTlets for backward compatibility.
|
|
10458
|
-
- |-
|
|
10459
|
-
## IMPORTANT NOTES:
|
|
10460
|
-
- SuiteScript 2.0 RESTlets support modular script architecture and ES6+ JavaScript features, improving maintainability and performance.
|
|
10461
|
-
- Legacy RESTlets written in SuiteScript 1.0 may not be compatible with SuiteScript 2.0; migration or parallel support might be required.
|
|
10462
|
-
- This setting is fixed once the step is saved (same creation-time-only constraint as restletVersion) — moving a step between RESTlet versions means recreating or cloning it, which can change API response formats and behaviors for downstream systems.
|
|
10463
|
-
- Plan a version migration deliberately: recreate the step with the new version, verify any hooks are written for the matching SuiteScript version, and keep the old step until the new one is verified.
|
|
10464
|
-
- |-
|
|
10465
|
-
## DEPENDENCY CHAIN:
|
|
10466
|
-
- Depends on the deployment and availability of SuiteScript 2.0 RESTlets within the NetSuite account.
|
|
10467
|
-
- Requires that the API client and integration logic support the RESTlet version selected.
|
|
10468
|
-
- May depend on other configuration settings related to authentication and script permissions.
|
|
10335
|
+
An authoring-time choice: set it when creating the step (true unless the user
|
|
10336
|
+
explicitly needs a legacy version). It cannot be toggled on a saved step — moving
|
|
10337
|
+
an existing step to a different version means recreating or cloning it.
|
|
10469
10338
|
- |-
|
|
10470
|
-
|
|
10471
|
-
|
|
10339
|
+
SuiteScript 2.0 steps need the integrator.io SuiteApp installed in the target
|
|
10340
|
+
NetSuite account, and any SuiteScript hooks must be written for the step's
|
|
10341
|
+
version — verify both before cutting a recreated step over.
|
|
10472
10342
|
restletVersion:
|
|
10473
10343
|
type: string
|
|
10474
10344
|
enum:
|
|
@@ -10552,30 +10422,107 @@ components:
|
|
|
10552
10422
|
of the base record. Must match a join name NetSuite defines for the record type.
|
|
10553
10423
|
operator:
|
|
10554
10424
|
type: string
|
|
10425
|
+
enum:
|
|
10426
|
+
- after
|
|
10427
|
+
- allof
|
|
10428
|
+
- any
|
|
10429
|
+
- anyof
|
|
10430
|
+
- before
|
|
10431
|
+
- between
|
|
10432
|
+
- contains
|
|
10433
|
+
- doesnotcontain
|
|
10434
|
+
- doesnotstartwith
|
|
10435
|
+
- equalto
|
|
10436
|
+
- greaterthan
|
|
10437
|
+
- greaterthanorequalto
|
|
10438
|
+
- haskeywords
|
|
10439
|
+
- is
|
|
10440
|
+
- isempty
|
|
10441
|
+
- isnot
|
|
10442
|
+
- isnotempty
|
|
10443
|
+
- lessthan
|
|
10444
|
+
- lessthanorequalto
|
|
10445
|
+
- noneof
|
|
10446
|
+
- notafter
|
|
10447
|
+
- notallof
|
|
10448
|
+
- notbefore
|
|
10449
|
+
- notbetween
|
|
10450
|
+
- notequalto
|
|
10451
|
+
- notgreaterthan
|
|
10452
|
+
- notlessthan
|
|
10453
|
+
- notlessthanorequalto
|
|
10454
|
+
- noton
|
|
10455
|
+
- notonorafter
|
|
10456
|
+
- notonorbefore
|
|
10457
|
+
- notwithin
|
|
10458
|
+
- 'on'
|
|
10459
|
+
- onorafter
|
|
10460
|
+
- onorbefore
|
|
10461
|
+
- startswith
|
|
10462
|
+
- within
|
|
10463
|
+
x-enumDescriptions:
|
|
10464
|
+
after: Date column is after the value
|
|
10465
|
+
allof: Multi-select column contains every value in the array
|
|
10466
|
+
any: NetSuite's any operator for list and multi-select columns
|
|
10467
|
+
anyof: List or select column equals any value in the array
|
|
10468
|
+
before: Date column is before the value
|
|
10469
|
+
between: Numeric column lies between searchValue and searchValue2
|
|
10470
|
+
contains: Text column contains the substring
|
|
10471
|
+
doesnotcontain: Text column does not contain the substring
|
|
10472
|
+
doesnotstartwith: Text column does not start with the value
|
|
10473
|
+
equalto: Numeric column equals the value
|
|
10474
|
+
greaterthan: Numeric column is greater than the value
|
|
10475
|
+
greaterthanorequalto: Numeric column is greater than or equal to the value
|
|
10476
|
+
haskeywords: Text column contains the keywords
|
|
10477
|
+
is: Text or checkbox column equals the value exactly (checkboxes use T or F)
|
|
10478
|
+
isempty: Column has no value
|
|
10479
|
+
isnot: Text or checkbox column does not equal the value
|
|
10480
|
+
isnotempty: Column has a value
|
|
10481
|
+
lessthan: Numeric column is less than the value
|
|
10482
|
+
lessthanorequalto: Numeric column is less than or equal to the value
|
|
10483
|
+
noneof: List or select column equals none of the values in the array
|
|
10484
|
+
notafter: Date column is not after the value
|
|
10485
|
+
notallof: Multi-select column does not contain every value in the array
|
|
10486
|
+
notbefore: Date column is not before the value
|
|
10487
|
+
notbetween: Numeric column lies outside searchValue and searchValue2
|
|
10488
|
+
notequalto: Numeric column does not equal the value
|
|
10489
|
+
notgreaterthan: Numeric column is not greater than the value
|
|
10490
|
+
notlessthan: Numeric column is not less than the value
|
|
10491
|
+
notlessthanorequalto: Numeric column is not less than or equal to the value
|
|
10492
|
+
noton: Date column is not on the value
|
|
10493
|
+
notonorafter: Date column is not on or after the value
|
|
10494
|
+
notonorbefore: Date column is not on or before the value
|
|
10495
|
+
notwithin: Date column is outside the range
|
|
10496
|
+
'on': Date column is on the value
|
|
10497
|
+
onorafter: Date column is on or after the value
|
|
10498
|
+
onorbefore: Date column is on or before the value
|
|
10499
|
+
startswith: Text column starts with the value
|
|
10500
|
+
within: Date column is within the range
|
|
10555
10501
|
description: |-
|
|
10556
|
-
Comparison operator applied between the column and the search value,
|
|
10557
|
-
NetSuite's lowercase search operator names
|
|
10558
|
-
|
|
10502
|
+
Comparison operator applied between the column and the search value, using
|
|
10503
|
+
NetSuite's lowercase search operator names. Which operators a column accepts
|
|
10504
|
+
depends on its data type.
|
|
10559
10505
|
examples:
|
|
10560
10506
|
- is
|
|
10561
10507
|
- anyof
|
|
10562
10508
|
- equalto
|
|
10563
10509
|
x-celigo-ai-guidance:
|
|
10564
10510
|
- |-
|
|
10565
|
-
The server validates the value against
|
|
10566
|
-
|
|
10567
|
-
|
|
10511
|
+
The server validates the value against this list and rejects anything else
|
|
10512
|
+
with a 422 enum error — including logical words such as `OR`; conditions are
|
|
10513
|
+
never joined through this property.
|
|
10568
10514
|
- |-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
`searchValue`
|
|
10572
|
-
|
|
10573
|
-
`
|
|
10515
|
+
Numeric operators (`equalto`, `notequalto`, `greaterthan`, `lessthan`, the
|
|
10516
|
+
`...orequalto` / `not...` variants, `between`, `notbetween`) make the platform
|
|
10517
|
+
coerce a templated `searchValue` to a number, and NetSuite rejects them on text
|
|
10518
|
+
columns with `sss_invalid_srch_operator`. Compare text and checkbox columns
|
|
10519
|
+
with `is` / `isnot` and list or select columns with `anyof` / `noneof` (array
|
|
10520
|
+
`searchValue`).
|
|
10574
10521
|
searchValue:
|
|
10575
10522
|
description: |-
|
|
10576
|
-
Value the column is compared against — a string, or an array of
|
|
10577
|
-
`anyof`-style operators. On lookup steps it may be a Handlebars
|
|
10578
|
-
rendered from the incoming record (for example `{{poNumber}}`).
|
|
10523
|
+
Value the column is compared against — a string, a number, or an array of
|
|
10524
|
+
values for `anyof`-style operators. On lookup steps it may be a Handlebars
|
|
10525
|
+
expression rendered from the incoming record (for example `{{poNumber}}`).
|
|
10579
10526
|
examples:
|
|
10580
10527
|
- '{{poNumber}}'
|
|
10581
10528
|
- F
|
|
@@ -10587,51 +10534,17 @@ components:
|
|
|
10587
10534
|
from template"). A standalone preview of a lookup that uses `{{...}}` here
|
|
10588
10535
|
fails the same way — outside a flow run there is no record to render from;
|
|
10589
10536
|
preview with a literal value or through a flow test run instead.
|
|
10537
|
+
- |-
|
|
10538
|
+
With a numeric `operator` the rendered value is coerced to a number before the
|
|
10539
|
+
search runs, so a template must resolve to something numeric.
|
|
10590
10540
|
searchValue2:
|
|
10591
|
-
type: string
|
|
10592
10541
|
description: |-
|
|
10593
|
-
Second comparison value for
|
|
10594
|
-
|
|
10542
|
+
Second comparison value for the two-value operators `between` and `notbetween`
|
|
10543
|
+
(the upper bound). Omit for every other operator.
|
|
10595
10544
|
x-celigo-ai-guidance:
|
|
10596
10545
|
- |-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
It is typically used in conjunction with search operators that require two values,
|
|
10600
|
-
such as "between" or "not between," to define a range or a pair of comparison values.
|
|
10601
|
-
- |-
|
|
10602
|
-
## FIELD BEHAVIOR:
|
|
10603
|
-
- Represents the second operand or value in a search condition.
|
|
10604
|
-
- Used primarily with operators that require two values (e.g., "between", "not between").
|
|
10605
|
-
- Optional field; may be omitted if the operator only requires a single value.
|
|
10606
|
-
- Works alongside searchValue (the first value) to form a complete search criterion.
|
|
10607
|
-
- |-
|
|
10608
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10609
|
-
- Ensure that searchValue2 is provided only when the selected operator requires two values.
|
|
10610
|
-
- Validate the data type of searchValue2 to match the expected type for the field being searched (e.g., date, number, string).
|
|
10611
|
-
- When using range-based operators, searchValue2 should represent the upper bound or second boundary of the range.
|
|
10612
|
-
- If the operator does not require a second value, omit this property to avoid errors.
|
|
10613
|
-
- |-
|
|
10614
|
-
## EXAMPLES:
|
|
10615
|
-
- For a date range search: searchValue = "2023-01-01", searchValue2 = "2023-12-31" with operator "between".
|
|
10616
|
-
- For a numeric range: searchValue = 100, searchValue2 = 200 with operator "between".
|
|
10617
|
-
- For a "not between" operator: searchValue = 50, searchValue2 = 100.
|
|
10618
|
-
- |-
|
|
10619
|
-
## IMPORTANT NOTES:
|
|
10620
|
-
- Providing searchValue2 without a compatible operator may result in an invalid search query.
|
|
10621
|
-
- The data type and format of searchValue2 must be consistent with searchValue and the field being queried.
|
|
10622
|
-
- This property is ignored if the operator only requires a single value.
|
|
10623
|
-
- Proper validation and error handling should be implemented when processing this field.
|
|
10624
|
-
- |-
|
|
10625
|
-
## DEPENDENCY CHAIN:
|
|
10626
|
-
- Dependent on the "operator" property within the same search criterion.
|
|
10627
|
-
- Works in conjunction with "searchValue" to define the search condition.
|
|
10628
|
-
- Part of the "criteria" array or object in the NetSuite RESTlet search request.
|
|
10629
|
-
- |-
|
|
10630
|
-
## TECHNICAL DETAILS:
|
|
10631
|
-
- Data type varies depending on the field being searched (string, number, date, etc.).
|
|
10632
|
-
- Typically serialized as a JSON property in the RESTlet request payload.
|
|
10633
|
-
- Must conform to the expected format for the field and operator to avoid API errors.
|
|
10634
|
-
- Used internally by NetSuite to construct the appropriate
|
|
10546
|
+
Same typing as `searchValue`: a literal or a Handlebars expression, coerced to
|
|
10547
|
+
a number for the numeric two-value operators.
|
|
10635
10548
|
formula:
|
|
10636
10549
|
type: string
|
|
10637
10550
|
description: |-
|
|
@@ -10658,52 +10571,29 @@ components:
|
|
|
10658
10571
|
columns:
|
|
10659
10572
|
type: array
|
|
10660
10573
|
description: |-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10574
|
+
Search columns the RESTlet returns for each matching record. With a saved search,
|
|
10575
|
+
omit this to return the search's own result columns; an ad-hoc search (no
|
|
10576
|
+
`searchId`) must list its columns here.
|
|
10664
10577
|
x-celigo-ai-guidance:
|
|
10665
10578
|
- |-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
enabling precise control over the data returned or affected.
|
|
10672
|
-
By selecting only relevant columns,
|
|
10673
|
-
it helps optimize performance and reduce payload size,
|
|
10674
|
-
ensuring efficient data handling tailored to the operation's requirements.
|
|
10675
|
-
- |-
|
|
10676
|
-
## FIELD BEHAVIOR:
|
|
10677
|
-
- Determines the exact fields (columns) to be included in data retrieval, update, or manipulation operations.
|
|
10678
|
-
- Supports specifying multiple columns to customize the dataset returned or processed.
|
|
10679
|
-
- Limits the data payload by including only the specified columns, improving performance and reducing bandwidth.
|
|
10680
|
-
- Influences the structure, content, and size of the response from the RESTlet.
|
|
10681
|
-
- If omitted, defaults to retrieving all available columns for the target record type, which may impact performance.
|
|
10682
|
-
- Columns specified must be valid and accessible for the target record type to avoid errors.
|
|
10683
|
-
- |-
|
|
10684
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10685
|
-
- Accepts an array or list of column identifiers, which can be simple strings or objects with detailed specifications (e.g., `{ name: "fieldname" }`).
|
|
10686
|
-
- Column identifiers should correspond exactly to valid NetSuite record field names or internal IDs.
|
|
10687
|
-
- Validate column names against the target record schema before execution to prevent runtime errors.
|
|
10688
|
-
- Use this property to optimize RESTlet calls by limiting data to only necessary fields, especially in large datasets.
|
|
10689
|
-
- When specifying complex columns (e.g., joined fields or formula fields), ensure the correct syntax and structure are used.
|
|
10690
|
-
- Consider the permissions and roles associated with the RESTlet user to ensure access to the specified columns.
|
|
10691
|
-
- |-
|
|
10692
|
-
## EXAMPLES:
|
|
10693
|
-
- `["internalid", "entityid", "email"]` — retrieves basic identifying and contact fields.
|
|
10694
|
-
- `[ { name: "internalid" }, { name: "entityid" }, { name: "email" } ]` — object notation for specifying columns.
|
|
10695
|
-
- `["tranid", "amount", "status"]` — retrieves transaction-specific fields.
|
|
10696
|
-
- `[ { name: "custbody_custom_field" }, { name: "createddate" } ]` — includes custom and system fields.
|
|
10697
|
-
- `["item", "quantity", "rate"]` — fields relevant to item records or line items.
|
|
10579
|
+
Entries are objects keyed by `name` — `[{"name": "internalid"}, {"name":
|
|
10580
|
+
"tranid"}]`. Plain strings fail with a 422 `ObjectParameterError`; objects keyed by
|
|
10581
|
+
`_id` fail with a 422 `BSONError` (`_id` is the server's own subdocument id).
|
|
10582
|
+
Omitting both `columns` and `searchId` fails with `[celigo_config_error] searchId
|
|
10583
|
+
or columns are required`.
|
|
10698
10584
|
- |-
|
|
10699
|
-
|
|
10700
|
-
|
|
10585
|
+
Each `name` must be a search column id for the `recordType` (the SEARCH COLUMNS
|
|
10586
|
+
metadata block), not a body-field id — `shipaddress1`, not `shipaddr1`. Set
|
|
10587
|
+
`label` to control the property name in the exported record.
|
|
10701
10588
|
items:
|
|
10702
10589
|
type: object
|
|
10703
10590
|
properties:
|
|
10704
10591
|
_id:
|
|
10705
10592
|
type: string
|
|
10706
|
-
|
|
10593
|
+
readOnly: true
|
|
10594
|
+
description: |-
|
|
10595
|
+
Subdocument id the server assigns to the column entry on save. Not a NetSuite
|
|
10596
|
+
field id — never set it when authoring.
|
|
10707
10597
|
name:
|
|
10708
10598
|
type: string
|
|
10709
10599
|
description: Column field name as referenced in the search.
|
|
@@ -10753,105 +10643,47 @@ components:
|
|
|
10753
10643
|
- vendor
|
|
10754
10644
|
summary:
|
|
10755
10645
|
type: string
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10646
|
+
enum:
|
|
10647
|
+
- group
|
|
10648
|
+
- sum
|
|
10649
|
+
- count
|
|
10650
|
+
- avg
|
|
10651
|
+
- min
|
|
10652
|
+
- max
|
|
10653
|
+
x-enumDescriptions:
|
|
10654
|
+
group: Group results by this column's value
|
|
10655
|
+
sum: Sum of the column across the grouped rows
|
|
10656
|
+
count: Count of grouped rows
|
|
10657
|
+
avg: Average of the column across the grouped rows
|
|
10658
|
+
min: Minimum value across the grouped rows
|
|
10659
|
+
max: Maximum value across the grouped rows
|
|
10660
|
+
x-lowercase: true
|
|
10661
|
+
description: Summary type applied to this column, turning the search into a summary search.
|
|
10759
10662
|
formula:
|
|
10760
10663
|
type: string
|
|
10761
10664
|
description: |-
|
|
10762
10665
|
NetSuite formula expression that computes this column's value at runtime, such
|
|
10763
10666
|
as a CASE statement or date formatting, instead of reading a stored field.
|
|
10764
10667
|
examples:
|
|
10765
|
-
- CASE WHEN {status} =
|
|
10668
|
+
- CASE WHEN {status} = 'Open' THEN 1 ELSE 0 END
|
|
10766
10669
|
- NVL({amount}, 0) * 0.1
|
|
10767
|
-
- TO_CHAR({trandate},
|
|
10670
|
+
- TO_CHAR({trandate}, 'YYYY-MM-DD')
|
|
10768
10671
|
x-celigo-ai-guidance:
|
|
10769
10672
|
- |-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
- Formula evaluation respects user permissions and data visibility.
|
|
10775
|
-
- |-
|
|
10776
|
-
## DEPENDENCY CHAIN:
|
|
10777
|
-
- Depends on the availability of referenced fields within the record or search context.
|
|
10778
|
-
- Relies on NetSuite's formula parsing and evaluation engine.
|
|
10779
|
-
- Interacts with the RESTlet execution environment to produce output.
|
|
10780
|
-
- |-
|
|
10781
|
-
## TECHNICAL DETAILS:
|
|
10782
|
-
- Data type: string containing a formula expression.
|
|
10783
|
-
- Supports NetSuite formula syntax including SQL-like CASE statements, arithmetic operations, and built-in functions.
|
|
10784
|
-
- Evaluated server-side during RESTlet execution or saved search processing.
|
|
10785
|
-
- |-
|
|
10786
|
-
formula:
|
|
10787
|
-
> A string representing a custom formula used to calculate or derive values
|
|
10788
|
-
dynamically within the context of the NetSuite RESTlet columns.
|
|
10789
|
-
This formula can include field references, operators,
|
|
10790
|
-
and functions supported by NetSuite's formula syntax to perform computations or
|
|
10791
|
-
conditional logic on record data.
|
|
10792
|
-
- |-
|
|
10793
|
-
## FIELD BEHAVIOR:
|
|
10794
|
-
- Accepts a formula expression as a string that defines how to compute the column's value.
|
|
10795
|
-
- Can reference other fields, constants, and use NetSuite-supported functions and operators.
|
|
10796
|
-
- Evaluated at runtime to produce dynamic results based on the current record data.
|
|
10797
|
-
- Used primarily in saved searches, reports, or RESTlet responses to customize output.
|
|
10798
|
-
- |-
|
|
10799
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10800
|
-
- Ensure the formula syntax complies with NetSuite's formula language and supported functions.
|
|
10801
|
-
- Validate the formula string to prevent errors during execution.
|
|
10802
|
-
- Use field IDs or aliases correctly within the formula to reference data fields.
|
|
10803
|
-
- Test formulas thoroughly in NetSuite UI before deploying via RESTlet to ensure correctness.
|
|
10804
|
-
- Consider performance implications of complex formulas on large datasets.
|
|
10805
|
-
- |-
|
|
10806
|
-
## EXAMPLES:
|
|
10807
|
-
- "CASE WHEN {status} = 'Open' THEN 1 ELSE 0 END" — returns 1 if status is Open, else 0.
|
|
10808
|
-
- "NVL({amount}, 0) * 0.1" — calculates 10% of the amount, treating null as zero.
|
|
10809
|
-
- "TO_CHAR({trandate}, 'YYYY-MM-DD')" — formats the transaction date as a string.
|
|
10673
|
+
Use with a formula column in `name` (`formulatext`, `formulanumeric`,
|
|
10674
|
+
`formuladate`, ...) and give the entry a `label` — the label becomes the
|
|
10675
|
+
exported record's property name. Oracle SQL syntax over `{searchColumn}`
|
|
10676
|
+
references; string literals use single quotes.
|
|
10810
10677
|
label:
|
|
10811
10678
|
type: string
|
|
10812
10679
|
description: |-
|
|
10813
|
-
Display name for the column
|
|
10814
|
-
|
|
10680
|
+
Display name for the column; it becomes the property name of the column's value
|
|
10681
|
+
in each exported record.
|
|
10815
10682
|
examples:
|
|
10816
10683
|
- Customer Name
|
|
10817
10684
|
- Invoice Date
|
|
10818
10685
|
- Total Amount
|
|
10819
10686
|
- Status
|
|
10820
|
-
x-celigo-ai-guidance:
|
|
10821
|
-
- |-
|
|
10822
|
-
label:
|
|
10823
|
-
| The display name or title of the column as it appears in the user interface or reports.
|
|
10824
|
-
- |-
|
|
10825
|
-
## FIELD BEHAVIOR:
|
|
10826
|
-
- Represents the human-readable name for a column in a dataset or report.
|
|
10827
|
-
- Used to identify the column in UI elements such as tables, forms, or export files.
|
|
10828
|
-
- Should be concise yet descriptive enough to convey the column's content.
|
|
10829
|
-
- |-
|
|
10830
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10831
|
-
- Ensure the label is localized if the application supports multiple languages.
|
|
10832
|
-
- Avoid using technical jargon; prefer user-friendly terminology.
|
|
10833
|
-
- Keep the label length reasonable to prevent UI truncation.
|
|
10834
|
-
- Update the label consistently when the underlying data or purpose changes.
|
|
10835
|
-
- |-
|
|
10836
|
-
## EXAMPLES:
|
|
10837
|
-
- "Customer Name"
|
|
10838
|
-
- "Invoice Date"
|
|
10839
|
-
- "Total Amount"
|
|
10840
|
-
- "Status"
|
|
10841
|
-
- |-
|
|
10842
|
-
## IMPORTANT NOTES:
|
|
10843
|
-
- The label does not affect the data or the column's functionality; it is purely for display.
|
|
10844
|
-
- Changing the label does not impact data processing or storage.
|
|
10845
|
-
- Labels should be unique within the same context to avoid confusion.
|
|
10846
|
-
- |-
|
|
10847
|
-
## DEPENDENCY CHAIN:
|
|
10848
|
-
- Depends on the column definition within the dataset or report configuration.
|
|
10849
|
-
- May be linked to localization resources if internationalization is supported.
|
|
10850
|
-
- |-
|
|
10851
|
-
## TECHNICAL DETAILS:
|
|
10852
|
-
- Typically a string data type.
|
|
10853
|
-
- May support Unicode characters for internationalization.
|
|
10854
|
-
- Stored as metadata associated with the column definition in the system.
|
|
10855
10687
|
sort:
|
|
10856
10688
|
type: boolean
|
|
10857
10689
|
description: When true, query results are sorted by this column's values.
|
|
@@ -10870,277 +10702,53 @@ components:
|
|
|
10870
10702
|
properties:
|
|
10871
10703
|
batchSize:
|
|
10872
10704
|
type: number
|
|
10873
|
-
description:
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
batchSize specifies the number of records or items to be processed in a single
|
|
10877
|
-
batch during the execution of the NetSuite RESTlet hook.
|
|
10878
|
-
This parameter helps control the workload size for each batch operation,
|
|
10879
|
-
optimizing performance and resource utilization by balancing processing
|
|
10880
|
-
efficiency and system constraints.
|
|
10881
|
-
- |-
|
|
10882
|
-
## FIELD BEHAVIOR:
|
|
10883
|
-
- Determines the maximum number of records or items processed in one batch cycle.
|
|
10884
|
-
- Directly influences the frequency and duration of batch processing operations.
|
|
10885
|
-
- Helps manage memory consumption and processing time by limiting the batch workload.
|
|
10886
|
-
- Affects overall throughput and latency of batch operations, impacting system responsiveness.
|
|
10887
|
-
- Controls how data is segmented and processed in discrete units during RESTlet execution.
|
|
10888
|
-
- |-
|
|
10889
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10890
|
-
- Configure batchSize based on the system's processing capacity, expected data volume, and performance goals.
|
|
10891
|
-
- Use smaller batch sizes in environments with limited resources or strict execution time limits to prevent timeouts.
|
|
10892
|
-
- Larger batch sizes can improve throughput by reducing the number of batch cycles but may increase individual batch processing time and risk of hitting governance limits.
|
|
10893
|
-
- Always validate that batchSize is a positive integer greater than zero to ensure proper operation.
|
|
10894
|
-
- Take into account NetSuite API governance limits, such as usage units and execution time, when determining batchSize.
|
|
10895
|
-
- Monitor system performance and adjust batchSize dynamically if possible to optimize processing efficiency.
|
|
10896
|
-
- Ensure batchSize aligns with other batch-related configurations to maintain consistency and predictable behavior.
|
|
10897
|
-
- |-
|
|
10898
|
-
## EXAMPLES:
|
|
10899
|
-
- batchSize: 100 — processes 100 records per batch, balancing throughput and resource use.
|
|
10900
|
-
- batchSize: 500 — processes 500 records per batch for higher throughput in robust environments.
|
|
10901
|
-
- batchSize: 10 — processes 10 records per batch for fine-grained control and minimal resource impact.
|
|
10902
|
-
- batchSize: 1 — processes records individually, useful for debugging or very resource-sensitive scenarios.
|
|
10903
|
-
- |-
|
|
10904
|
-
## IMPORTANT NOTES:
|
|
10905
|
-
- Excessively high batchSize values may cause processing timeouts, exceed NetSuite governance limits, or lead to memory exhaustion.
|
|
10906
|
-
- Very low batchSize values can result in inefficient processing due to increased overhead and more frequent batch invocations.
|
|
10907
|
-
- The optimal batchSize is context-dependent and should be determined through testing and monitoring.
|
|
10908
|
-
- batchSize should be consistent with other batch processing parameters to avoid conflicts or unexpected behavior.
|
|
10909
|
-
- Changes to batchSize may require adjustments in error handling and retry logic to accommodate different batch sizes.
|
|
10910
|
-
- |-
|
|
10911
|
-
## DEPENDENCY CHAIN:
|
|
10912
|
-
- Depends on the batch processing logic implemented within the RESTlet hook.
|
|
10705
|
+
description: |-
|
|
10706
|
+
Legacy location of the RESTlet page size; `restlet.batchSize` is the current
|
|
10707
|
+
field and takes precedence when both are set.
|
|
10913
10708
|
preSend:
|
|
10914
10709
|
type: object
|
|
10915
10710
|
properties:
|
|
10916
10711
|
fileInternalId:
|
|
10917
10712
|
type: string
|
|
10918
|
-
description:
|
|
10713
|
+
description: |-
|
|
10714
|
+
Internal ID of the JavaScript file in the NetSuite File Cabinet that defines
|
|
10715
|
+
the hook function. Must be readable by the role behind the export's connection.
|
|
10919
10716
|
examples:
|
|
10920
10717
|
- '12345'
|
|
10921
|
-
- '
|
|
10922
|
-
- file_98765
|
|
10923
|
-
x-celigo-ai-guidance:
|
|
10924
|
-
- |-
|
|
10925
|
-
fileInternalId:
|
|
10926
|
-
The unique internal identifier assigned to a file within the NetSuite system.
|
|
10927
|
-
This identifier is used to precisely reference and manipulate a specific file
|
|
10928
|
-
during API operations,
|
|
10929
|
-
particularly within pre-send processing hooks in RESTlets.
|
|
10930
|
-
It ensures accurate targeting of file resources by uniquely identifying files
|
|
10931
|
-
stored in the NetSuite file cabinet.
|
|
10932
|
-
- |-
|
|
10933
|
-
## FIELD BEHAVIOR:
|
|
10934
|
-
- Represents a unique numeric or alphanumeric identifier assigned by NetSuite to each file.
|
|
10935
|
-
- Used to retrieve, update, or reference a file during the preSend hook execution.
|
|
10936
|
-
- Must correspond to an existing file within the NetSuite file cabinet.
|
|
10937
|
-
- Immutable throughout the file's lifecycle; remains constant unless the file is deleted and recreated.
|
|
10938
|
-
- Serves as a key reference for file-related operations in automated workflows and integrations.
|
|
10939
|
-
- |-
|
|
10940
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10941
|
-
- Always validate that the fileInternalId exists and is accessible before performing operations.
|
|
10942
|
-
- Use this ID to fetch file metadata, content, or perform updates within the preSend hook.
|
|
10943
|
-
- Implement error handling to manage cases where the fileInternalId does not correspond to a valid or accessible file.
|
|
10944
|
-
- Ensure that the executing user or integration has the necessary permissions to access the file referenced by this ID.
|
|
10945
|
-
- Avoid hardcoding this ID; retrieve dynamically when possible to maintain flexibility and accuracy.
|
|
10946
|
-
- |-
|
|
10947
|
-
## EXAMPLES:
|
|
10948
|
-
- 12345
|
|
10949
|
-
- "67890"
|
|
10950
|
-
- "file_98765"
|
|
10951
|
-
- |-
|
|
10952
|
-
## IMPORTANT NOTES:
|
|
10953
|
-
- The fileInternalId is specific to each NetSuite account and environment; it is not globally unique across different accounts.
|
|
10954
|
-
- Do not expose this identifier publicly, as it may reveal sensitive internal system details.
|
|
10955
|
-
- Modifications to the file's name, location, or metadata do not affect the internal ID.
|
|
10956
|
-
- This ID is essential for linking files reliably in automated processes, integrations, and RESTlet hooks.
|
|
10957
|
-
- Deleting and recreating a file will result in a new fileInternalId.
|
|
10958
|
-
- |-
|
|
10959
|
-
## DEPENDENCY CHAIN:
|
|
10960
|
-
- Depends on the existence of the file within the NetSuite file cabinet.
|
|
10961
|
-
- Requires appropriate permissions to access or manipulate the file.
|
|
10962
|
-
- Utilized within preSend hooks to reference files accurately during API operations.
|
|
10963
|
-
- |-
|
|
10964
|
-
## TECHNICAL DETAILS:
|
|
10965
|
-
- Typically a numeric or alphanumeric string assigned by NetSuite upon file creation.
|
|
10966
|
-
- Stored internally within NetSuite's database as the primary key for file records.
|
|
10967
|
-
- Used as a parameter in RESTlet API calls to identify and operate on specific files.
|
|
10968
|
-
- Immutable identifier that does not change unless the file is deleted and recreated.
|
|
10718
|
+
- '6398'
|
|
10969
10719
|
function:
|
|
10970
10720
|
type: string
|
|
10971
10721
|
description: |-
|
|
10972
|
-
Name of the function
|
|
10973
|
-
|
|
10722
|
+
Name of the global function in that file that NetSuite invokes as the pre
|
|
10723
|
+
send hook.
|
|
10974
10724
|
examples:
|
|
10975
|
-
-
|
|
10976
|
-
-
|
|
10977
|
-
- transformRequestData
|
|
10978
|
-
- logRequestDetails
|
|
10979
|
-
x-celigo-ai-guidance:
|
|
10980
|
-
- |-
|
|
10981
|
-
function:
|
|
10982
|
-
> Specifies the name of the custom function to be invoked during the preSend
|
|
10983
|
-
hook phase in the NetSuite RESTlet integration.
|
|
10984
|
-
This function enables developers to implement custom logic for processing or
|
|
10985
|
-
modifying the request payload immediately before it is dispatched to the
|
|
10986
|
-
NetSuite RESTlet endpoint.
|
|
10987
|
-
It serves as a critical extension point for tailoring request data,
|
|
10988
|
-
adding headers, sanitizing inputs,
|
|
10989
|
-
or performing any preparatory steps necessary to meet integration requirements.
|
|
10990
|
-
- |-
|
|
10991
|
-
## FIELD BEHAVIOR:
|
|
10992
|
-
- Identifies the exact function to execute during the preSend hook phase.
|
|
10993
|
-
- Allows customization and transformation of the outgoing request payload or context.
|
|
10994
|
-
- The specified function is called synchronously or asynchronously depending on implementation support.
|
|
10995
|
-
- Modifications made by this function directly affect the data sent to the NetSuite RESTlet.
|
|
10996
|
-
- Must reference a valid, accessible function within the integration's runtime environment.
|
|
10997
|
-
- |-
|
|
10998
|
-
## IMPLEMENTATION GUIDANCE:
|
|
10999
|
-
- Confirm that the function name matches a defined and exported function within the integration codebase.
|
|
11000
|
-
- The function should accept the current request payload or context as input and return the modified payload or context.
|
|
11001
|
-
- Implement robust error handling within the function to avoid unhandled exceptions that could disrupt the request flow.
|
|
11002
|
-
- Optimize the function for performance to minimize latency in request processing.
|
|
11003
|
-
- If asynchronous operations are supported, ensure proper handling of promises or callbacks.
|
|
11004
|
-
- Document the function's behavior clearly to facilitate maintenance and future updates.
|
|
11005
|
-
- |-
|
|
11006
|
-
## EXAMPLES:
|
|
11007
|
-
- "sanitizePayload" — cleans and validates request data before sending.
|
|
11008
|
-
- "addAuthenticationHeaders" — injects necessary authentication tokens or headers.
|
|
11009
|
-
- "transformRequestData" — restructures or enriches the payload to match API expectations.
|
|
11010
|
-
- "logRequestDetails" — captures request metadata for auditing or debugging purposes.
|
|
11011
|
-
- |-
|
|
11012
|
-
## IMPORTANT NOTES:
|
|
11013
|
-
- The function must be correctly implemented and accessible; otherwise, runtime errors will occur.
|
|
11014
|
-
- This hook executes immediately before the request is sent, so any changes here directly impact the outgoing data.
|
|
11015
|
-
- Ensure that the function's side effects do not unintentionally alter unrelated parts of the request or integration state.
|
|
11016
|
-
- If asynchronous processing is used, verify that the integration framework supports it to avoid unexpected behavior.
|
|
11017
|
-
- Testing the function thoroughly is critical to ensure reliable integration behavior.
|
|
11018
|
-
- |-
|
|
11019
|
-
## DEPENDENCY CHAIN:
|
|
11020
|
-
- Requires the preSend hook to be enabled and properly configured in the integration settings.
|
|
11021
|
-
- Depends on the presence of the named
|
|
10725
|
+
- preSendHookScheduledExport
|
|
10726
|
+
- appendCustomerEmail
|
|
11022
10727
|
configuration:
|
|
11023
10728
|
type: object
|
|
11024
|
-
description:
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
configuration:
|
|
11029
|
-
> An object containing configuration settings that influence the behavior of the
|
|
11030
|
-
preSend hook in the NetSuite RESTlet integration.
|
|
11031
|
-
This object serves as a centralized control point for customizing how requests
|
|
11032
|
-
are processed and modified before being sent to the NetSuite RESTlet endpoint.
|
|
11033
|
-
It can include a variety of parameters such as authentication credentials,
|
|
11034
|
-
logging preferences, request modification flags, timeout settings,
|
|
11035
|
-
retry policies,
|
|
11036
|
-
and feature toggles that tailor the preSend hook's operation to specific integration needs.
|
|
11037
|
-
- |-
|
|
11038
|
-
## FIELD BEHAVIOR:
|
|
11039
|
-
- Holds key-value pairs that define how the preSend hook processes and modifies outgoing requests.
|
|
11040
|
-
- Can include settings such as authentication parameters (e.g., tokens, API keys), request modification flags (e.g., header adjustments), logging options (e.g., enable/disable logging), timeout durations, retry counts, and feature toggles.
|
|
11041
|
-
- Is accessed and potentially updated dynamically during the execution of the preSend hook to adapt request handling based on current context or conditions.
|
|
11042
|
-
- Influences the flow and outcome of the preSend hook, potentially altering request payloads, headers, or other metadata before transmission.
|
|
11043
|
-
- |-
|
|
11044
|
-
## IMPLEMENTATION GUIDANCE:
|
|
11045
|
-
- Define clear, descriptive, and consistent keys within the configuration object to avoid ambiguity and ensure maintainability.
|
|
11046
|
-
- Validate all configuration values rigorously before applying them to prevent runtime errors or unexpected behavior.
|
|
11047
|
-
- Use this object to centralize control over preSend hook behavior, enabling easier updates, debugging, and feature management.
|
|
11048
|
-
- Document all possible configuration options, their expected data types, default values, and their specific effects on the preSend hook's operation.
|
|
11049
|
-
- Ensure sensitive information within the configuration (e.g., authentication tokens) is handled securely, following best practices for encryption and access control.
|
|
11050
|
-
- Consider versioning the configuration schema if multiple versions of the preSend hook or integration exist.
|
|
11051
|
-
- |-
|
|
11052
|
-
## EXAMPLES:
|
|
11053
|
-
- `{ "enableLogging": true, "authToken": "abc123", "modifyHeaders": false }`
|
|
11054
|
-
- `{ "retryCount": 3, "timeout": 5000 }`
|
|
11055
|
-
- `{ "useSandbox": true, "customHeader": "X-Custom-Value" }`
|
|
11056
|
-
- `{ "authenticationType": "OAuth2", "refreshToken": "xyz789", "logLevel": "verbose" }`
|
|
11057
|
-
- `{ "enableCaching": false, "maxRetries": 5, "requestPriority": "high" }`
|
|
10729
|
+
description: |-
|
|
10730
|
+
Free-form JSON stored with the hook reference for the script's own use. Custom
|
|
10731
|
+
settings in scope for the export are passed to the function separately as
|
|
10732
|
+
`options.settings`.
|
|
11058
10733
|
description: |-
|
|
11059
|
-
|
|
11060
|
-
|
|
10734
|
+
SuiteScript hook that runs inside NetSuite after a page of records is collected
|
|
10735
|
+
and before it is sent to the Celigo platform.
|
|
11061
10736
|
x-celigo-ai-guidance:
|
|
11062
10737
|
- |-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
This hook provides a critical interception point to ensure the response adheres
|
|
11069
|
-
to business rules,
|
|
11070
|
-
compliance requirements,
|
|
11071
|
-
or client-specific formatting before it leaves the server.
|
|
11072
|
-
- |-
|
|
11073
|
-
## FIELD BEHAVIOR:
|
|
11074
|
-
- Invoked right before the RESTlet response is sent to the client.
|
|
11075
|
-
- Receives the response data as input and can modify it.
|
|
11076
|
-
- Can be used to log, audit, or transform the response payload.
|
|
11077
|
-
- Should return the final response object to be sent.
|
|
11078
|
-
- Supports both synchronous and asynchronous execution depending on the implementation.
|
|
11079
|
-
- Any changes made here directly impact the final output received by the client.
|
|
11080
|
-
- |-
|
|
11081
|
-
## IMPLEMENTATION GUIDANCE:
|
|
11082
|
-
- Implement as a synchronous or asynchronous function depending on the environment and use case.
|
|
11083
|
-
- Ensure any modifications maintain the expected response format and data integrity.
|
|
11084
|
-
- Avoid long-running or blocking operations to prevent delaying the response delivery.
|
|
11085
|
-
- Handle errors gracefully within the hook to prevent disrupting the overall RESTlet response flow.
|
|
11086
|
-
- Validate the modified response to ensure it complies with API schema and client expectations.
|
|
11087
|
-
- Use this hook to enforce security measures such as masking sensitive data or adding audit trails.
|
|
11088
|
-
- |-
|
|
11089
|
-
## EXAMPLES:
|
|
11090
|
-
- Adding a timestamp or metadata (e.g., request ID, processing duration) to the response object.
|
|
11091
|
-
- Masking or removing sensitive information (e.g., personal identifiers, confidential fields) from the response.
|
|
11092
|
-
- Logging response details for auditing or debugging purposes.
|
|
11093
|
-
- Transforming response data structure or formatting to match client-specific requirements.
|
|
11094
|
-
- Injecting additional headers or status information into the response payload.
|
|
11095
|
-
- |-
|
|
11096
|
-
## IMPORTANT NOTES:
|
|
11097
|
-
- This hook runs after all business logic but before the response is finalized and sent.
|
|
11098
|
-
- Modifications here directly affect what the client ultimately receives.
|
|
11099
|
-
- Errors thrown in this hook may cause the RESTlet to fail or return an error response.
|
|
11100
|
-
- Use this hook to enforce response-level policies, compliance, or data governance rules.
|
|
11101
|
-
- Avoid introducing side effects that could alter the idempotency or consistency of the response.
|
|
11102
|
-
- Testing this hook thoroughly is critical to ensure it does not unintentionally break client integrations.
|
|
10738
|
+
The function receives one `options` argument — `data` (the page of records),
|
|
10739
|
+
`recordType`, `searchId`, `skipGrouping`, `delta`, `once`, `_exportId`,
|
|
10740
|
+
`_connectionId`, `_flowId`, `_integrationId`, `settings`, `testMode` — and must
|
|
10741
|
+
return `{ data, errors, errorsAndRetryData }` (`errorsAndRetryData` items are
|
|
10742
|
+
`{retryData: <record>, errors: [<error>]}`). Throwing stops the flow.
|
|
11103
10743
|
- |-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
various points during the lifecycle of the RESTlet script in NetSuite.
|
|
11113
|
-
These hooks enable developers to inject additional logic before or after
|
|
11114
|
-
standard processing events,
|
|
11115
|
-
allowing for extensive customization and extension of the RESTlet's behavior to
|
|
11116
|
-
meet specific business requirements.
|
|
11117
|
-
- |-
|
|
11118
|
-
## FIELD BEHAVIOR:
|
|
11119
|
-
- Defines one or more hooks that trigger custom code execution at designated lifecycle events.
|
|
11120
|
-
- Hooks can be configured to run at standard lifecycle events such as beforeLoad, beforeSubmit, afterSubmit, or at custom-defined events tailored to specific needs.
|
|
11121
|
-
- Each hook entry typically includes the event name, the callback function to execute, and optional parameters or context information.
|
|
11122
|
-
- Supports both synchronous and asynchronous execution modes depending on the hook type and implementation context.
|
|
11123
|
-
- Hooks execute in the order they are defined, allowing for controlled sequencing of custom logic.
|
|
11124
|
-
- Hooks can modify input data, perform validations, log information, or alter output responses as needed.
|
|
11125
|
-
- |-
|
|
11126
|
-
## IMPLEMENTATION GUIDANCE:
|
|
11127
|
-
- Ensure that each hook function is properly defined, accessible, and tested within the RESTlet script context to avoid runtime failures.
|
|
11128
|
-
- Validate hook event names against the list of supported lifecycle events to prevent misconfiguration and errors.
|
|
11129
|
-
- Use hooks to encapsulate reusable business logic, enforce data integrity, or integrate with external systems and services.
|
|
11130
|
-
- Implement robust error handling within hook functions to prevent exceptions from disrupting the main RESTlet processing flow.
|
|
11131
|
-
- Document each hook's purpose, expected inputs, outputs, and side effects clearly to facilitate maintainability and future enhancements.
|
|
11132
|
-
- Consider performance implications of hooks, especially those performing asynchronous operations or external calls, to maintain RESTlet responsiveness.
|
|
11133
|
-
- When multiple hooks are defined for the same event, design them to avoid conflicts and ensure predictable outcomes.
|
|
11134
|
-
- |-
|
|
11135
|
-
## EXAMPLES:
|
|
11136
|
-
- Defining a hook to validate and sanitize input data before processing a RESTlet request.
|
|
11137
|
-
- Adding a hook to log detailed request and response information after the RESTlet completes execution for auditing purposes.
|
|
11138
|
-
- Using a hook to modify or enrich the response payload dynamically before it is returned to the client application.
|
|
11139
|
-
- Implementing a hook to trigger notifications or update related records asynchronously after data submission.
|
|
11140
|
-
- Creating a custom hook event to perform additional security checks beyond standard validation.
|
|
11141
|
-
- |-
|
|
11142
|
-
## IMPORTANT NOTES:
|
|
11143
|
-
- Improper use or misconfiguration of hooks can lead to unexpected behavior, performance degradation, or runtime errors.
|
|
10744
|
+
Use it to enrich or filter records with SuiteScript searches and record loads
|
|
10745
|
+
before they leave NetSuite (no extra API round-trips). The script must be
|
|
10746
|
+
written for the step's SuiteScript version (1.0 vs 2.x are not interchangeable);
|
|
10747
|
+
the SuiteScript 1.0 real-time variant receives a single record object rather
|
|
10748
|
+
than an array.
|
|
10749
|
+
description: |-
|
|
10750
|
+
SuiteScript hooks for the export. Only `preSend` exists on exports; imports carry
|
|
10751
|
+
the pre map, post map, and post submit hooks.
|
|
11144
10752
|
cLocked:
|
|
11145
10753
|
type: object
|
|
11146
10754
|
description: Lock state that prevents modification of the configuration when set.
|
|
@@ -11149,38 +10757,10 @@ components:
|
|
|
11149
10757
|
from NetSuite, along with the saved search, criteria, and columns it executes with.
|
|
11150
10758
|
x-celigo-ai-guidance:
|
|
11151
10759
|
- |-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
This property specifies which Restlet endpoint the integration or application
|
|
11157
|
-
should call to execute specific business logic,
|
|
11158
|
-
automate workflows, or retrieve and manipulate data dynamically.
|
|
11159
|
-
It can be represented as an internal script ID, a relative URL path,
|
|
11160
|
-
or a full external URL depending on the integration scenario and access method.
|
|
11161
|
-
- |-
|
|
11162
|
-
## FIELD BEHAVIOR:
|
|
11163
|
-
- Defines the specific target Restlet script or endpoint for API calls within the NetSuite environment.
|
|
11164
|
-
- Routes requests to custom server-side scripts developed using NetSuite's SuiteScript framework.
|
|
11165
|
-
- Enables execution of tailored business processes, data validations, transformations, or integrations.
|
|
11166
|
-
- Supports various HTTP methods such as GET, POST, PUT, and DELETE depending on the Restlet's implementation.
|
|
11167
|
-
- Can be specified as a script ID, a relative URL path, or a fully qualified URL based on deployment and access context.
|
|
11168
|
-
- Acts as the primary entry point for invoking custom logic that extends or complements standard NetSuite functionality.
|
|
11169
|
-
- |-
|
|
11170
|
-
## IMPLEMENTATION GUIDANCE:
|
|
11171
|
-
- Confirm that the Restlet script is properly deployed, enabled, and accessible within the target NetSuite account.
|
|
11172
|
-
- Use the internal script ID format (e.g., "customscript_my_restlet") when calling via SuiteScript or internal APIs.
|
|
11173
|
-
- Use the relative URL path (e.g., "/app/site/hosting/restlet.nl?script=123&deploy=1") or full URL for external integrations or REST clients.
|
|
11174
|
-
- Verify that the Restlet supports the required HTTP methods and handles input/output data formats correctly (JSON, XML, etc.).
|
|
11175
|
-
- Secure the Restlet endpoint by implementing authentication mechanisms such as OAuth 2.0, token-based authentication, or NetSuite session credentials.
|
|
11176
|
-
- Implement robust error handling and retry logic to manage scenarios where the Restlet is unavailable or returns errors.
|
|
11177
|
-
- Test the Restlet thoroughly in a sandbox environment before deploying to production to ensure expected behavior and security compliance.
|
|
11178
|
-
- |-
|
|
11179
|
-
## EXAMPLES:
|
|
11180
|
-
- "customscript_my_restlet" (internal script ID used in SuiteScript calls)
|
|
11181
|
-
- "/app/site/hosting/restlet.nl?script=123&deploy=1" (relative URL for REST calls within NetSuite)
|
|
11182
|
-
- "https://rest.netsuite.com/app/site/hosting/restlet.nl?script=456&deploy=2" (full external URL for third-party integrations)
|
|
11183
|
-
- "customscript_sales_order_processor" (a Rest
|
|
10760
|
+
Two shapes: a saved-search export (`searchId` set; `criteria` optionally narrows it;
|
|
10761
|
+
`columns` omitted to return the search's own columns) or an ad-hoc search
|
|
10762
|
+
(`searchId: "-1"` or omitted, `recordType` + `criteria` + `columns` supplied, and
|
|
10763
|
+
`netsuite.skipGrouping: true` — without it the run fails with `[search_not_sorted]`).
|
|
11184
10764
|
distributed:
|
|
11185
10765
|
type: object
|
|
11186
10766
|
properties:
|