EDI Trading Partners

Updated Jul 26, 2026
EDI

EDI Trading Partners

A trading partner is one company you exchange EDI with, and one record in DataMagik. It answers three questions: how do I recognise a file from them, what should happen to each kind of document, and how do I send documents back.

Find them at Extensions > EDI Trading Partners. Creating and editing partners requires the DataMagik - Builder permission; anyone with Builder or Viewer can look.

1. Identity — how a file is recognised

The trading partner form: name, sender and receiver qualifier and ID, and direction
The sender qualifier and ID are the match key. Everything else depends on getting these right.
FieldWhat it is
NameYour label for the partner. It appears throughout the console.
Sender qualifier / Sender IDISA05 and ISA06 from the files they send you. This pair is the match key — DataMagik looks up an inbound interchange by exactly these two values.
Receiver qualifier / Receiver IDISA07 and ISA08 — you. Used when building documents to send them.
DirectionSend & receive, receive only, or send only.
EnabledTurn a partner off without deleting their history.
The qualifier and ID must match byte for byte. They are compared exactly, and they are the most common reason a correctly configured partner still shows "unmatched". Copy them out of a real file the partner sent rather than out of their written specification — the two disagree more often than you would expect, usually over padding.

Interchange identity & delimiters (advanced)

Expand this section to set the ISA01ISA04 authentication and security fields, and to override the delimiters used when building outbound documents. Leave the delimiters blank and DataMagik uses the standard defaults; inbound files are always read using the delimiters declared in the file itself, so these settings never affect parsing.

2. Document routing — what happens to each document

The routing map is a list of rows. Each row is one direction plus one transaction set — "they send us 850" — and says which mapping spec reads it and what should happen next.

A document routing row: direction, document number, mapped by spec, then, and note
One row per document type. A document with no row goes to the review queue.
"Then"What happens
Send to review queueThe document is mapped, recorded, and queued for a person to approve.
Write to Plex (via the spec's script)Records the decision and sets the target. DataMagik itself does not write to Plex. The write is performed by the document-logic script attached to the spec — see Talking to Plex.
Hand to a scriptRuns the named script for every document of this type, with the mapped business object in its input context.

What an action=script run receives

function main(context) {
  context.trigger          // "edi_inbound"
  context.partner          // the trading partner's name
  context.transaction_set  // "850"
  context.control_number
  context.transaction_id   // the row in the EDI console, as a string
  context.spec             // which mapping read it
  context.mapped           // the business object the spec produced
  context.settings         // the effective settings for this partner + document
}

The run appears in the script's own execution history with triggered_by = "edi_inbound". A route naming a script that does not exist is reported on the transaction rather than skipped silently.

Replay does not re-run the script, for the same reason it does not re-send an acknowledgement: a script that posts an order to an ERP must not post it twice because somebody re-ran a mapping to check it. To deliberately re-run one, fix the script and have the partner re-send, or replay the gateway transfer the file arrived on.
Write to Plex is still a decision, not an execution. Unlike the other two, it depends entirely on the spec having a document-logic script. Read Talking to Plex before relying on it.

Per-document settings

Each inbound routing row carries three switches that change how the pipeline treats that document:

SettingEffect
Send acknowledgements (997)Return a functional acknowledgement to the partner automatically, with a real control number. See Acknowledgements.
Check content conformanceOn by default. Verifies the partner actually sent the segments and fields the document type requires, not just a well-formed envelope. Turn it off only for a partner who legitimately sends a non-standard document.
Turn around asAnswer this document with an outbound one — put 855 here to answer an 850 automatically. Leave blank for none.

They apply to inbound rows only, and are hidden on outbound ones, where they mean nothing.

3. Outbound delivery — how documents reach them

One picker chooses how documents DataMagik builds get to this partner:

  • Push to partner's server — direct from DataMagik
  • Partner collects from our file gateway
  • Email the document as an attachment
  • Plex mailbox (send and/or retrieve)
  • Push via on-site connector agent (SFTP) or (FTP)
  • Outgoing delivery script (or none)
The outgoing script is a fallback, not an addition. Choosing any delivery method above replaces it — the script is not run as well. Each option is documented in Sending Documents.

4. Retrieval and pickup schedule

Retrieval, delivery and pickup schedule: incoming script, outgoing script, cron and enable checkbox

The incoming (retrieval) script fetches inbound documents from wherever the partner puts them. Tick Enable scheduled pickup and give a 5-field UTC cron expression to run it automatically. For a Plex mailbox with retrieval configured, the built-in pickup runs instead and no script is needed.

5. Exception alerts & approvals

Exception alerts and approvals: assign exceptions to a role, a user, or nobody

When a document from this partner lands in review, this decides who is asked to look at it — a role (everyone in it is alerted) or one named user. Left as No approver, exceptions still appear in the console but nobody is assigned a task.

When a document arrives from someone you have not registered

It is not rejected and not lost. DataMagik parses it, records it with status review, partner shown as , and the note "no trading partner matched the interchange sender". The raw payload is stored in full.

To fix it: open the document in the console, read the ISA sender out of the raw payload, create the partner with exactly those values, then replay the document. Replay re-runs the whole decision against your new configuration.

The same treatment applies to a partner you have registered who sends a document type with no routing row: the note names the document ("partner X has no route for 856 inbound") and it waits in review.
Was this page helpful?