npx skills add ...
npx skills add celigo/ai --skill building-b2b
Build Celigo B2B Manager EDI integrations -- trading partner onboarding, EDI profiles, file definitions, X12/EDIFACT flow patterns, and transaction monitoring. Use when onboarding partners, editing EDI flows, setting up parsing rules, or monitoring document exchange.
npx skills add celigo/ai --skill building-b2b
B2B Manager is Celigo's EDI hub for exchanging structured business documents with trading partners. It handles X12 (ANSI) and EDIFACT (UN) standards over FTP, AS2, and VAN connections.
An EDI integration has these Celigo-specific components:
X12 (ANSI ASC X12) -- North American standard. Documents are transaction sets identified by 3-digit codes (850 = PO, 810 = Invoice, 856 = ASN, 997 = FA, 855 = PO Ack, 846 = Inventory, 860 = PO Change). 50+ additional types supported including healthcare (834/835/837), transportation (204/210/214), and supply chain (753/843/861). Envelope: ISA → GS → ST → segments → SE → GE → IEA. Versions: 4010, 5010, 4030, etc.
EDIFACT (UN/EDIFACT) -- International standard. Documents are messages identified by 6-letter codes (ORDERS, INVOIC, DESADV, ORDRSP, RECADV, INVRPT, PRICAT, CONTRL). Additional messages: INSDES, OSTRPT, PARTIN, DELJIT, PRODAT, DELFOR, SLSRPT. Envelope: UNB → UNH → segments → UNT → UNZ. Versions: D93A, D96A, D01B, etc.
| Task | Resource | CLI command | Schema |
|---|---|---|---|
| Discover partner templates | Trading partner connector | tp-connectors list | tp-connector-request.yml |
| Define interchange envelope | EDI profile | edi-profiles create | edi-profile-request.yml |
| Define document parsing/generation | File definition | file-definitions create | file-definition-request.yml |
| Monitor document exchange | EDI transaction | edi-transactions list | edi-transaction.yml |
| Connect to partner endpoint | Connection (FTP/AS2/VAN) | connections create | See configuring-connections |
| Resource | Required |
|---|---|
| EDI profile (X12) | name, fileType: "edix12", tpInterchangeId, myInterchangeId, tpIdQualifier, myIdQualifier, tpGroupId, myGroupId, isa12 (version), gs07, gs08 |
| EDI profile (EDIFACT) | name, fileType: "edifact", unb010_0001, unb010_0002, versionNumber, releaseNumber, controllingAgency |
| File definition | name, version: "2", format (e.g. delimited/x12), delimited block (rowSuffix, colDelimiter), rules[] |
Trading partner connectors are pre-built templates (590+) that define connection type, EDI profile defaults, and export/import config for a specific partner.
The connector's supportedBy object tells you what's pre-configured and what the user must provide for the connection, EDI profile, and exports/imports. See tp-supported-by-section.yml for the full structure.
If no connector exists, build the connection, EDI profile, and file definitions from scratch.
Before creating anything, check what the account already has. EDI profiles are per-partner (one profile covers all document types), so duplicates waste control number sequences.
Create an FTP, AS2, or VAN connection for the trading partner. Use the connector's supportedBy.connection for pre-configured fields. See configuring-connections for full connection setup.
The EDI profile defines the interchange envelope -- ISA/GS segments (X12) or UNB segment (EDIFACT). Read edi-profile-request.yml for all fields.
Key X12 fields: tpInterchangeId/myInterchangeId (ISA06/ISA08), tpIdQualifier/myIdQualifier (ISA05/ISA07, e.g. ZZ = mutually defined), isa12 (version, e.g. 00401), isa15 (P = production, T = test), controlNumber (auto-incremented).
Each document type (850, 810, 856, etc.) needs its own file definition with parsing/generation rules. Read file-definition-request.yml for the rules structure.
Key fields: format (delimited/x12 or delimited/edifact), globalId (standard template reference, immutable), delimited.rowSuffix (segment terminator, ~ for X12), delimited.colDelimiter (element separator, * for X12), rules[] (hierarchical segment/element tree).
Inbound EDI export (reading from FTP/AS2): adaptorType: "FTPExport", file.type: "filedefinition", file.fileDefinition._fileDefinitionId, _ediProfileId, ftp.directoryPath.
Outbound EDI import (writing to FTP/AS2): adaptorType: "FTPImport", same file definition and profile references.
See configuring-exports and configuring-imports for full field schemas.
Typical patterns:
file.faAcknowledgement: true on the inbound exportSee building-flows for scheduling, chaining, and error management.
The most important conceptual split in Celigo's EDI model:
The two meet at runtime. Envelope elements in a file definition's rules don't hardcode identity values -- they carry {{{ediProfile.…}}} references, and the platform substitutes the values from the profile linked on the export/import (_ediProfileId). On parse (inbound), the substituted values are validated against the actual file bytes -- a mismatch fails the document with an EDI-profile validation error (an identity problem, not a grammar problem). On generate (outbound), the values are written into the envelope of the file being produced.
A file-based EDI step therefore needs both resources: the platform rejects an X12/EDIFACT file definition that has no linked profile. Sequence the profile before the exports/imports that reference it, exactly as you would a connection.
A profile is direction-agnostic. Its fields are labeled by whose identity they hold (tp* vs my*), not by sender/receiver position. On an inbound parse the partner is the sender, so the file definition's rules bind the sender slots to the tp* values and the receiver slots to my*; on an outbound generate the orientation flips (sender → my*, receiver → tp*). One partner profile serves the 850s coming in and the 810s going out. This is a notable asymmetry with file definitions, which come in separate parse and generate variants per document type -- parse rules tolerate what partners send, generate rules must produce exactly what partners require.
The fastest correct path to a new profile is not hand-copying values out of a companion guide -- it's parsing a real file. Given a sample EDI file from the partner, the platform reads the interchange envelope (ISA/GS for X12, UNB for EDIFACT -- the standard is auto-detected from the first characters) and extracts the envelope fields into a ready-to-review profile.
isa15, T vs P) and the qualifiers -- since they reflect that one file.name; supply one, favoring the partner-name convention (e.g. "Acme Corp X12").Celigo ships a global catalog of pre-built EDI templates -- X12 and EDIFACT document definitions, many vendor-specific (per-retailer 850 variants and the like), each tagged with vendor, document type, and direction. Templates are instantiated into account-level file definitions, which you then customize to the partner's companion guide. Canonical sourcing order:
Same-type rule: a file definition is only a valid base for the same transaction set type. An existing 850 is a fine starting point for another partner's 850; an 860 is not a starting point for an 850 -- different documents, different segment structures. Hand-building a rules tree when a template exists invites subtle mistakes in envelope close rules and element conventions.
For onboarding a whole partner (not just one document), prefer a trading partner connector -- it provisions the connection, export, import, and EDI profile together with the partner-specific fields the user must set (see step 1). Build individual EDI steps directly only when adding one document flow against an already-onboarded partner.
Functional acknowledgements -- 997 (X12) and CONTRL (EDIFACT) -- are how EDI parties confirm receipt of an interchange. They are ordinary file definitions with the documentType field set (997 or CONTRL), not a separate resource type. Accounts exchanging EDI typically wire them in both directions: generate an acknowledgement for every interchange you receive, and parse the acknowledgements your partner returns for the documents you send.
The generate side can be automated on the inbound export -- set file.faAcknowledgement: true so the platform emits the 997/CONTRL for each parsed interchange (see step 7). Track acknowledgement state per document via faStatus (see Monitoring EDI Transactions).
EDI parsing validates inbound files against both the EDI standard and the linked profile. Two file-definition flags relax that:
skipEDIValidation -- skip structural validation against the EDI standard.skipEDIProfileValidation -- skip validation of the envelope against the linked EDI profile.They exist because real-world partners send files that violate the standard or mismatch the declared profile. Treat them as a pragmatic escape hatch, not a default: prefer fixing the rules (or the profile) so validation passes -- it catches real partner errors. Reach for the skip flags only when a partner's non-conformance is confirmed, acknowledged, and not going to be fixed on their side.
B2B Manager tracks every EDI document processed. Key transaction fields: documentType, documentNumber, direction (Inbound/Outbound), faStatus (inProgress/notApplicable/notReceived/received/rejected), controlNumber, s3Key/_flowJobId (for raw file download).
fileType (edix12 or edifact) -- immutable after creationformat matches standard (delimited/x12 or delimited/edifact)globalId references the correct standard template -- immutable after creationtype: "blob" (skips parsing)controlNumber starts at 1 unless the partner requires a specific sequence_fileDefinitionId and _ediProfileIdskipEDIValidation / skipEDIProfileValidation left off unless partner non-conformance is confirmed and acknowledgedfile.csv options; JSON/XML/XLSX use step-level parser configceligo account dependencies) before editing it -- cloned instead when the change serves only one consumerfileType and globalId are immutable after creation. Create a new resource if you need a different standard or template.file.type: "filedefinition" without a valid _fileDefinitionId. Create without the file property and link afterward.type: "blob" for EDI. Blob mode skips parsing -- omit the type field so the file definition parser runs.controlNumber auto-increments. Don't reset unless the partner requires it; duplicates cause rejections.faStatus. Auto-generate with file.faAcknowledgement: true on the inbound export.edi-transactions list only works for accounts with B2B Manager enabled.skipEDIValidation / skipEDIProfileValidation are escape hatches, not defaults. They skip validation against the standard and against the linked profile, respectively. Prefer fixing the rules or the profile; reach for them only when partner non-conformance is confirmed, acknowledged, and won't be fixed on their side.997 (X12) and CONTRL (EDIFACT) are file definitions with documentType set, typically wired in both directions -- generate one for each interchange received, parse the ones the partner returns.celigo account dependencies) before editing or deleting.HDR/LIN, A/B), fixed-width slices, or EDI envelopes -- feeding it a plain same-column CSV parses wrong, typically collapsing everything into a single record. Plain CSV/TSV belongs to the step's file.csv options (hasHeaderRow, delimiters); JSON, XML, and XLSX belong to step-level parser config, never a file definition.celigo connections create < connection.json
celigo connections ping <connectionId>celigo edi-profiles create < profile.jsonceligo file-definitions create < filedef.jsonceligo edi-transactions list
celigo edi-transactions list --file-type EDIFACT
celigo edi-transactions list --start-date 2026-01-01 --end-date 2026-01-31celigo edi-profiles list
celigo edi-profiles get <id>
celigo edi-profiles create < profile.json
celigo edi-profiles update <id> < profile.json
celigo edi-profiles set <id> <key>=<value> [<key2>=<value2> ...]
celigo edi-profiles delete <id>celigo file-definitions list
celigo file-definitions get <id>
celigo file-definitions create < filedef.json
celigo file-definitions update <id> < filedef.json
celigo file-definitions set <id> <key>=<value> [<key2>=<value2> ...]
celigo file-definitions delete <id>celigo tp-connectors list
celigo tp-connectors get <id>
celigo tp-connectors listceligo edi-transactions list
celigo edi-transactions list --file-type EDIFACT
celigo edi-transactions list --start-date <date> --end-date <date>
celigo edi-transactions list --limit <n>celigo jobs download-files <jobId>
celigo jobs download-files <jobId> --file-id <s3Key> -o output.edi