Version: eXtendMultiFulfillment 1.1.15 and above
Audience: Administrator, Developer

Overview

eXtendMultifulfillment streamlines the creation of Pre-Fulfillment records in NetSuite through RESTlet integration. This eliminates the need for manual CSV uploads and direct NetSuite logins, allowing you to automate the process via your existing integrations. This article details the configuration and functionality of Pre-Fulfillment record creation using RESTlet Integration.

Prerequisites

Before you begin, ensure you have:

  • Access to NetSuite administrator privileges
  • Understanding of RESTlet API concepts
  • Knowledge of your existing integration infrastructure

Configuration

Create Integration & Access Tokens

To utilize the RESTlet API, you must establish an integration. If you have an existing integration for RESTlet communication, you can reuse it.

Refer to the SuiteAnswers articles below for creating integration records:

Next, generate an authentication token using either Machine-to-Machine (M2M) authentication or Token-Based Authentication (TBA). Ensure that the role associated with your token has all permissions granted to the "eXtendMultiFulfillment API User [Bundle]" role. Alternatively, you may directly use the provided "eXtendMultiFulfillment API User [Bundle]" role to create your access tokens

RESTlet Details

The RESTlet included in the bundle for API-based Pre-Fulfillment record creation is "eXtendMultifulfillment PF CSV Upload." Access its deployment settings and configure the email address of the user who should receive notifications about Pre-Fulfillment record creation errors on the "Parameters" subtab.
Image Placeholder

The RESTlet endpoint URL follows this format: https://<YOUR_ACCOUNT_ID>.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_extend_multifulfill_csv_upl&deploy=customdeploy_extend_multifulfill_csv_upl

Replace <YOUR_ACCOUNT_ID> with your NetSuite account ID. For Sandbox environments, replace  any underscores _ with hyphens - in the URL.

Payload Format

Make requests to the RESTlet endpoint using the HTTP POST method. The payload format with sample structure is below:

{
    "action": "csvPfUpload",
    "body": {
      "extend_file_name": "pf_fields_mapping_test.csv",
      "replaceExistingPF": false,
      "Sheet1": [
      [
        "Sales Order",
        "Prefulfillment Item Shipment Group",
        "Ship Date",
        "Item",
        "Item Quantity",
        "Ship Method",
        "Address Name",
        "Addressee",
        "Address 1",
        "Address 2",
        "City",
        "State",
        "Zip",
        "Phone",
        "Country",
        "Line UUID"
      ],
      [
        "SO6069372066",
        "1",
        "6/26/25",
        "N6210-Midnight Navy-XL-Hit Promotional Products",
        "1",
        "UPS-Ground-RN",
        "Consumers Credit Union",
        "Office Manager",
        "1037 Washington Avenue",
        null,
        "Holland",
        "MI",
        "49423",
        null,
        "United States",
        "b2ce96c6-eebf-4ec0-85f8-766fc0a3deb9"
      ],
      [
        "SO6069372066",
        "2",
        "6/26/25",
        "N6210-Midnight Navy-XL-Hit Promotional Products",
        "1",
        "UPS-Ground-RN",
        "Consumers Credit Union",
        "Office Manager",
        "6935 South Cedar Street",
        null,
        "Lansing",
        "MI",
        "48911",
        "1530691553",
        "United States",
        "b2ce96c6-eebf-4ec0-85f8-766fc0a3deb9"
      ]
    ]
   
  }
}

  1. extend_file_name: Name for the CSV file generated in NetSuite. It's saved in the eXtendTech/extendmultifullfillupload folder in the File Cabinet.
  2. replaceExistingPF: Set to true in your request body to replace any existing Pre-Fulfillment records with new data.
  3. Sheet1: Contains your Pre-Fulfillment record as a JSON array. The first object defines the field names. Details on supported fields and custom field addition are in the next section

Pre-Fulfillment Fields Details

The default supported fields for Pre-Fulfillment record creation are:
  1.  Sales Order
  2.  Prefulfillment Item Shipment Group
  3.  Ship Date
  4.  Item
  5.  Item Quantity
  6.  Ship Method
  7.  Address Name
  8.  Addressee
  9.  Address 1
  10.  Address 2
  11.  City
  12.  State
  13.  Zip
  14.  Phone
  15.  Country
To map additional fields to generated Item Fulfillment records when processing Pre-Fulfillment records, follow these steps:

1. Create Custom Fields on Pre-Fulfillment Records

To map additional fields from your Pre-Fulfillment custom record to the Item Fulfillment record, you'll need to create the corresponding fields.

To map additional fields from your Pre-Fulfillment custom record to the Item Fulfillment record:

  1. Create the necessary custom fields on the Pre-Fulfillment custom record (source fields)
  2. If needed, create matching custom fields on the Item Fulfillment record (target fields)

2. Add Custom Field Mapping Configuration

Update the mapping on the eXtendMultifulfillment Setup's CSV Headers & PF Custom Fields Mapping table to ensure proper data flow:

  • From import file to eXtendMultifulfillment Prefulfillment custom record
  • From pre-fulfillment record to item fulfillment record
Image Placeholder

Updating Payload with Custom Fields

When preparing your import payload, remember:
  • Custom Fields: Include names and values for all custom fields in your payload. Names are case-sensitive and must match exactly as specified in the eXtendMultiFulfillment Setup.

  • Line-Level Fields: Prefix line-level field headers with "Line_" (e.g., Line_My_Field_Name).

  • Boolean/Checkbox Fields: Use "true" or "false" for boolean or checkbox fields.

  • Select and Multi-Select Fields: Use the internal ID of the value, not the display text. For example, with a custom list containing "Value 1" (Internal ID: 100) and "Value 2" (Internal ID: 200), use 100 or 200 in your payload.

  • Duplicate Custom Fields within a Group: If different values exist for the same custom field within the same Pre-fulfillment Item Shipment Group, the system uses the value from the first instance.

Note: For more information about mapping custom fields in eXtendMultiFulfillment, refer to Mapping Custom Field Values in eXtendMultiFulfillment Imports

Frequently Asked Questions (FAQs)

Q: What happens if there's an error during Pre-Fulfillment record creation?
A: Error notifications are sent to the email address configured in the RESTlet deployment settings.
Q: Is there a limit to how many records I can create at once?
A: While there's no hard limit, we recommend batching large imports to optimize performance and reduce the risk of timeouts.