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.
By celigo · 1,044 installs
npx skills add celigo/ai --skill building-b2b
Source repository · Upstream listing
<! TIER:1
Building B2B / EDI Integrations
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/SFTP, AS2, S3 and VAN connections, and over the folder (file) mode of cloud file providers such as Google Drive, Box, Dropbox, Azure Blob, Google Cloud Storage and Celigo Storage.
An EDI integration has these Celigo specific components:
Trading partner connector a pre built template (590+) defining the connection type, EDI profile defaults, and export/import field requirements for a specific trading partner
EDI profile interchange envelope settings (ISA/GS for X12, UNB for EDIFACT) that identify sender/receiver and control document versioning
File definition parsing and generation rules that describe the segment/element structure of a specific EDI document type (e.g. one trading partner's 850 or 856)
Connection FTP, AS2, S3, VAN or cloud file provider credentials for the trading partner's EDI endpoint
Exports and imports file based data sources/destinations that use file definitions to parse inbound EDI or generate outbound EDI
Flows pipelines wiring exports and imports together with transformations
EDI Standards
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.
Quick Reference
Resource Decision Matrix
Task Resource CLI command Schema
Discover partner templates Trading partner connector tp connectors list [tp connector request.yml](references/schemas/tp connector request.yml)
Define interchange envelope EDI profile edi profiles create [edi profile request.yml](references/schemas/edi profile request.yml)
Define document parsing/generation File definition file definitions create [file definition request.yml](references/schemas/file definition request.yml)
Monitor document exchange EDI transaction edi transactions list [edi transaction.yml](references/schemas/edi transaction.yml)
Connect to partner endpoint Connection (FTP, AS2, S3, VAN or a file provider) connections create See configuring connections
Minimum Required Fields
Resource Required
EDI profile (X12) To save: name , fileType: "edix12" . Before it parses or generates a file: tpInterchangeId , myInterchangeId , tpIdQualifier , myIdQualifier , tpGroupId , myGroupId , isa01 – isa04 (checked against every inbound file), isa12 (version), gs07 , gs08 . Take the IDs from the partner's guide, a sample file or the connector; leave any nobody has supplied empty and ask never invent one
EDI profile (EDIFACT) To save: name , fileType: "edifact" . Before use: unb010 0001 , unb010 0002 , versionNumber , releaseNumber , controllingAgency
File definition (X12/EDIFACT) name , version: "2" , format (e.g. delimited/x12 ), globalId (X12/EDIFACT on EDI licensed accounts), delimited block ( rowDelimiter , rowSuffix , colDelimiter ), rules[] (20 KB at most, serialized)
File definition (fixed width) name , format: "fixed" , version: "1" , fixed.rowDelimiter , fixed.paddingChar , and rules[] declaring every column of the line in order, each with a length including a placeholder element for positions you don't need ( startPosition is ignored). A create or update missing version , rowDelimiter or paddingChar is refused with 422
Schema Index
[edi profile request.yml](references/schemas/edi profile request.yml) X12 ISA/GS and EDIFACT UNB fields
[file definition request.yml](references/schemas/file definition request.yml) format, delimiters, rules structure
[edi transaction.yml](references/schemas/edi transaction.yml) transaction query response shape
[tp connector request.yml](references/schemas/tp connector request.yml) connector and supportedBy sections
[tp supported by section.yml](references/schemas/tp supported by section.yml) connection, profile, export/import pre configuration
Related Skills
[configuring connections Quick Reference](../configuring connections/SKILL.md quick reference) FTP, AS2, and VAN connection types for trading partner endpoints
[managing file storage The Celigo Hosted SFTP File Server](../managing file storage/references/file server.md) partner SFTP accounts whose files land in Celigo Storage
[configuring exports Quick Reference](../configuring exports/SKILL.md quick reference) file based exports that parse inbound EDI using file definitions
[configuring imports Quick Reference](../configuring imports/SKILL.md quick reference) file based imports that generate outbound EDI using file definitions
[building flows How to Build a Flow](../building flows/SKILL.md how to build a flow) wiring EDI exports and imports into flow pipelines
[writing scripts Quick Reference](../writing scripts/SKILL.md quick reference) preSavePage/postMap hooks for EDI record transformation and validation
<! TIER:2
How to Build an EDI Integration
1. Find the trading partner connector
Trading partner connectors are pre built templates (590+) that define connection type, EDI profile defaults, and export/import config for a specific partner. A connector is a template you link to; no API call installs it. In the UI, trading partner onboarding builds the resources from it and prompts for the values the connector leaves to the user. Through the API or CLI you create each resource yourself (steps 3–6) and link the connection to the connector (step 3).
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](references/schemas/tp supported by section.yml) for the full structure. The list is a summary without supportedBy , so fetch the connector you need by id. Each connector is one transport, region and business model for a partner; a partner's variants share its baseName , and celigo tp connectors list distinct lists those partner names. List rows carry only id and name unless you ask for more fields: type is the transport ( AS2 or FTP ), region the partner's market, and model the business model ( none , Dropship , Warehouse , DVS ). The CLI list has no search flag; the API's baseName filter matches exactly, and returns nothing when no partner matches. No MCP tool reads the catalog. create , update and delete manage your own definitions, which stay unpublished and visible only to you unless Celigo has enabled the account to publish trading partner connectors.
If no connector fits, create the connection, EDI profile, exports and imports yourself, and still source the file definitions from a template or an existing definition (see [Sourcing EDI Resources]( sourcing edi resources)).
2. Check for existing resources
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. File definitions and EDI profiles are account level no integration owns them so list them all rather than by integration, and choose a definition by partner, document type and direction.
When a partner already has a flow for another document, model the new export or import on it but don't copy everything: reuse its connection, its EDI profile and, inbound, its acknowledgement listener ( postParseListenerId ), and take the file definition for the new document type another document type's definition won't parse it.
3. Create the connection
Create the connection for the partner's transport: FTP/SFTP, AS2, S3, VAN, or a cloud file provider in folder mode. See [configuring connections](../configuring connections/SKILL.md) for full connection setup.
With a trading partner connector, link the connection to it: set <transport . tpConnectorId on an as2 , ftp or s3 connection. The connector must be published (an unknown or unpublished id is rejected with 422 tpconnector not found ), and VAN connections have no link field. Then set the fields the connector's supportedBy.connection.fieldsUserMustSet lists: the partner's real host and identity.
Never copy the connector's pre configured connection values onto the connection. Apart from the transport type, they're template stand ins, such as a placeholder AS2 partner ID and a staging AS2 URL. An AS2 connection's partnerId can't be changed once the connection exists an update with a different value is silently ignored so a copied placeholder is permanent, and fixing it takes a new connection. Get the partner's real AS2 ID before you create an AS2 connection.
4. Create the EDI profile
The EDI profile defines the interchange envelope ISA/GS segments (X12) or UNB segment (EDIFACT). Read [edi profile request.yml](references/schemas/edi profile request.yml) for all fields.
Key X12 fields: tpInterchangeId / tpIdQualifier (the partner's ID and its qualifier, e.g. ZZ = mutually defined) and myInterchangeId / myIdQualifier (yours). On files you receive the partner is the sender (ISA05/ISA06) and you the receiver (ISA07/ISA08); on files you generate it's the reverse. Also isa01 – isa04 (the parser checks the file's ISA01–ISA04 against them), isa12 (version, e.g. 00401), isa15 (P = production, T = test) and controlNumber (auto incremented). Store interchange IDs unpadded (see gotcha 2). Celigo's definitions write isa15 into ISA15 when generating and check an inbound file's ISA15 against it, so moving a partner from test to production is that one change, made when the partner switches; keep a separate test profile only when the partner's test system also uses different IDs. isa15 is one of the fields an integration can ignore in pulls, so each environment can keep its own value.
With a trading partner connector, start from it: edi profiles create tp connector fills the partner's envelope defaults (file type, X12 version, ISA/GS flags and qualifiers), never your own IDs, and lists on stderr the IDs left for you to supply. Check its dry run body first: some connector forms prescribe spaces for isa02 / isa04 or a padded partner ID, which inbound parsing rejects, so set those to "" and the unpadded ID.
5. Create file definitions
Each document type (850, 810, 856, etc.) needs its own file definition with parsing/generation rules. Read [file definition request.yml](references/schemas/file definition request.yml) for the rules structure.
Key fields: format ( delimited/x12 or delimited/edifact ), globalId (the standard document it implements; required on EDI licensed accounts and immutable see [Sourcing EDI Resources]( sourcing edi resources)), delimited.rowDelimiter (what the parser splits segments on), delimited.rowSuffix (what generation appends after each segment, ~ for X12), delimited.colDelimiter (element separator, for X12), rules[] (hierarchical segment/element tree). When each segment ends with ~ and a line break, set rowDelimiter to ~\n (or ~\r\n ): a bare ~ leaves the line break on the next segment, and the parse fails at line 2 ( Required rule must have the respective row in the source file ).
A fixed width def