writing-inbound-jsonata

Generate inbound 850 JSONata expressions for Orderful NetSuite SuiteApp Advanced Mapping.

6|6|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/Orderful/orderful-netsuite-skills --skill writing-inbound-jsonata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-inbound-jsonata
Source: https://github.com/Orderful/orderful-netsuite-skills/tree/main/skills/writing-inbound-jsonata
Command: npx skills add https://github.com/Orderful/orderful-netsuite-skills --skill writing-inbound-jsonata

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing correct inbound JSONata for NetSuite’s Advanced Mapping is error-prone, especially when you must override defaults safely and populate custom fields using the non-obvious userDefinedFields structure.

Core Features & Use Cases

  • Inbound 850 JSONata mapping authoring for the Orderful NetSuite SuiteApp, focused on Advanced Mapping for 850 Purchase Orders.
  • Safe override workflow that starts from $defaultValues and overlays only the fields you intend to change using the transform operator pattern.
  • Correct custom field writes via transaction.userDefinedFields (including the critical rule that the userDefinedFields object replaces rather than merges).
  • Helper-powered lookups using pre-registered functions like $lookupContact, $lookupItems, and $lookupRecords to resolve contacts and item identifiers from raw Mosaic input.
  • Date handling guardrails for custbody_/custentity_ date custom fields using the _textFields workaround so the Sales Order save doesn’t fail.

Quick Start

Ask for an inbound 850 Advanced Mapping JSONata expression that pulls the right contact and item details from the raw Mosaic payload and writes the needed custbody_* custom fields (including any required date fields) onto the Sales Order using $defaultValues and userDefinedFields.

Frequently Asked Questions about writing-inbound-jsonata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write inbound 850 JSONata mappings for NetSuite Advanced Mapping?

To map custom fields in inbound 850 JSONata, use the transaction.userDefinedFields structure. The critical rule is that this object replaces rather than merges, so you must include all desired custom fields in a single write to avoid accidentally dropping existing values.

Why do custom date fields fail when mapping an inbound 850 in NetSuite?

Custom date fields (custbody_*/custentity_*) fail during Sales Order save because NetSuite expects a specific text format. You must apply the _textFields workaround in your JSONata expression to properly format these date fields and prevent the transaction save from failing.

How do I resolve contacts and items from raw EDI 850 input in JSONata?

To resolve contacts and item identifiers from raw Mosaic EDI 850 input, use pre-registered helper functions like $lookupContact, $lookupItems, and $lookupRecords within your JSONata expression. These functions query NetSuite data directly during the mapping process.

Does the Orderful NetSuite SuiteApp support overriding default values in JSONata?

Yes, the Orderful NetSuite SuiteApp supports overriding default values by starting from $defaultValues and applying the correct ~> overlay pattern in your JSONata expression. This workflow allows you to safely change specific fields like contacts and custom fields while preserving required defaults.

What is the safest way to populate custom fields in a NetSuite 850 JSONata mapping?

The safest way to populate custom fields in a NetSuite 850 JSONata mapping is to construct the complete userDefinedFields object and apply it via the ~> overlay pattern onto $defaultValues. Because userDefinedFields replaces rather than merges, providing the full object prevents unintended data loss.