ERPMedium setup

Sage + NeutronEDI

Add EDI translation and validation to your Sage workflows with a simple REST API.

Sage installations cover everything from Sage 100 (Windows desktop) to Sage Intacct (cloud-native). NeutronEDI handles the EDI translation in a thin middleware layer outside Sage so you don't need a Sage-specific EDI module — Python, C#, or Node code reads from Sage's API or database and calls the Read / Write endpoints directly.

How Sage + NeutronEDI works

Inbound: trading-partner EDI flows into Sage. Outbound: Sage data flows back out as compliant EDI.

Inbound — partner → Sage

1

Trading partner sends EDI

The trading partner sends an X12 or EDIFACT document via SFTP, AS2, or a direct API call into your environment.

2

NeutronEDI translates

Your service POSTs the raw EDI to /api/v1/read/x12 (or /read/edifact). NeutronEDI returns clean JSON in milliseconds.

3

JSON flows into Sage

The JSON lands in Sage — mapped to native objects, imported via middleware, or consumed directly by your code (Sage 100 / 300 / X3 (DAL) or Sage Intacct (REST API)).

Outbound — Sage → partner

1

Sage produces data

A shipment confirmation, invoice, or PO acknowledgment occurs inside Sage. Your service picks it up via webhook, polling, or scheduled query.

2

NeutronEDI generates EDI

POST a JSON payload describing the document to /api/v1/write/x12 (or /write/edifact). NeutronEDI returns standards-compliant EDI.

3

Send to partner

Drop the resulting EDI document onto the partner's SFTP, AS2, or VAN — the same channel that delivered the inbound document.

Common EDI transactions for Sage

These are the transaction sets you'll see most often in Sage integrations. The Read API parses every set NeutronEDI supports — this is just where teams typically start.

CodeNameDescription
850Purchase OrderRetailer sends purchase order to supplier
856Advance Ship NoticeSupplier notifies retailer of shipment details
810InvoiceSupplier sends invoice for delivered goods
997Functional AcknowledgmentTechnical receipt confirmation for any EDI document

How Sage teams use NeutronEDI

Automate purchase order processing from retailers into Sage

A Python or C# listener picks up incoming 850s, calls /api/v1/read/x12, and uses the Sage API (Intacct) or DAL (Sage 100/300) to create Sales Orders or Quotes ready for the Order Entry team to release.

Generate EDI invoices and ASNs from Sage shipment records

Once an order is shipped in Sage, a scheduled export sends the shipment and invoice data through /api/v1/write/x12 to produce 856 and 810 documents. The middleware delivers them via SFTP, AS2, or VAN.

Replace legacy EDI middleware with a modern API approach

Sites running Gentran, Cleo, or homegrown VB scripts often migrate to NeutronEDI in a phased rollout — translation moves to the API first, while connectivity (AS2/SFTP) is handled separately on its existing schedule.

Example integration

A Python middleware exports posted Sage Intacct invoices, calls the NeutronEDI Write API to generate X12 810 documents, and drops them on the partner's SFTP server.

sage_intacct_outbound_810.py
import os
import requests
from datetime import date

NEUTRON_API_KEY = os.environ["NEUTRON_API_KEY"]
INTACCT_SENDER_ID = os.environ["INTACCT_SENDER_ID"]
INTACCT_SESSION_ID = os.environ["INTACCT_SESSION_ID"]


def fetch_invoices_to_send() -> list[dict]:
    body = {
        "request": {
            "control": {"senderid": INTACCT_SENDER_ID, "controlid": "edi", "uniqueid": "false"},
            "operation": {
                "authentication": {"sessionid": INTACCT_SESSION_ID},
                "content": {
                    "function": {
                        "@controlid": "edi-fetch",
                        "readByQuery": {
                            "object": "ARINVOICE",
                            "fields": "RECORDNO,RECORDID,CUSTOMERID,TOTALDUE,WHENPOSTED,PONUMBER",
                            "query": "EDI_PENDING = true",
                            "pagesize": 100,
                        },
                    }
                },
            },
        }
    }
    resp = requests.post("https://api.intacct.com/ia/xml/xmlgw.phtml", json=body, timeout=20)
    resp.raise_for_status()
    return resp.json()["operation"]["result"]["data"]["arinvoice"]


def to_810(inv: dict) -> dict:
    return {
        "type": "810",
        "invoiceNumber": inv["RECORDID"],
        "invoiceDate": inv["WHENPOSTED"],
        "purchaseOrderNumber": inv.get("PONUMBER", ""),
        "buyerId": inv["CUSTOMERID"],
        "total": str(inv["TOTALDUE"]),
        "items": [],  # populated from arinvoiceitem detail
    }


def write_x12(payloads: list[dict]) -> str:
    res = requests.post(
        "https://api.neutronedi.com/api/v1/write/x12",
        headers={
            "X-API-Key": NEUTRON_API_KEY,
            "Content-Type": "application/json",
        },
        json={
            "interchange": {"sender": "ACMECORP", "receiver": "BIGCUSTOMER"},
            "transactions": payloads,
        },
        timeout=20,
    )
    res.raise_for_status()
    return res.text


def run() -> None:
    invoices = fetch_invoices_to_send()
    if not invoices:
        return
    raw_x12 = write_x12([to_810(inv) for inv in invoices])
    upload_to_sftp(f"acme-{date.today():%Y%m%d}.edi", raw_x12)


def upload_to_sftp(filename: str, content: str) -> None:
    ...

What the API returns

Write API response (raw X12 810)
ISA*00*          *00*          *ZZ*ACMECORP       *ZZ*BIGCUSTOMER    *260418*0900*U*00401*000001213*0*P*>~
GS*IN*ACMECORP*BIGCUSTOMER*20260418*0900*1*X*004010~
ST*810*0001~
BIG*20260418*ARI-2241*20260411*PO-99213~
N1*BY*BIGCUSTOMER*92*0098127~
IT1*1*100*EA*15.00**VC*PART-X1~
TDS*150000~
CTT*1~
SE*6*0001~
GE*1*1~
IEA*1*000001213~

All code examples assume an API key issued from the Customer Portal. The free Developer tier includes 500 calls per month.

Getting started with Sage EDI

  1. 1

    Sign up for a free NeutronEDI Developer account

    Create an account in the NeutronEDI Customer Portal. The Developer tier includes 500 API calls per month at no cost.

    Open the portal
  2. 2

    Create an API key in the Customer Portal

    Generate an API key from the dashboard. The plaintext key is shown once at creation; copy it into your secret store.

    Read the docs
  3. 3

    Send your first EDI document to the Read endpoint

    POST a sample X12 or EDIFACT document to https://api.neutronedi.com/api/v1/read/x12 with the X-API-Key header. Confirm the JSON response shape matches what Sage expects on the receiving side.

    Read the docs
  4. 4

    Map the JSON response to your Sage data model

    Use the language and runtime that already integrates with Sage (Sage 100 / 300 / X3 (DAL) or Sage Intacct (REST API)). Map fields from the NeutronEDI JSON to Sage entities and persist them through the platform's standard create / update API.

Start Your Sage EDI Integration

500 API calls per month on the Developer plan. No credit card. No sales call. Read, write, and validate X12 and EDIFACT in minutes.