---
schema_version: "1"
id: a99be941760cc160f12b2f6e3cbf117995082af7e26f4b350398b822e4ca2a98
title: X12 EDI Connector 2.18 Schema and Trading Partner Configuration
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/x12-edi-connector/2.18/x12-edi-connector-config-topics.md
canonical_url: https://docs.mulesoft.com/x12-edi-connector/2.18/x12-edi-connector-config-topics
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 86ddcb104769320d057fce60e7a56536f1dc039fd637eede4bf627c331d9d0c8
description: MuleSoft Documentation Site
release: "2.18"
latest: false
---
---
product: X12 EDI Connector
version: 2.18
---

# X12 EDI Connector 2.18 Schema and Trading Partner Configuration

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Use these additional XML configuration options to:

- Set your schema location if you are using custom schemas

- Define your trading partner relationship by setting SELF or PARTNER identification

You can set the types of error conditions that reject receive transaction sets and any writer
message separator operations. These general parameters control both Send and Receive document
handling.

## Set Your Schema Locations

If you’re using one or more custom schemas, locate these under a directory in `src/main/resources`
and refer to the location relative to this directory. For example, if an `850` schema (either
overlay or full) is under `src/main/resources/mypartner/850.esl`, the schema location is
`/mypartner/850.esl`.

You can configure schema locations in the Anypoint Studio XML view. The schema files are loaded when
the connector is initialized, so runtime expressions such as flow variables are not supported.

To configure schemas in Anypoint Studio:

1.  Switch to the XML view by clicking Configuration XML

2.  Modify your X12 EDI configuration to include a list of all the schemas for use by adding an
    `<x12:schema>` element for each document type:

```xml
<x12-edi:config name="X12_EDI__Configuration" identKeys="true" doc:name="X12 EDI: Configuration">
  <x12-edi:schemas>
    <x12:schema value="/x12/005010/850.esl"/>
  </x12-edi:schemas>
</x12-edi:config>
```

If you don’t include any schemas in the configuration, X12 EDI Connector attempts to load the
standard X12 schema definitions provided with the connector. However, in this case you won’t see any
metadata to define the structure of the data passed in and out of the connector.

If the schema definition configuration includes a `997` or `999` Functional Acknowledgment schema,
then that schema is used to generate Functional Acknowledgments.

> [!NOTE] To use the Functional Acknowledgment schema type (`997` or `999`), that schema must match
> the `generate999Acks` Parser parameter (`false` for `997`, `true` for `999`).

<table><colgroup><col> <col></colgroup><thead><tr><th>XML Value (default)</th><th>Studio Option</th></tr></thead><tbody><tr><td><p>formValidation="X12"/"HIPAA_SNIP1"/"HIPAA_SNIP2"</p></td><td><p>The schema form and validation level can be either X12 or HIPAA. The default is X12.</p></td></tr><tr><td><p>schemas=list of values</p></td><td><p>List of schema paths the connector can use. These paths can be either a file system or <code>classpath</code>.</p></td></tr><tr><td><p>characterEncoding="PLATFORM"/"ASCII"/"ISO8859_1"/"IBM1047"/"UTF8"</p></td><td><p>The character encoding used for both send and receive messages. The default <code>PLATFORM</code> is the Mule default encoding.</p></td></tr><tr><td><p>stringCharacterSet="BASIC"/"EXTENDED"/"UNRESTRICTED"</p></td><td><p>Use a substitution character for invalid characters, or reject them as errors if set to <code>none</code> or enabled for receive messages in the parser options. The default is <code>EXTENDED</code> for string data.</p></td></tr><tr><td><p>stringSubstitutionChar="?"</p></td><td><p>Substitution character used to replace invalid characters in string values. The default is <code>none</code>.</p></td></tr><tr><td><p>versionIdentifierSuffix="XYZ"</p></td><td><p>Version identifier code suffix for the group (GS). Setting this value affects both Send and Receive message handling. On the Receive side, the GS08 version code must contain X12 schema version (for example, <code>004010</code>, <code>005010</code>, and so on) followed by this suffix. Not setting this value means the Receive-only just verifies that the GS version identifier code starts with the configured schema version. On the Send side, the combination of X12 schema version and this suffix comprises the GS08 value.</p></td></tr><tr><td><p>lockMechanism="AUTO"/"RUNTIME_LOCK_MANAGER"/"OBJECT_STORE"</p></td><td><p>Mechanism to use to manage locks for control number sequencing.</p></td></tr></tbody></table>

