Suite Utils
Back to blog
SuiteScriptOct 12, 2026 • 7 min read

NetSuite Event Subscriptions vs User Event Scripts

Event Subscriptions rolled out in the 2026.2 release as part of the NetSuite Next phased rollout.

Suite UtilsHow we write these guides
NetSuite Event Subscriptions vs User Event Scripts
On this page

When NetSuite needs to push record changes to an external system like Celigo in real time, you have two native options: a User Event Script with an https.post callout, or the Event Subscription feature. The confusion starts because Event Subscriptions don't appear under Customization > Scripting, they live in a separate menu, and the feature must be enabled first. This article walks through both approaches so you can pick the right one for your integration.

Check Your Release and Provisioning First

Event Subscriptions rolled out in the 2026.2 release as part of the NetSuite Next phased rollout. If your account hasn't received the August minor release yet, the menu item simply won't exist. Even on 2026.2+, the feature requires the Event Subscriptions provisioning flag at Setup > Company > Enable Features > SuiteCloud subtab. Without that checkbox, the feature stays hidden.

If you don't see Event Subscriptions under Customization > Scripting, you're either on a pre-2026.2 release or the feature isn't provisioned. Submit a case to Oracle support to request the enablement.

The August minor release timeline for NetSuite 2026.2 is documented.

Approach 1: Event Subscriptions (Native, No Code)

Event Subscriptions are NetSuite's purpose-built webhook mechanism. You configure them declaratively, no SuiteScript required.

Step-by-Step Setup

  1. Enable the feature Setup > Company > Enable Features > SuiteCloud tab > check Event Subscriptions > Save.

  2. Create the subscription Create the subscription.

  3. Configure the trigger

  • Record Type: Choose the source record (e.g., Sales Order, Item, Customer).
  • Events: Select Create, Update, Delete, or any combination.
  • Filter Criteria (optional): Add a saved search filter to limit which records fire, for example, only Sales Orders with status = 'Pending Approval' or only Item records where custitem_celigo_sync = true.
  1. Define the destination
  • URL: Paste your Celigo webhook listener endpoint.
  • Authentication: Choose None, Basic Auth, or Bearer Token. For Celigo, Bearer Token is typical, paste the token Celigo generated.
  • Headers: Add any custom headers Celigo expects (e.g., X-Celigo-Source: NetSuite).
  1. Payload format Event Subscriptions send a fixed JSON envelope. You cannot customize the payload structure. The body includes:
{
  "eventType": "CREATE|UPDATE|DELETE",
  "recordType": "salesorder",
  "recordId": 12345,
  "timestamp": "2025-01-15T14:30:00Z",
  "data": { /* full record field values */ }
}

If Celigo needs a slimmer payload or specific field names, you'll need a middleware step that reshapes it, or Approach 2.

  1. Save and test Create a test record matching your filter. Check Celigo's execution log, you should see the payload within seconds.

Limits to Know

NetSuite publishes concurrency and data limits for webhook deliveries. The platform enforces a maximum of 100 subscriptions per account, 50 concurrent deliveries, and a 5 MB payload ceiling. Retry logic follows exponential backoff (1 minute, 5 minutes, 15 minutes) for up to three attempts. NetSuite Connector keeps trying until a Finished status is received. Build idempotency on the Celigo side using recordId + eventType.

NetSuite Connector Concurrency and Data Limits detail the platform-level thresholds that apply to outbound webhook traffic.

Approach 2: User Event Script with https.post (Full Control)

If you need custom payloads, conditional logic, or your account isn't on 2026.2, a User Event Script remains the workhorse. This runs in afterSubmit so the record is committed before the callout.

Minimal Working Example

/**
 * @NApiVersion 2.1
 * @NScriptType UserEventScript
 */
