EDI Trading Partners
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
| Field | What it is |
|---|---|
| Name | Your label for the partner. It appears throughout the console. |
| Sender qualifier / Sender ID | ISA05 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 ID | ISA07
and ISA08 — you. Used when building documents to send them. |
| Direction | Send & receive, receive only, or send only. |
| Enabled | Turn a partner off without deleting their history. |
Interchange identity & delimiters (advanced)
Expand this section to set the ISA01–ISA04 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.
| "Then" | What happens |
|---|---|
| Send to review queue | The 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 script | Runs 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.
Per-document settings
Each inbound routing row carries three switches that change how the pipeline treats that document:
| Setting | Effect |
|---|---|
| Send acknowledgements (997) | Return a functional acknowledgement to the partner automatically, with a real control number. See Acknowledgements. |
| Check content conformance | On 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 as | Answer 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)
4. Retrieval and pickup schedule
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
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.