## Self Identification Parameters

Use these parameters to identify your side of the trading partner relationship.

<table><colgroup><col> <col></colgroup><thead><tr><th>XML Value (default)</th><th>Studio Option</th></tr></thead><tbody><tr><td><p>interchangeIdQualifierSelf="ZZ"</p></td><td><p>The ID qualifier for Mule in Exchange (known as the <em>ISA segment</em>). Use this value in combination with the <code>Interchange ID</code> value. Both values must be either specified or not specified.</p></td></tr><tr><td><p>interchangeIdSelf="MULE"</p></td><td><p>The ID qualifier for Mule runtime engine in Exchange (known as the ISA segment). Use this value in combination with the <code>Interchange ID</code> value. Both values must be either specified or not specified.</p></td></tr><tr><td><p>groupIdSelf="MULEAPP"</p></td><td><p>Application code for Mule runtime engine in a group (GS segment).</p></td></tr></tbody></table>

## Partner Identification Parameters

These identify your partner.

<table><colgroup><col> <col></colgroup><thead><tr><th>XML Value (default)</th><th>Studio Option</th></tr></thead><tbody><tr><td><p>interchangeIdQualifierSelf="ZZ"</p></td><td><p>The ID qualifier for a partner in Exchange (known as the <em>ISA segment</em>). Use this value in combination with the <code>Interchange ID</code> value. Both values must be either specified or not specified.</p></td></tr><tr><td><p>interchangeIdSelf="PARTNER"</p></td><td><p>The ID qualifier for a partner in Exchange (known as the <em>ISA segment</em>). Use this value in combination with the <code>Interchange ID</code> value. Both values must be either specified or not specified.</p></td></tr><tr><td><p>groupIdSelf="PARTNERAPP"</p></td><td><p>Application Code for a partner in a group (GS segment)</p></td></tr></tbody></table>

## Parser Parameters for Error Conditions

These control the parser operation and the types of error conditions that reject Receive transaction
sets.