define(['N/https', 'N/log', 'N/runtime'], (https, log, runtime) => {
    const CELIGO_ENDPOINT = runtime.getCurrentScript().getParameter({ name: 'custscript_celigo_webhook_url' });
    const CELIGO_TOKEN = runtime.getCurrentScript().getParameter({ name: 'custscript_celigo_bearer_token' });

    const afterSubmit = (ctx) => {
        if (ctx.type !== ctx.UserEventType.CREATE && ctx.type !== ctx.UserEventType.EDIT) return;

        const rec = ctx.newRecord;
        const payload = buildPayload(rec);
        sendToCeligo(payload);
    };

    const buildPayload = (rec) => ({
        eventType: rec.id ? 'UPDATE' : 'CREATE',
        recordType: rec.type,
        recordId: rec.id,
        timestamp: new Date().toISOString(),
        data: {
            entity: rec.getValue({ fieldId: 'entity' }),
            total: rec.getValue({ fieldId: 'total' }),
            status: rec.getValue({ fieldId: 'status' }),
            customField: rec.getValue({ fieldId: 'custbody_celigo_trigger' })
        }
    });

    const sendToCeligo = (payload) => {
        try {
            const response = https.post({
                url: CELIGO_ENDPOINT,
                headers: {
                    'Authorization': `Bearer ${CELIGO_TOKEN}`,
                    'Content-Type': 'application/json',
                    'X-NetSuite-Script': runtime.getCurrentScript().id
                },
                body: JSON.stringify(payload)
            });
            log.audit({ title: 'Celigo webhook sent', details: `Status: ${response.code}` });
            if (response.code >= 400) {
                log.error({ title: 'Celigo error response', details: response.body });
            }
        } catch (e) {
            log.error({ title: 'Webhook callout failed', details: e.message });
        }
    };

    return { afterSubmit };
});

Deployment Steps

  1. Create Script Record Customization > Scripting > Scripts > New. Upload the .js file. Set Script Type = User Event Script.

  2. Add Script Parameters On the script record, Parameters tab > New:

  • Label: Celigo Webhook URL, ID: custscript_celigo_webhook_url, Type: URL
  • Label: Celigo Bearer Token, ID: custscript_celigo_bearer_token, Type: Hyperlink (stores as encrypted string)
  1. Deploy Customization > Scripting > Script Deployments > New.
  • Applies To: Sales Order (or your target record)
  • Event Types: Create, Edit (uncheck Delete unless needed)
  • Status: Released
  • Parameters: Paste the Celigo endpoint URL and token.
  1. Test Create a Sales Order. Check the script execution log (Customization > Scripting > Script Execution Logs) and Celigo's inbound log.

Governance and Error Handling

  • Each https.post consumes 10 governance units. The afterSubmit context has ~1,000 units, plenty for one callout, but don't loop.
  • No automatic retry. If Celigo is down, the event is lost unless you build a retry queue (custom record + Scheduled Script).
  • Timeout: https.post defaults to 45 seconds. Add timeout: 30000 in the options if Celigo is slow.
  • Idempotency: Include recordId + lastModifiedDate in the payload so Celigo can dedupe.

Decision Matrix: Which to Choose?

RequirementEvent SubscriptionUser Event Script
No code / admin-only config✅❌
Custom payload shape❌✅
Conditional firing (complex logic)Limited (saved search filter)✅ Full SuiteScript
Pre-2026.2 accounts❌✅
Automatic retry on failure✅ (3x)❌ You build it
Governance impactNear zero10 units per call
Payload size limit5 MB5 MB (https.post limit)
Authentication optionsBasic, Bearer, OAuth 2.0Any (you code it)

The Celigo-Specific Gotcha

Celigo's NetSuite webhook listener expects a specific JSON structure for its "Real-Time" flow type. The default Event Subscription envelope won't match it. You have two options:

  1. Use a Celigo "Generic" listener that accepts any JSON, then map fields in a Celigo transform step.
  2. Use the User Event Script and shape the payload exactly to Celigo's spec (usually with flat fields).

If you're already building Celigo flows, option 2 is often cleaner, one less mapping layer to maintain.

What to Verify After Deploying

  1. Execution log shows success (status 200/202 from Celigo).
  2. Celigo flow runs and creates/updates the target record in the other ERP.
  3. No duplicate events, create the same record twice, confirm Celigo processes once (idempotency key working).
  4. Failure scenario, disable the Celigo endpoint, trigger an event, confirm retry behavior (Event Subscription retries 3x; User Event Script logs error and stops).

System Notes Guide can help audit which records triggered webhooks and when.

Next Steps

If you're on 2026.2+ with Event Subscriptions enabled and Celigo can ingest the standard envelope, start there, it's zero code, auto-retries, and survives script deployments. If you need payload shaping, complex filters, or you're on an older release, the User Event Script pattern above takes ~30 minutes to deploy.

For either path, test with a single record first. The error response tells you exactly what went wrong, check the script execution log or Celigo's inbound payload inspector before scaling to production volume.

Put these ideas to work.

Suite Utils builds small NetSuite utilities that fix the specific thing breaking your day. Each one runs as a native SuiteScript SuiteApp inside your account. No sales call, no onboarding.

Browse the utilities

Enjoyed this one?

Get NetSuite tips like this in your inbox. No spam. Practical guides only.

Keep reading