SuiteCommerce
NetSuite Unknown
2026-11-13

CPQ Ecommerce Integration: Background Conversion of Standard Line Items via Scheduled Script

NetSuite CPQ Ecommerce Integration adds a scheduled-script pipeline (CPQE-SC-BCL) that converts standard transaction line items from SuiteCommerce or external ecommerce platforms into CPQ-configured line items in the background, with a postponed-launch fallback via custom record.

Affects:SuiteScript 2.1N/taskN/recordN/logN/runtimeScheduled ScriptsUser Event ScriptsCPQ ConfiguratorSuiteCommerce

What changed

The NetSuite CPQ Ecommerce Integration SuiteApp introduces a server-side pipeline for converting standard line items on transactions (e.g., sales orders originating from SuiteCommerce web stores or third-party ecommerce platforms) into fully configured CPQ line items—without user interaction in the UI. The entire flow is driven by a scheduled script and runs through four sequential phases on the server.

Core scheduled script

The processing engine is CPQE-SC-BCL (customscript_cpqe_sc_bcl), a scheduled script that accepts these parameters:

  • custscript_cpqe_scf_productid – Internal ID of the CPQ Configurator product (found under CPQ > Configurator > Product Maintenance).
  • custscript_cpqe_scf_rectype – Transaction record type (e.g., salesorder).
  • custscript_cpqe_scf_oid – Transaction internal ID.
  • custscript_cpqe_scf_nosub – Boolean; when true, skips submitting the updated transaction. Default: false.
  • custscript_cpqe_scf_custparams – JSON-stringified object of custom parameters, retrievable in actions via getValue('SOLE', 'LAUNCH_PARAMETERS') or getLaunchParameter('paramName'). These values are session-scoped and not persisted to the configuration record.

Processing phases (executed once per launch)

  1. Run before-event actions (ordered by sequence number).
  2. Refresh building blocks (ordered by sequence number).
  3. Run after-event actions (ordered by sequence number).
  4. Submit configuration: creates the configuration record, adds configured items to the transaction, and saves the transaction.

Launching the script

You launch customscript_cpqe_sc_bcl from any SuiteScript 2.x server-side script type: User Event, Suitelet, RESTlet, or Scheduled Script, using N/task.create() with taskType: task.TaskType.SCHEDULED_SCRIPT. The most common pattern is an afterSubmit user event that checks a custom condition, launches the scheduled script, and resets the condition to prevent re-processing on subsequent edits.

Postponed launch fallback

If the task queue rejects the direct launch (e.g., concurrency limits), the script should create a CPQE-BC-Launch-Request custom record (customrecord_cpqe_bc_lrequest) with these fields:

  • custrecord_cpqe_bc_lrequest_prodid
  • custrecord_cpqe_bc_lrequest_rec_type
  • custrecord_cpqe_bc_lrequest_order_id
  • custrecord_cpqe_bc_lrequest_custparams

A companion scheduled script, CPQE-SC-ScanBCLTasks, runs every 15 minutes, picks up postponed launch records, re-attempts the launch, and deletes successfully processed records.

Action constraints vs. standard CPQ Configurator

  • JavaScript ES5 only – ES6 syntax is not supported in CPQ Ecommerce Integration actions.
  • All actions run server-side – there is no client/server distinction. Do not use browser/DOM APIs.
  • To share a product between CPQ Configurator (UI) and CPQ Ecommerce Integration (background), isolate browser-dependent code in separate actions and gate them with the predefined answer X(SOLE/BC) in the Rule field. The action fires only when launched by Ecommerce Integration.

Unsupported capabilities

The following CPQ Configurator features are not available in CPQ Ecommerce Integration:

  • Item creation records and creation records.
  • Setting transaction fields via mapping records.
  • SuiteQL table searches inside actions.
  • Sourcing prices from materials.
  • Displaying additional item prices in the Summary.

What to do

  1. Install the prerequisite: Ensure the NetSuite CPQ Configurator SuiteApp is installed before enabling CPQ Ecommerce Integration.
  2. Build a CPQ Configurator product with building blocks (materials, routing steps) and actions that generate a configuration from transaction line items. Write all action code in ES5.
  3. Gate browser-specific actions: If you share products between the Configurator UI and Ecommerce Integration, add X(SOLE/BC) as a rule on any action containing client-side DOM code so it only executes in the background pipeline.
  4. Write a launch script (typically a User Event afterSubmit) that:
    • Checks a custom condition to decide whether to process the transaction.
    • Calls N/task.create() with scriptId: 'customscript_cpqe_sc_bcl' and the required params.
    • Resets the custom condition after a successful queue to prevent duplicate processing.
    • Falls back to creating a customrecord_cpqe_bc_lrequest record if the direct launch fails.
  5. Deploy the launch script on the target transaction record type (e.g., Sales Order) via the script’s Deployments sublist.
  6. Test with the debugging tool referenced in Oracle’s docs (Testing and Debugging the Conversion into Configured Items) to verify your product configuration before going live.
  7. Monitor governance: Because CPQE-SC-BCL is a scheduled script, be aware of the 10,000 governance-unit limit per execution. Complex products with many building blocks or actions may need optimization. Also monitor the CPQE-SC-ScanBCLTasks script for postponed launch record backlogs.

Technical notes

  • The release version for this feature is not explicitly stated in the source documentation. Verify availability in your account’s SuiteApp marketplace or check the CPQ bundle version.
  • Custom launch parameters passed via custscript_cpqe_scf_custparams are ephemeral—they exist only for the duration of the configuration session and are not saved to the configuration record.
  • The getLaunchParameter() helper returns undefined for nonexistent keys; guard accordingly in your action code.