<table><colgroup><col> <col></colgroup><thead><tr><th>XML Value (default)</th><th>Studio Option</th></tr></thead><tbody><tr><td><p>enforceLengthLimits="true"</p></td><td><p>Enforce the minimum and maximum lengths for receive values.</p></td></tr><tr><td><p>truncateExceedingMaxLength="false"</p></td><td><p>Truncate to the maximum lengths for received values.</p></td></tr><tr><td><p>enforceCharacterSet="true"</p></td><td><p>Enforce the allowed character set.</p></td></tr><tr><td><p>enforceValueRepeats="true"</p></td><td><p>Enforce the repetition count limits for receive values.</p></td></tr><tr><td><p>allowUnknownSegments="false"</p></td><td><p>Allow unknown segments in a transaction set.</p></td></tr><tr><td><p>enforceSegmentOrder="true"</p></td><td><p>Enforce the segment order in a transaction set.</p></td></tr><tr><td><p>allowUnusedSegments="false"</p></td><td><p>Allow segments marked as <code>Unused</code> in a transaction set.</p></td></tr><tr><td><p>enforceSegmentRepeats="true"</p></td><td><p>Enforce segment repetition count limits in a transaction set.</p></td></tr><tr><td><p>requireUniqueInterchanges="true"</p></td><td><p>Require unique ISA Interchange Control Numbers (such as ISA13). The default behavior records the interchange numbers previously processed and rejects duplicate interchange numbers from the same partner. It is derived from the interchange Sender and Receiver identification. Setting to <code>false</code> enables received interchange processing to continue and relies on the application flow to track the numbers and handle them appropriately.</p></td></tr><tr><td><p>requireUniqueGroups="false"</p></td><td><p>Enforce globally unique Group Control Numbers (GS06) for received functional groups. By default, group numbers need to be unique within an interchange. Setting to <code>true</code> requires group numbers to be unique across all interchanges received from the same partner and application. This is derived from the interchange sender and receiver identification combined with the functional group sender and receiver application codes.</p></td></tr><tr><td><p>requireUniqueTransactionSets="false"</p></td><td><p>Enforce globally unique Transaction Set Control Numbers (ST02) for received transaction sets. By default, transaction set control numbers need to be unique only within a particular functional group. Setting to <code>true</code> requires transaction set numbers to be unique across all functional groups received from the same partner and application. This is derived from the interchange sender and receiver identification, combined with the functional group sender and receiver application codes.</p></td></tr><tr><td><p>daysToStore="30"</p></td><td><p>Minimum number of days to store interchange, group, and transaction set numbers for uniqueness checking.</p></td></tr><tr><td><p>ackAllSets="false"</p></td><td><p>Include a separate AK2/AK5 (<code>997</code>) or AK2/IK5 (<code>999</code>) acknowledgment for every Received transaction set. By default (<code>false</code>), transaction sets containing errors are part of the acknowledgment, with all other transaction sets implicitly acknowledged. Changing to <code>true</code> acknowledges each Received transaction set.</p></td></tr><tr><td><p>generate999Acks="false"</p></td><td><p>Generate <code>999</code> Implementation Acknowledgments instead of <code>997</code> Functional Acknowledgments. Setting to <code>false</code>, the <code>997</code> Functional Acknowledgment transaction sets are generated for each received interchange. Setting to <code>true</code> generates <code>999</code> Implementation Acknowledgments instead. Support for <code>999</code> Implementation Acknowledgments does not include CTX segment generation.</p></td></tr><tr><td><p>reportSegmentErrors="true"</p></td><td><p>Report segment error details to the sender in the <code>997`or`999</code> flag. Setting to <code>true</code> includes the details of any segment errors that are generated in the <code>997`or`999</code> flag. Setting to <code>false</code> does not include the details.</p></td></tr><tr><td><p>includeFASchema="true"</p></td><td><p>Expect <code>997</code> or <code>999</code> Functional Acknowledgments and include the <code>997</code> or <code>999</code> schema. <code>true</code> automatically includes the schema for the <code>997</code> or <code>999</code> acknowledgment transaction sets within the set of schemas used by X12 EDI connector. Setting to <code>false</code>, means directly specifying the <code>997</code> or <code>999</code> schema to process as the input. The schemas used for generating <code>997</code> or <code>999</code> Functional Acknowledgments are hardcoded and cannot be modified.</p></td></tr><tr><td><p>setAckSchemaByInboundMessage="false"</p></td><td><p>If the <strong>acknowledgmentSchemaPath</strong> is <code>EMPTY</code> and this property is <code>true</code> it will use the <strong>Version / Release / Industry Identifier Code (GS08)</strong> field value from the inbound message to set the Functional/Implementation Acknowledgment structure. When <code>false</code> it uses a hardcoded Functional/Implementation Acknowledgment structure of the 005010 version.</p></td></tr><tr><td><p>acknowledgmentSchemaPath=""</p></td><td><p>Expect the path either from the file system or the <code>classpath</code>. If the path is specified, it overwrites the default acknowledgment path.</p></td></tr><tr><td><p>enforceConditionalRules="false"</p></td><td><p>Enforce conditional rules for Receive values.</p></td></tr><tr><td><p>enforceCodeSetValidationsParse="false"</p></td><td><p>Enforce code set validations on the <strong>Read</strong> operation.</p></td></tr><tr><td><p>reportWarningMessagesInACK="true"</p></td><td><p>Report non-fatal errors in acknowledgments.</p></td></tr><tr><td><p>includeTrailerSegments="false"</p></td><td><p>Include 'InterchangeTrailer' and 'GroupTrailer' in each transaction</p></td></tr><tr><td><p>includeElementsFromIgnoredSegments="false"</p></td><td><p>Whether to include data elements from segments with Ignore as the usage type in the output map and metadata.</p></td></tr></tbody></table>

## Writer Parameters

These control the types of writer operations.

