Vendors and Purchasing
NetSuite Unknown
2026-11-13

NSEB Inbound Document Auto-Conversion Pipeline for Inbound E-Documents

NetSuite Electronic Business (NSEB) now auto-converts inbound UBL XML documents to inbound e-documents via a scheduled Map/Reduce script, resolving vendor entities through a custom plugin or PEPPOL ID lookup and routing UBL invoices to vendor bills and credit notes to vendor credits.

Affects:SuiteScript 2.xN/renderMap/Reduce ScriptsInbound Custom Data Source Plugin TypeElectronic Invoicing SuiteAppNetSuite Electronic Business (NSEB)

Oracle's documentation describes the NSEB Inbound Document-to-Inbound E-Document conversion pipeline. No specific release version is cited in the source — verify against your tenant's release notes or SuiteApp version history to determine when this landed in your environment. This feature requires both the NetSuite Electronic Business and Avalara Processing for NetSuite Electronic Invoicing licenses with available volume.

What changed

A scheduled Map/Reduce script (NSEB Inbound Converter MR) runs every 15 minutes and picks up NSEB Inbound Document records that match all three criteria:

  • Status = Pending or Failed
  • Document Type = InvoiceDetailRequestUBL
  • Raw Document contains a value in XML format

The converter parses the inbound UBL XML and automatically determines the target transaction type:

  • UBL Invoice → Vendor Bill
  • UBL Credit Note → Vendor Credit

If the XML is missing, empty, malformed, or is not a supported UBL invoice or credit note, conversion halts and an error is returned on the NSEB inbound document record.

Template resolution via XSD

The inbound e-document template is automatically selected when the template record contains an XSD file that matches the inbound payload. If no XSD file is associated with the e-document template, the template cannot be selected and conversion will not proceed (error ERR_EDOCUMENT_TEMPLATE_NOT_FOUND).

Entity resolution: plugin vs. PEPPOL ID

Entity (vendor/customer) details are resolved in one of two ways, depending on script deployment configuration:

  1. Custom Plugin (preferred when configured) — The MR script deployment accepts a plugin script ID as a parameter. The plugin must implement the Inbound Custom Data Source Plugin Type and return the entity internal ID at the path customDataSources[0].data.entityId. A sample SuiteScript 2.x plugin implementation is provided in the source:
/**
 * @NApiVersion 2.x
 * @NScriptType plugintypeimpl
 * @NModuleScope Public
 */
define(['N/render'], function (nsrender) {
    function inject(params) {
        var customObj = {
            entityId: 55 // internal id of the entity
        };
        return {
            customDataSources: [
                {
                    format: nsrender.DataSource.OBJECT,
                    alias: "entityDetails",
                    data: customObj,
                },
            ],
        };
    }
    return { inject: inject };
});
  1. PEPPOL ID fallback — If no plugin ID is provided in the script deployment parameters, the converter extracts the PEPPOL ID from the XML payload at XPath //cac:AccountingSupplierParty/cac:Party/cbc:EndpointID and matches it against vendor/customer records. This requires a one-to-one PEPPOL ID mapping; multiple entities sharing the same PEPPOL ID will trigger error ERR_MULTIPLE_ENTITY_FOUND_WITH_PEPPOLID.

Avalara Document ID

The Avalara Document ID field on the NSEB inbound document stores the Avalara-side document identifier for traceability.

Discarding records

To prevent a specific NSEB Inbound Document from being picked up by the converter, edit the record and set its status to Discarded.

Error codes reference

  • ERR_ENTITY_NOT_FOUND_IN_PLUGIN — Plugin executed but entity ID not found at customDataSources[0].data.entityId.
  • ERR_ENTITY_NOT_FOUND_WITH_ENTITYID — No vendor/customer record matches the entity ID returned by the plugin.
  • ERR_PEPPOL_ELEMENT_NODE_NOT_FOUND — PEPPOL ID XPath node missing from the XML payload.
  • ERR_PEPPOL_ELEMENT_NOT_FOUND — PEPPOL ID node exists but has no value.
  • ERR_ENTITY_NOT_FOUND_WITH_PEPPOLID — No vendor/customer associated with the extracted PEPPOL ID.
  • ERR_MULTIPLE_ENTITY_FOUND_WITH_PEPPOLID — Multiple vendors/customers share the same PEPPOL ID.
  • ERR_EDOCUMENT_PACKAGE_NOT_FOUND — No e-document package linked to the resolved vendor/customer.
  • ERR_EDOCUMENT_TEMPLATE_NOT_FOUND — No active e-document template with matching XSD for the package, subsidiary, and transaction type.

What to do

  1. Verify licensing — Confirm both NetSuite Electronic Business and Avalara Processing for NetSuite Electronic Invoicing are active with available volume. Without these, the Convert button on Inbound E-Documents is disabled.
  2. Set up e-document templates — Ensure each inbound template record has an XSD file associated with it. Without the XSD, template auto-selection fails and conversion is blocked.
  3. Configure entity resolution — Decide between the plugin approach and PEPPOL ID matching:
    • For the plugin: create a new plugintypeimpl script of type Inbound Custom Data Source Plugin Type, deploy it, and set its script ID as a parameter on the NSEB Inbound Converter MR script deployment. The return structure must place the entity internal ID at exactly customDataSources[0].data.entityId.
    • For PEPPOL: ensure each vendor/customer has a unique PEPPOL ID and that inbound UBL payloads include the endpoint at //cac:AccountingSupplierParty/cac:Party/cbc:EndpointID.
  4. Associate e-document packages — Link an e-document package to each vendor/customer that will receive inbound documents, scoped to the correct subsidiary and transaction type (Vendor Bill / Vendor Credit).
  5. Monitor the Electronic Documents portlet — Converted documents appear under Inbound E-Documents for Conversion. Check the E-Document Audit Trail subtab on individual records for conversion history and errors.
  6. Handle failures — Records that fail conversion remain at Failed status and will be retried on the next 15-minute cycle. Use the error codes above to diagnose. Set status to Discarded to permanently exclude a record from conversion.

Note: The source release version is not specified. This page appears in Oracle's NetSuite help documentation without a release tag. Confirm the applicable version against your SuiteApp bundle version or NetSuite release notes index.