<table><colgroup><col> <col></colgroup><thead><tr><th>XML Value (default)</th><th>Studio Option</th></tr></thead><tbody><tr><td><p>dataSeparator="*"</p></td><td><p>Data element separator character. The default uses the configured value for all output messages and can be overridden at the message level.</p></td></tr><tr><td><p>componentSeparator="&gt;"</p></td><td><p>Component separator character. The default uses the configured value for all output messages and can be overridden at the message level.</p></td></tr><tr><td><p>repetitionSeparator="U"</p></td><td><p>Repetition separator character. The default uses the configured value for all output messages and can be overridden at the message level. <code>U</code> means repetitions are not used</p></td></tr><tr><td><p>segmentTerminator="~"</p></td><td><p>Segment terminator character. The default uses the configured value for all output messages and can be overridden at the message level.</p></td></tr><tr><td><p>lineEnding="NONE"/"LF"/"CRLF"/"CR"</p></td><td><p>Line ending to add between segments. The default is <code>NONE</code>. You can add line endings between segments to improve message text output readability.</p></td></tr><tr><td><p>writeUseCRLFLastLine="false"</p></td><td><p>Use configured 'Segment Line Ending' at the end of the last line.</p></td></tr><tr><td><p>sendUniqueGroupNumbers="false"</p></td><td><p>Send unique Group Control Numbers. <code>false</code> (default) assigns functional group control numbers sequentially within each interchange and reuses them in different interchanges. <code>true</code> assigns unique group numbers across all interchanges sent to the same partner and application. It is derived from the interchange sender and receiver identification combined with the functional group sender and receiver application codes.</p></td></tr><tr><td><p>sendUniqueTransactionNumbers="false"</p></td><td><p>Send unique Transaction Set Control Numbers. <code>false</code> (default) assigns transaction set control numbers sequentially within each functional group and reuses them in different groups. <code>true</code> assigns unique transaction set numbers across all interchanges sent to the same partner and application. It is derived from the interchange sender and receiver identification, combined with the functional group sender and receiver application codes.</p></td></tr><tr><td><p>implementationConventionReference=""</p></td><td><p>Implementation convention reference for transactions (ST segment). Setting this value uses the ST Implementation Convention Reference unless overridden in the message parameters.</p></td></tr><tr><td><p>initialInterchangeNumber="1"</p></td><td><p>The initial Interchange Control Number used for outgoing messages.</p></td></tr><tr><td><p>initialGroupNumber="1"</p></td><td><p>The initial Group Control Number used for outgoing messages.</p></td></tr><tr><td><p>initialSetNumber="1"</p></td><td><p>The initial Transaction Set Control Number used for outgoing messages.</p></td></tr><tr><td><p>ackRequested="false"</p></td><td><p>Request acknowledgments for sent transactions flag. If true, <code>997</code> or <code>999</code> acknowledgments are requested for all sent transactions.</p></td></tr><tr><td><p>defaultUsageIndicator="P"</p></td><td><p>Default ISA15 interchange usage indicator: <code>I</code> for Information, <code>P</code> for Production Data, <code>T</code> for Test Data.</p></td></tr><tr><td><p>useSuppliedValues="false"</p></td><td><p>Use values from supplied data for control segment identifiers (ISA/IEA, GS/GE, ST/SE segments). <code>false</code> generates control numbers when writing.</p></td></tr><tr><td><p>outputEdiMimeType="APPLICATION_PLAIN"/"APPLICATION_EDIX12"</p></td><td><p>Output MIME type to be set for the message, either the default <code>application/plain</code> or X12-specific alternative <code>application/edi-x12</code>.</p></td></tr><tr><td><p>writeEnforceLengthLimits="true"</p></td><td><p>Enforce minimum and maximum lengths for write values. The default of <code>true</code> throws an exception when an element is too long or too short. <code>false</code> leaves the values as-is.</p></td></tr><tr><td><p>writeTruncateExceedingMaxLength="false"</p></td><td><p>Truncate to the maximum lengths for received values.</p></td></tr><tr><td><p>enforceConditionalRulesOnWriter="false"</p></td><td><p>Enforce conditional rules for write values.</p></td></tr><tr><td><p>interchangeNumberKey=""</p></td><td><p>Interchange number key name for the object store.</p></td></tr><tr><td><p>enforceCodeSetValidationsWrite="false"</p></td><td><p>Enforce code set validations on the <strong>Write</strong> operation.</p></td></tr></tbody></table>

## Write Batch Parameters

These control the types of Write batch (`<edifact:write-batch>`) operations.

<table><colgroup><col> <col></colgroup><thead><tr><th>XML Value (default)</th><th>Studio Option</th></tr></thead><tbody><tr><td><p>batchDataSeparator="*"</p></td><td><p>Data element separator character. The default uses the configured value for all output messages and can be overridden at the message level.</p></td></tr><tr><td><p>batchComponentSeparator="&gt;"</p></td><td><p>Component separator character. The default uses the configured value for all output messages and can be overridden at the message level.</p></td></tr><tr><td><p>batchRepetitionSeparator="U"</p></td><td><p>Repetition separator character. The default uses the configured value for all output messages and can be overridden at the message level. <code>U</code> means repetitions are not used</p></td></tr><tr><td><p>batchSegmentTerminator="~"</p></td><td><p>Segment terminator character. The default uses the configured value for all output messages and can be overridden at the message level.</p></td></tr><tr><td><p>batchLineEnding="NONE"/"LF"/"CRLF"/"CR"</p></td><td><p>Line ending to add between segments. The default is <code>NONE</code>. You can add line endings between segments to improve message text output readability.</p></td></tr><tr><td><p>batchUseCRLFLastLine="false"</p></td><td><p>Use configured 'Segment Line Ending' at the end of the last line.</p></td></tr><tr><td><p>batchSendUniqueGroupNumbers="false"</p></td><td><p>Send unique Group Control Numbers. <code>false</code> (default) assigns functional group control numbers sequentially within each interchange and reuses them in different interchanges. <code>true</code> assigns unique group numbers across all interchanges sent to the same partner and application. It is derived from the interchange sender and receiver identification combined with the functional group sender and receiver application codes.</p></td></tr><tr><td><p>batchSendUniqueTransactionNumbers="false"</p></td><td><p>Send unique Transaction Set Control Numbers. <code>false</code> (default) assigns transaction set control numbers sequentially within each functional group and reuses them in different groups. <code>true</code> assigns unique transaction set numbers across all interchanges sent to the same partner and application. It is derived from the interchange sender and receiver identification, combined with the functional group sender and receiver application codes.</p></td></tr><tr><td><p>batchInitialInterchangeNumber="1"</p></td><td><p>The initial Interchange Control Number used for outgoing messages.</p></td></tr><tr><td><p>batchInitialGroupNumber="1"</p></td><td><p>The initial Group Control Number used for outgoing messages.</p></td></tr><tr><td><p>batchInitialSetNumber="1"</p></td><td><p>The initial Transaction Set Control Number used for outgoing messages.</p></td></tr><tr><td><p>batchAckRequested="false"</p></td><td><p>Request acknowledgments for sent transactions flag. If true, <code>997</code> or <code>999</code> acknowledgments are requested for all sent transactions.</p></td></tr><tr><td><p>batchDefaultUsageIndicator="P"</p></td><td><p>Default ISA15 interchange usage indicator: <code>I</code> for Information, <code>P</code> for Production Data, <code>T</code> for Test Data.</p></td></tr><tr><td><p>batchOutputEdiMimeType="APPLICATION_PLAIN"/"APPLICATION_EDIX12"</p></td><td><p>Output MIME type to be set for the message, either the default <code>application/plain</code> or X12-specific alternative <code>application/edi-x12</code>.</p></td></tr><tr><td><p>batchInterchangeNumberKey=""</p></td><td><p>Interchange number key name for object store.</p></td></tr><tr><td><p>batchGroupNumberKey=""</p></td><td><p>Group number key name for object store.</p></td></tr><tr><td><p>batchTransactionNumberKey=""</p></td><td><p>Transaction number key name for object store.</p></td></tr><tr><td><p>batchEnforceLengthLimits="TRUE"</p></td><td><p>Enforce minimum and maximum lengths for received values.</p></td></tr><tr><td><p>batchTruncateExceedingMaxLength="false"</p></td><td><p>Truncate to the maximum lengths for received values.</p></td></tr><tr><td><p>enforceCodeSetValidationsBatch="false"</p></td><td><p>Enforce code set validations on the <strong>Write Batch</strong> operation.</p></td></tr></tbody></table>

## Next Step

After you complete configuring the connector, you can try the
[Examples](https://docs.mulesoft.com/x12-edi-connector/2.18/x12-edi-connector-examples).

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Salesforce Help](https://help.salesforce.com)
